* [PATCH 1/3] bios-tables-test-allowed-diff.h: Allow RISC-V FADT and MADT changes
2025-07-16 14:41 [PATCH 0/3] RISC-V: ACPI: Update FADT and MADT versions Sunil V L
@ 2025-07-16 14:41 ` Sunil V L
2025-07-16 14:41 ` [PATCH 2/3] hw/riscv/virt-acpi-build.c: Update FADT and MADT versions Sunil V L
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Sunil V L @ 2025-07-16 14:41 UTC (permalink / raw)
To: qemu-riscv, qemu-devel
Cc: Palmer Dabbelt, Alistair Francis, Weiwei Li,
Daniel Henrique Barboza, Liu Zhiwei, Michael S . Tsirkin,
Igor Mammedov, Ani Sinha, Andrew Jones, Anup Patel,
Atish Kumar Patra, Sunil V L
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
---
tests/qtest/bios-tables-test-allowed-diff.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h
index dfb8523c8b..0c3f7a6cac 100644
--- a/tests/qtest/bios-tables-test-allowed-diff.h
+++ b/tests/qtest/bios-tables-test-allowed-diff.h
@@ -1 +1,3 @@
/* List of comma-separated changed AML files to ignore */
+"tests/data/acpi/riscv64/virt/APIC",
+"tests/data/acpi/riscv64/virt/FACP",
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 2/3] hw/riscv/virt-acpi-build.c: Update FADT and MADT versions
2025-07-16 14:41 [PATCH 0/3] RISC-V: ACPI: Update FADT and MADT versions Sunil V L
2025-07-16 14:41 ` [PATCH 1/3] bios-tables-test-allowed-diff.h: Allow RISC-V FADT and MADT changes Sunil V L
@ 2025-07-16 14:41 ` Sunil V L
2025-07-16 16:34 ` Michael S. Tsirkin
2025-07-16 14:41 ` [PATCH 3/3] tests/data/acpi/riscv64: Update expected FADT and MADT Sunil V L
2025-07-24 7:45 ` [PATCH 0/3] RISC-V: ACPI: Update FADT and MADT versions Michael S. Tsirkin
3 siblings, 1 reply; 6+ messages in thread
From: Sunil V L @ 2025-07-16 14:41 UTC (permalink / raw)
To: qemu-riscv, qemu-devel
Cc: Palmer Dabbelt, Alistair Francis, Weiwei Li,
Daniel Henrique Barboza, Liu Zhiwei, Michael S . Tsirkin,
Igor Mammedov, Ani Sinha, Andrew Jones, Anup Patel,
Atish Kumar Patra, Sunil V L
RISC-V support is added only in ACPI 6.6. According to the ACPI 6.6
specification, the minor version of the Fixed ACPI Description Table
(FADT) should be 6, and the Multiple APIC Description Table (MADT)
should use revision 7. So, update the RISC-V FADT and MADT to reflect
correct versions.
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
---
hw/riscv/virt-acpi-build.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/riscv/virt-acpi-build.c b/hw/riscv/virt-acpi-build.c
index ee1416d264..d7e57cbb1f 100644
--- a/hw/riscv/virt-acpi-build.c
+++ b/hw/riscv/virt-acpi-build.c
@@ -429,7 +429,7 @@ static void build_fadt_rev6(GArray *table_data,
{
AcpiFadtData fadt = {
.rev = 6,
- .minor_ver = 5,
+ .minor_ver = 6,
.flags = 1 << ACPI_FADT_F_HW_REDUCED_ACPI,
.xdsdt_tbl_offset = &dsdt_tbl_offset,
};
@@ -537,7 +537,7 @@ static void build_madt(GArray *table_data,
hart_index_bits = imsic_num_bits(imsic_max_hart_per_socket);
- AcpiTable table = { .sig = "APIC", .rev = 6, .oem_id = s->oem_id,
+ AcpiTable table = { .sig = "APIC", .rev = 7, .oem_id = s->oem_id,
.oem_table_id = s->oem_table_id };
acpi_table_begin(&table, table_data);
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH 2/3] hw/riscv/virt-acpi-build.c: Update FADT and MADT versions
2025-07-16 14:41 ` [PATCH 2/3] hw/riscv/virt-acpi-build.c: Update FADT and MADT versions Sunil V L
@ 2025-07-16 16:34 ` Michael S. Tsirkin
0 siblings, 0 replies; 6+ messages in thread
From: Michael S. Tsirkin @ 2025-07-16 16:34 UTC (permalink / raw)
To: Sunil V L
Cc: qemu-riscv, qemu-devel, Palmer Dabbelt, Alistair Francis,
Weiwei Li, Daniel Henrique Barboza, Liu Zhiwei, Igor Mammedov,
Ani Sinha, Andrew Jones, Anup Patel, Atish Kumar Patra
On Wed, Jul 16, 2025 at 08:11:39PM +0530, Sunil V L wrote:
> RISC-V support is added only in ACPI 6.6. According to the ACPI 6.6
> specification, the minor version of the Fixed ACPI Description Table
> (FADT) should be 6, and the Multiple APIC Description Table (MADT)
> should use revision 7. So, update the RISC-V FADT and MADT to reflect
> correct versions.
>
> Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
> ---
> hw/riscv/virt-acpi-build.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/riscv/virt-acpi-build.c b/hw/riscv/virt-acpi-build.c
> index ee1416d264..d7e57cbb1f 100644
> --- a/hw/riscv/virt-acpi-build.c
> +++ b/hw/riscv/virt-acpi-build.c
> @@ -429,7 +429,7 @@ static void build_fadt_rev6(GArray *table_data,
> {
> AcpiFadtData fadt = {
> .rev = 6,
> - .minor_ver = 5,
> + .minor_ver = 6,
> .flags = 1 << ACPI_FADT_F_HW_REDUCED_ACPI,
> .xdsdt_tbl_offset = &dsdt_tbl_offset,
> };
> @@ -537,7 +537,7 @@ static void build_madt(GArray *table_data,
>
> hart_index_bits = imsic_num_bits(imsic_max_hart_per_socket);
>
> - AcpiTable table = { .sig = "APIC", .rev = 6, .oem_id = s->oem_id,
> + AcpiTable table = { .sig = "APIC", .rev = 7, .oem_id = s->oem_id,
> .oem_table_id = s->oem_table_id };
Add comments citing the spec version and chapter.
> acpi_table_begin(&table, table_data);
> --
> 2.43.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 3/3] tests/data/acpi/riscv64: Update expected FADT and MADT
2025-07-16 14:41 [PATCH 0/3] RISC-V: ACPI: Update FADT and MADT versions Sunil V L
2025-07-16 14:41 ` [PATCH 1/3] bios-tables-test-allowed-diff.h: Allow RISC-V FADT and MADT changes Sunil V L
2025-07-16 14:41 ` [PATCH 2/3] hw/riscv/virt-acpi-build.c: Update FADT and MADT versions Sunil V L
@ 2025-07-16 14:41 ` Sunil V L
2025-07-24 7:45 ` [PATCH 0/3] RISC-V: ACPI: Update FADT and MADT versions Michael S. Tsirkin
3 siblings, 0 replies; 6+ messages in thread
From: Sunil V L @ 2025-07-16 14:41 UTC (permalink / raw)
To: qemu-riscv, qemu-devel
Cc: Palmer Dabbelt, Alistair Francis, Weiwei Li,
Daniel Henrique Barboza, Liu Zhiwei, Michael S . Tsirkin,
Igor Mammedov, Ani Sinha, Andrew Jones, Anup Patel,
Atish Kumar Patra, Sunil V L
Update the expected tables for the version change.
/*
*
* ACPI Data Table [FACP]
*
* Format: [HexOffset DecimalOffset ByteLength] FieldName : FieldValue (in hex)
*/
[000h 0000 004h] Signature : "FACP" [Fixed ACPI Description Table (FADT)]
[004h 0004 004h] Table Length : 00000114
[008h 0008 001h] Revision : 06
-[009h 0009 001h] Checksum : 13
+[009h 0009 001h] Checksum : 12
[00Ah 0010 006h] Oem ID : "BOCHS "
[010h 0016 008h] Oem Table ID : "BXPC "
[018h 0024 004h] Oem Revision : 00000001
[01Ch 0028 004h] Asl Compiler ID : "BXPC"
[020h 0032 004h] Asl Compiler Revision : 00000001
[024h 0036 004h] FACS Address : 00000000
[028h 0040 004h] DSDT Address : 00000000
[02Ch 0044 001h] Model : 00
[02Dh 0045 001h] PM Profile : 00 [Unspecified]
[02Eh 0046 002h] SCI Interrupt : 0000
[030h 0048 004h] SMI Command Port : 00000000
[034h 0052 001h] ACPI Enable Value : 00
[035h 0053 001h] ACPI Disable Value : 00
[036h 0054 001h] S4BIOS Command : 00
[037h 0055 001h] P-State Control : 00
@@ -86,33 +86,33 @@
Use APIC Physical Destination Mode (V4) : 0
Hardware Reduced (V5) : 1
Low Power S0 Idle (V5) : 0
[074h 0116 00Ch] Reset Register : [Generic Address Structure]
[074h 0116 001h] Space ID : 00 [SystemMemory]
[075h 0117 001h] Bit Width : 00
[076h 0118 001h] Bit Offset : 00
[077h 0119 001h] Encoded Access Width : 00 [Undefined/Legacy]
[078h 0120 008h] Address : 0000000000000000
[080h 0128 001h] Value to cause reset : 00
[081h 0129 002h] ARM Flags (decoded below) : 0000
PSCI Compliant : 0
Must use HVC for PSCI : 0
-[083h 0131 001h] FADT Minor Revision : 05
+[083h 0131 001h] FADT Minor Revision : 06
[084h 0132 008h] FACS Address : 0000000000000000
[...]
/*
*
* ACPI Data Table [APIC]
*
* Format: [HexOffset DecimalOffset ByteLength] FieldName : FieldValue (in hex)
*/
[000h 0000 004h] Signature : "APIC" [Multiple APIC Description Table (MADT)]
[004h 0004 004h] Table Length : 00000074
-[008h 0008 001h] Revision : 06
-[009h 0009 001h] Checksum : B4
+[008h 0008 001h] Revision : 07
+[009h 0009 001h] Checksum : B3
[00Ah 0010 006h] Oem ID : "BOCHS "
[010h 0016 008h] Oem Table ID : "BXPC "
[...]
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
---
tests/data/acpi/riscv64/virt/APIC | Bin 116 -> 116 bytes
tests/data/acpi/riscv64/virt/FACP | Bin 276 -> 276 bytes
tests/qtest/bios-tables-test-allowed-diff.h | 2 --
3 files changed, 2 deletions(-)
diff --git a/tests/data/acpi/riscv64/virt/APIC b/tests/data/acpi/riscv64/virt/APIC
index 66a25dfd2d6ea2b607c024722b2eab95873a01e9..3fb5b753596fc7c2618b3d5210be8b00b0c177f6 100644
GIT binary patch
delta 16
XcmXRZ;c^V{bS`0FU|`=okt+)TB&q~M
delta 16
XcmXRZ;c^V{bS`0FU|`!akt+)TB&h^L
diff --git a/tests/data/acpi/riscv64/virt/FACP b/tests/data/acpi/riscv64/virt/FACP
index a5276b65ea8ce46cc9b40d96d98f0669c9089ed4..78e1b14b1d4ff0533a6a4c041f195a69b4ef114d 100644
GIT binary patch
delta 30
mcmbQjG=+)F&CxkPgpq-PO=u!lB_rF!iPaMgcqj8PasU8k76z;U
delta 30
mcmbQjG=+)F&CxkPgpq-PO?V<#B_r#^iPaMgcqj8PasU8k8wRWZ
diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h
index 0c3f7a6cac..dfb8523c8b 100644
--- a/tests/qtest/bios-tables-test-allowed-diff.h
+++ b/tests/qtest/bios-tables-test-allowed-diff.h
@@ -1,3 +1 @@
/* List of comma-separated changed AML files to ignore */
-"tests/data/acpi/riscv64/virt/APIC",
-"tests/data/acpi/riscv64/virt/FACP",
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH 0/3] RISC-V: ACPI: Update FADT and MADT versions
2025-07-16 14:41 [PATCH 0/3] RISC-V: ACPI: Update FADT and MADT versions Sunil V L
` (2 preceding siblings ...)
2025-07-16 14:41 ` [PATCH 3/3] tests/data/acpi/riscv64: Update expected FADT and MADT Sunil V L
@ 2025-07-24 7:45 ` Michael S. Tsirkin
3 siblings, 0 replies; 6+ messages in thread
From: Michael S. Tsirkin @ 2025-07-24 7:45 UTC (permalink / raw)
To: Sunil V L
Cc: qemu-riscv, qemu-devel, Palmer Dabbelt, Alistair Francis,
Weiwei Li, Daniel Henrique Barboza, Liu Zhiwei, Igor Mammedov,
Ani Sinha, Andrew Jones, Anup Patel, Atish Kumar Patra
On Wed, Jul 16, 2025 at 08:11:37PM +0530, Sunil V L wrote:
> Since RISC-V support is added only in ACPI 6.6, it should adhere to the
> expected FADT and MADT versions. Update them.
Seems legit
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Risc maintainers, any feedback?
> Sunil V L (3):
> bios-tables-test-allowed-diff.h: Allow RISC-V FADT and MADT changes
> hw/riscv/virt-acpi-build.c: Update FADT and MADT versions
> tests/data/acpi/riscv64: Update expected FADT and MADT
>
> hw/riscv/virt-acpi-build.c | 4 ++--
> tests/data/acpi/riscv64/virt/APIC | Bin 116 -> 116 bytes
> tests/data/acpi/riscv64/virt/FACP | Bin 276 -> 276 bytes
> 3 files changed, 2 insertions(+), 2 deletions(-)
>
> --
> 2.43.0
^ permalink raw reply [flat|nested] 6+ messages in thread