[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] BCM2837 and machine raspi3
From: |
bzt bzt |
Subject: |
Re: [Qemu-devel] [PATCH] BCM2837 and machine raspi3 |
Date: |
Wed, 29 Nov 2017 08:17:03 +0100 |
On Tue, Nov 28, 2017 at 12:56 PM, Peter Maydell <address@hidden>
wrote:
> On 28 November 2017 at 11:26, bzt bzt <address@hidden> wrote:
> > (Although I have a question. I'm not sure what's the preferred
> > way to get MachineClass* object in bcm2836. Use a MachineState* cast on
> it's
> > Object* argument with MACHINE_GET_CLASS() or should I use the
> parameterless
> > qdev_get_machine() instead?)
>
> bcm2836.c should be a self contained object, which its caller creates
> and configures. The MachineClass is the board model object, and the
> SoC object shouldn't have to access it. If there's something (like the
> CPU model string) that the SoC needs, the SoC object should have a
> property which the board model sets.
>
> hw/arm/stm32f205_soc.c has an example of this (as do some of the
> other SoC objects -- 'git grep cpu-type hw/arm' should bring them up).
>
Okay, thanks a lot! I'll check them!
>
> thanks
> -- PMM
>