[Top][All Lists]

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

Re: [Qemu-devel] [PATCH] BCM2837 and machine raspi3

From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] BCM2837 and machine raspi3
Date: Tue, 28 Nov 2017 11:56:16 +0000

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).

-- PMM

reply via email to

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