On 19/10/23 09:32, Thomas Huth wrote:
On 19/10/2023 09.15, Philippe Mathieu-Daudé wrote:
Hi,

This series ensure:

- qbus_new() and sysbus_init_mmio() are called *before*
   a device is realized,
- sysbus_mmio_map() is called *after* it is realized.

Just an additional idea that came up while reading your series:
I think we should also add proper function descriptions for sysbus_init_mmio() and sysbus_mmio_map() in include/hw/sysbus.h, to make people aware that the first function should be used within the device to expose the mmio region, while the latter should be used in the machine code that wires the devices to the correct location in the sysbus memory. What do you think?

I've been thinking about this, but I plan to eventually merge these
calls to the QDev API (after removing more unuseful / duplicated
SysBus functions). So I was planning to document there. But yeah,
better to start doing that now.

Reply via email to