From 71302ff3bc9fbcceeb3ad7e6bb724ea942b5bba1 Mon Sep 17 00:00:00 2001 From: Sunil V L Date: Thu, 2 Mar 2023 14:42:07 +0530 Subject: hw/riscv/virt: Add memmap pointer to RiscVVirtState memmap needs to be exported outside of virt.c so that modules like acpi can use it. Hence, add a pointer field in RiscVVirtState structure and initialize it with the memorymap. Signed-off-by: Sunil V L Reviewed-by: Bin Meng Acked-by: Alistair Francis Reviewed-by: Andrew Jones Message-ID: <20230302091212.999767-4-sunilvl@ventanamicro.com> Signed-off-by: Palmer Dabbelt --- hw/riscv/virt.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'hw') diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 90579a4..aed303e 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -1458,6 +1458,8 @@ static void virt_machine_init(MachineState *machine) ROUND_UP(virt_high_pcie_memmap.base, virt_high_pcie_memmap.size); } + s->memmap = virt_memmap; + /* register system main memory (actual RAM) */ memory_region_add_subregion(system_memory, memmap[VIRT_DRAM].base, machine->ram); -- cgit v1.1