[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH V5 3/8] hw/riscv/virt: Add memmap pointer to RiscVVirtState
From: |
Sunil V L |
Subject: |
[PATCH V5 3/8] hw/riscv/virt: Add memmap pointer to RiscVVirtState |
Date: |
Thu, 2 Mar 2023 14:42:07 +0530 |
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 <sunilvl@ventanamicro.com>
Reviewed-by: Bin Meng <bmeng@tinylab.org>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
---
hw/riscv/virt.c | 2 ++
include/hw/riscv/virt.h | 1 +
2 files changed, 3 insertions(+)
diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c
index 8df37cf3d6..9b85d5b747 100644
--- a/hw/riscv/virt.c
+++ b/hw/riscv/virt.c
@@ -1451,6 +1451,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);
diff --git a/include/hw/riscv/virt.h b/include/hw/riscv/virt.h
index 62efebaa32..379501edcc 100644
--- a/include/hw/riscv/virt.h
+++ b/include/hw/riscv/virt.h
@@ -59,6 +59,7 @@ struct RISCVVirtState {
char *oem_id;
char *oem_table_id;
OnOffAuto acpi;
+ const MemMapEntry *memmap;
};
enum {
--
2.34.1
- [PATCH V5 0/8] Add basic ACPI support for risc-v virt, Sunil V L, 2023/03/02
- [PATCH V5 1/8] hw/riscv/virt: Add OEM_ID and OEM_TABLE_ID fields, Sunil V L, 2023/03/02
- [PATCH V5 2/8] hw/riscv/virt: Add a switch to disable ACPI, Sunil V L, 2023/03/02
- [PATCH V5 3/8] hw/riscv/virt: Add memmap pointer to RiscVVirtState,
Sunil V L <=
- [PATCH V5 4/8] hw/riscv/virt: Enable basic ACPI infrastructure, Sunil V L, 2023/03/02
- [PATCH V5 5/8] hw/riscv/virt: virt-acpi-build.c: Add RINTC in MADT, Sunil V L, 2023/03/02
- [PATCH V5 7/8] hw/riscv/virt.c: Initialize the ACPI tables, Sunil V L, 2023/03/02
- [PATCH V5 6/8] hw/riscv/virt: virt-acpi-build.c: Add RHCT Table, Sunil V L, 2023/03/02
- [PATCH V5 8/8] MAINTAINERS: Add entry for RISC-V ACPI, Sunil V L, 2023/03/02
- Re: [PATCH V5 0/8] Add basic ACPI support for risc-v virt, Palmer Dabbelt, 2023/03/05