qemu-ppc
[Top][All Lists]
Advanced

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

Re: [PATCH v2 12/20] ppc/ppc405: QOM'ify EBC


From: BALATON Zoltan
Subject: Re: [PATCH v2 12/20] ppc/ppc405: QOM'ify EBC
Date: Fri, 5 Aug 2022 21:15:03 +0200 (CEST)

On Fri, 5 Aug 2022, BALATON Zoltan wrote:
On Fri, 5 Aug 2022, Peter Maydell wrote:
On Fri, 5 Aug 2022 at 17:50, BALATON Zoltan <balaton@eik.bme.hu> wrote:
This also
allows to get the cpu without a link with something like:

PPC4XX_MACHINE(current_machine /* or qdev_get_machine() */)->soc.cpu

...and now you have device code that's making assumptions about
the machine and SoC it's in.

Since these devices are strictly part of this SoC making this asumption should be OK. Making assumption about the machine may be a valid argument although this series already makes that asumption for 405 machines by introducing the machine state class. We need a way to share these device models between 4xx mahines so I think some assumptions will proabbly be needed.

By the way the assumption that we have a machine with a soc object is only there because there seems to be no way to get from an object to its parent which is strange. The soc would simply be OBJECT(dev)->parent as these devices have to be in the soc beacuse they are part of that model but those Object fields are marked private (some places so access it nevertheless).but there's no function to get them. MemoryRegion has its own version. Why do we have these objects in a tree if there's no way to navigate it?

Regards,
BALATON Zoltan



reply via email to

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