diff options
| author | Joel Stanley <joel@jms.id.au> | 2026-09-03 15:21:18 +0930 |
|---|---|---|
| committer | Alistair Francis <alistair.francis@wdc.com> | 2026-09-04 09:49:07 +1000 |
| commit | 6d595cfdc674e963af77386567d35a4594f06ab6 (patch) | |
| tree | 13ce2c521bc469e68b9721afd9c674466aabb2a6 /include | |
| parent | ee2d3dceb5b7106e04b83f3a17f1d219ae079795 (diff) | |
| download | qemu-6d595cfdc674e963af77386567d35a4594f06ab6.tar.gz qemu-6d595cfdc674e963af77386567d35a4594f06ab6.zip | |
hw/intc/riscv_aplic: Take a MemoryRegion for the created device
riscv_aplic_create() maps the device it creates into system_memory,
which prevents its use by SoCs that map devices into their own memory
container.
Add a MemoryRegion parameter and map the device into it instead of
calling sysbus_mmio_map(). The mapping still only happens when the
APLIC is emulated. All callers pass system_memory, so there is no
change in behaviour.
Reviewed-by: Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Signed-off-by: Joel Stanley <joel@jms.id.au>
Message-ID: <20260903055131.257903-5-joel@jms.id.au>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/hw/intc/riscv_aplic.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/hw/intc/riscv_aplic.h b/include/hw/intc/riscv_aplic.h index c7a4d4ad01..62d2b33ade 100644 --- a/include/hw/intc/riscv_aplic.h +++ b/include/hw/intc/riscv_aplic.h @@ -80,8 +80,9 @@ bool riscv_is_kvm_aia_aplic_imsic(bool msimode); bool riscv_use_emulated_aplic(bool msimode); void riscv_aplic_set_kvm_msicfgaddr(RISCVAPLICState *aplic, hwaddr addr); -DeviceState *riscv_aplic_create(hwaddr addr, hwaddr size, - uint32_t hartid_base, uint32_t num_harts, uint32_t num_sources, - uint32_t iprio_bits, bool msimode, bool mmode, DeviceState *parent); +DeviceState *riscv_aplic_create(MemoryRegion *container, + hwaddr addr, hwaddr size, uint32_t hartid_base, uint32_t num_harts, + uint32_t num_sources, uint32_t iprio_bits, bool msimode, bool mmode, + DeviceState *parent); #endif |
