On 16 December 2013 13:44, Andreas Färber <afaer...@suse.de> wrote: > Am 16.12.2013 14:29, schrieb Peter Maydell: >> I think that we should definitely not have individual CPUs >> looking at the system memory region directly. > > Well, overall the whole MemoryRegion API is an abstraction, and the > system MemoryRegion is where SysBus maps its devices, so we can't get > rid of it tomorrow just yet.
Certainly -- I just thought it might be worth outlining where I hope we might end up someday, in the interests of not moving in the opposite direction by accident. Off the top of my head, a possible way to introduce per-CPU AddressSpaces without requiring full reworking of every board: add the AddressSpace* (or MemoryRegion?) property to the CPU object, but if it is not set then make the realize function default it to "create an AS from the system memory region". Similarly you could just pass the a9mpcore object the system memory region rather than creating one entirely from scratch. That would let us mostly continue to use sysbus devices as we do at the moment, and we could update those bits of the system which we care about (new SoC models, for instance) as required. thanks -- PMM