qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-arm] [PATCH v4 3/3] arm: Add BBC micro:bit machine


From: Peter Maydell
Subject: Re: [Qemu-arm] [PATCH v4 3/3] arm: Add BBC micro:bit machine
Date: Thu, 16 Aug 2018 15:26:33 +0100

On 16 August 2018 at 15:19, Steffen Görtz <address@hidden> wrote:
>
>>> +
>>> +    arm_m_profile_load_kernel(ARM_CPU(first_cpu), machine->kernel_filename,
>>> +            NRF51_SOC(soc)->flash_size);
>>> +}
>>> +
>>> +static void microbit_machine_init(MachineClass *mc)
>>> +{
>>> +    mc->desc = "BBC micro:bit";
>>> +    mc->init = microbit_init;
>>> +    mc->max_cpus = 1;
>>> +}
>>> +DEFINE_MACHINE("microbit", microbit_machine_init);
>>
>> Your subclass of TYPE_MACHINE has extra state, so it can't
>> use DEFINE_MACHINE (which creates a subclass whose instance_size
>> is the same as the parent TYPE_MACHINE). You need to do this
>> longhand:
>>
>
> Hi Peter,
>
> this is covered in <address@hidden>

So it is. This patch is wrong though, so the fix needs to be
made by folding the relevant changes into this patch, not as
a separate commit later.

PS: you don't really need a header file for the machine's
struct, because nothing except the machine's .c file will
ever need to include it.

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]