d641da6ed4
hw/riscv/virt-acpi-build.c: Add PLIC in MADT
...
Add PLIC structures for each socket in the MADT when system is
configured with PLIC as the external interrupt controller.
Signed-off-by: Haibo Xu <haibo1.xu@intel.com >
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com >
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com >
Reviewed-by: Andrew Jones <ajones@ventanamicro.com >
Acked-by: Alistair Francis <alistair.francis@wdc.com >
Acked-by: Michael S. Tsirkin <mst@redhat.com >
Message-ID: <20231218150247.466427-14-sunilvl@ventanamicro.com >
Signed-off-by: Alistair Francis <alistair.francis@wdc.com >
2024-01-10 18:47:47 +10:00
55ecd83b36
hw/riscv/virt-acpi-build.c: Add IO controllers and devices
...
Add basic IO controllers and devices like PCI, VirtIO and UART in the
ACPI namespace.
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com >
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com >
Acked-by: Alistair Francis <alistair.francis@wdc.com >
Acked-by: Michael S. Tsirkin <mst@redhat.com >
Message-ID: <20231218150247.466427-13-sunilvl@ventanamicro.com >
Signed-off-by: Alistair Francis <alistair.francis@wdc.com >
2024-01-10 18:47:47 +10:00
a52aea263e
hw/riscv/virt-acpi-build.c: Add MMU node in RHCT
...
MMU type information is available via MMU node in RHCT. Add this node in
RHCT.
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com >
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com >
Reviewed-by: Andrew Jones <ajones@ventanamicro.com >
Acked-by: Alistair Francis <alistair.francis@wdc.com >
Acked-by: Michael S. Tsirkin <mst@redhat.com >
Message-ID: <20231218150247.466427-10-sunilvl@ventanamicro.com >
Signed-off-by: Alistair Francis <alistair.francis@wdc.com >
2024-01-10 18:47:47 +10:00
e810a5177c
hw/riscv/virt-acpi-build.c: Add CMO information in RHCT
...
When CMO related extensions like Zicboz, Zicbom and Zicbop are enabled, the
block size for those extensions need to be communicated via CMO node in
RHCT. Add CMO node in RHCT if any of those CMO extensions are detected.
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com >
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com >
Reviewed-by: Andrew Jones <ajones@ventanamicro.com >
Acked-by: Alistair Francis <alistair.francis@wdc.com >
Acked-by: Michael S. Tsirkin <mst@redhat.com >
Message-ID: <20231218150247.466427-9-sunilvl@ventanamicro.com >
Signed-off-by: Alistair Francis <alistair.francis@wdc.com >
2024-01-10 18:47:47 +10:00
7d189186f6
hw/riscv/virt-acpi-build.c: Add APLIC in the MADT
...
Add APLIC structures for each socket in the MADT when system is configured
with APLIC as the external wired interrupt controller.
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com >
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com >
Reviewed-by: Andrew Jones <ajones@ventanamicro.com >
Acked-by: Alistair Francis <alistair.francis@wdc.com >
Acked-by: Michael S. Tsirkin <mst@redhat.com >
Message-ID: <20231218150247.466427-8-sunilvl@ventanamicro.com >
Signed-off-by: Alistair Francis <alistair.francis@wdc.com >
2024-01-10 18:47:47 +10:00
66ac45b759
hw/riscv/virt-acpi-build.c: Add IMSIC in the MADT
...
Add IMSIC structure in MADT when IMSIC is configured.
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com >
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com >
Reviewed-by: Andrew Jones <ajones@ventanamicro.com >
Acked-by: Alistair Francis <alistair.francis@wdc.com >
Acked-by: Michael S. Tsirkin <mst@redhat.com >
Message-ID: <20231218150247.466427-7-sunilvl@ventanamicro.com >
Signed-off-by: Alistair Francis <alistair.francis@wdc.com >
2024-01-10 18:47:46 +10:00
0efb12b713
hw/riscv/virt-acpi-build.c: Add AIA support in RINTC
...
Update the RINTC structure in MADT with AIA related fields.
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com >
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com >
Acked-by: Alistair Francis <alistair.francis@wdc.com >
Reviewed-by: Andrew Jones <ajones@ventanamicro.com >
Acked-by: Michael S. Tsirkin <mst@redhat.com >
Message-ID: <20231218150247.466427-6-sunilvl@ventanamicro.com >
Signed-off-by: Alistair Francis <alistair.francis@wdc.com >
2024-01-10 18:47:46 +10:00
4c7f4f4f05
hw/arm/virt-acpi-build.c: Migrate fw_cfg creation to common location
...
RISC-V also needs to use the same code to create fw_cfg in DSDT. So,
avoid code duplication by moving the code in arm and riscv to a device
specific file.
Suggested-by: Igor Mammedov <imammedo@redhat.com >
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com >
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com >
Reviewed-by: Alistair Francis <alistair.francis@wdc.com >
Reviewed-by: Andrew Jones <ajones@ventanamicro.com >
Acked-by: Michael S. Tsirkin <mst@redhat.com >
Message-ID: <20231218150247.466427-2-sunilvl@ventanamicro.com >
Signed-off-by: Alistair Francis <alistair.francis@wdc.com >
2024-01-10 18:47:46 +10:00
a2c2fe57c2
hw/riscv: Constify VMState
...
Acked-by: Alistair Francis <alistair.francis@wdc.com >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20231221031652.119827-49-richard.henderson@linaro.org >
2023-12-30 07:38:06 +11:00
cc37d98bfb
*: Add missing includes of qemu/error-report.h
...
This had been pulled in via qemu/plugin.h from hw/core/cpu.h,
but that will be removed.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Message-Id: <20230310195252.210956-5-richard.henderson@linaro.org >
[AJB: add various additional cases shown by CI]
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Message-Id: <20230315174331.2959-15-alex.bennee@linaro.org >
Reviewed-by: Emilio Cota <cota@braap.org >
2023-03-22 15:06:57 +00:00
ebfd392893
hw/riscv/virt: virt-acpi-build.c: Add RHCT Table
...
RISC-V ACPI platforms need to provide RISC-V Hart Capabilities
Table (RHCT). Add this to the ACPI tables.
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com >
Reviewed-by: Andrew Jones <ajones@ventanamicro.com >
Message-ID: <20230302091212.999767-7-sunilvl@ventanamicro.com >
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com >
2023-03-06 11:35:06 -08:00
6cc40ea211
hw/riscv/virt: virt-acpi-build.c: Add RINTC in MADT
...
Add Multiple APIC Description Table (MADT) with the
RINTC structure for each cpu.
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com >
Acked-by: Alistair Francis <alistair.francis@wdc.com >
Reviewed-by: Andrew Jones <ajones@ventanamicro.com >
Message-ID: <20230302091212.999767-6-sunilvl@ventanamicro.com >
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com >
2023-03-06 11:35:05 -08:00
7da2fb240f
hw/riscv/virt: Enable basic ACPI infrastructure
...
Add basic ACPI infrastructure for RISC-V with below tables.
1) DSDT with below basic objects
- CPUs
- fw_cfg
2) FADT revision 6 with HW_REDUCED flag
3) XSDT
4) RSDP
Add this functionality in a new file virt-acpi-build.c and enable
building this infrastructure.
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com >
Reviewed-by: Andrew Jones <ajones@ventanamicro.com >
Message-ID: <20230302091212.999767-5-sunilvl@ventanamicro.com >
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com >
2023-03-06 11:35:04 -08:00