On 27/8/26 00:05, Joel Stanley wrote:
sifive_plic_create() maps the device it creates into system_memory, which prevents its use by SoCs that map devices into their own memory container.
Correct. We'll need more of these refactor cleanups. Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Add a MemoryRegion parameter and map the device into it instead of calling sysbus_mmio_map(). All callers pass system_memory, so there is no change in behaviour. Signed-off-by: Joel Stanley <[email protected]> --- include/hw/intc/sifive_plic.h | 3 ++- hw/intc/sifive_plic.c | 6 ++++-- hw/riscv/k230.c | 3 ++- hw/riscv/microchip_pfsoc.c | 3 ++- hw/riscv/shakti_c.c | 3 ++- hw/riscv/sifive_e.c | 2 +- hw/riscv/sifive_u.c | 3 ++- hw/riscv/virt.c | 1 + 8 files changed, 16 insertions(+), 8 deletions(-)
