Skip to contentSkip to conversation

RISC-V: ACPI: Update FADT and MADT versions

PATCH Applied Sunil V L 4 participants 11 messages Jul 24, 2025 – Jul 29, 2025 RISC-V

lore
Share & tools
lore

Sunil V L

author
#0 lore raw

v2 cover RISC-V: ACPI: Update FADT and MADT versions

Since RISC-V support is added only in ACPI 6.6, it should adhere to the expected FADT and MADT versions. Update them.

Changes since v1:
1) Updated code comments to reflect ACPI 6.6 chapter number.
2) Added Michael's Ack.

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        |  25 ++++++++++---------------
 tests/data/acpi/riscv64/virt/APIC | Bin 116 -> 116 bytes
 tests/data/acpi/riscv64/virt/FACP | Bin 276 -> 276 bytes
 3 files changed, 10 insertions(+), 15 deletions(-)
Signature · 1 line
2.43.0
author
#1 lore raw

PATCH v2 1/3 bios-tables-test-allowed-diff.h: Allow RISC-V FADT and MADT changes

---
 tests/qtest/bios-tables-test-allowed-diff.h | 2 ++
 1 file changed, 2 insertions(+)
tests/qtest/bios-tables-test-allowed-diff.h +2 -0
index dfb8523c8b..0c3f7a6cac 100644
@@ -1 +1,3 @@
 /* List of comma-separated changed AML files to ignore */
+"tests/data/acpi/riscv64/virt/APIC",
+"tests/data/acpi/riscv64/virt/FACP",
Signature · 1 line
2.43.0
Reviewed-by on v2 1/3
#2 lore raw

Re: [PATCH v2 1/3] bios-tables-test-allowed-diff.h: Allow RISC-V FADT and MADT changes

Quoted 3 lines · Sunil V L

---

Quoted 11 lines
  tests/qtest/bios-tables-test-allowed-diff.h | 2 ++
  1 file changed, 2 insertions(+)
tests/qtest/bios-tables-test-allowed-diff.h +2 -0
index dfb8523c8b..0c3f7a6cac 100644
@@ -1 +1,3 @@
  /* List of comma-separated changed AML files to ignore */
+"tests/data/acpi/riscv64/virt/APIC",
+"tests/data/acpi/riscv64/virt/FACP",
Reviewed-by on v2 1/3
#3 lore raw

Re: [PATCH v2 1/3] bios-tables-test-allowed-diff.h: Allow RISC-V FADT and MADT changes

In reply to Sunil V L
Quoted 3 lines · Sunil V L

---

Thanks,
Nutty

Quoted 11 lines
  tests/qtest/bios-tables-test-allowed-diff.h | 2 ++
  1 file changed, 2 insertions(+)
tests/qtest/bios-tables-test-allowed-diff.h +2 -0
index dfb8523c8b..0c3f7a6cac 100644
@@ -1 +1,3 @@
  /* List of comma-separated changed AML files to ignore */
+"tests/data/acpi/riscv64/virt/APIC",
+"tests/data/acpi/riscv64/virt/FACP",
author
#4 lore raw

PATCH v2 2/3 hw/riscv/virt-acpi-build.c: Update FADT and MADT versions

In reply to 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.

Update the code comments to reflect ACPI 6.6 version details.

---
 hw/riscv/virt-acpi-build.c | 25 ++++++++++---------------
 1 file changed, 10 insertions(+), 15 deletions(-)
hw/riscv/virt-acpi-build.c +10 -15
index ee1416d264..f1406cb683 100644
@@ -270,11 +270,8 @@ spcr_setup(GArray *table_data, BIOSLinker *linker, RISCVVirtState *s)
 #define RHCT_NODE_ARRAY_OFFSET 56
 
 /*
- * ACPI spec, Revision 6.5+
- * 5.2.36 RISC-V Hart Capabilities Table (RHCT)
- * REF: https://github.com/riscv-non-isa/riscv-acpi/issues/16
- *      https://drive.google.com/file/d/1nP3nFiH4jkPMp6COOxP6123DCZKR-tia/view
- *      https://drive.google.com/file/d/1sKbOa8m1UZw1JkquZYe3F1zQBN1xXsaf/view
+ * ACPI spec, Revision 6.6
+ * 5.2.37 RISC-V Hart Capabilities Table (RHCT)
  */
 static void build_rhct(GArray *table_data,
                        BIOSLinker *linker,
@@ -421,7 +418,10 @@ static void build_rhct(GArray *table_data,
     acpi_table_end(linker, &table);
 }
 
-/* FADT */
+/*
+ * ACPI spec, Revision 6.6
+ * 5.2.9 Fixed ACPI Description Table (MADT)
+ */
 static void build_fadt_rev6(GArray *table_data,
                             BIOSLinker *linker,
                             RISCVVirtState *s,
@@ -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,
     };
@@ -508,11 +508,8 @@ static void build_dsdt(GArray *table_data,
 }
 
 /*
- * ACPI spec, Revision 6.5+
+ * ACPI spec, Revision 6.6
  * 5.2.12 Multiple APIC Description Table (MADT)
- * REF: https://github.com/riscv-non-isa/riscv-acpi/issues/15
- *      https://drive.google.com/file/d/1R6k4MshhN3WTT-hwqAquu5nX6xSEqK2l/view
- *      https://drive.google.com/file/d/1oMGPyOD58JaPgMl1pKasT-VKsIKia7zR/view
  */
 static void build_madt(GArray *table_data,
                        BIOSLinker *linker,
@@ -537,7 +534,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);
@@ -812,10 +809,8 @@ static void build_rimt(GArray *table_data, BIOSLinker *linker,
 }
 
 /*
- * ACPI spec, Revision 6.5+
+ * ACPI spec, Revision 6.6
  * 5.2.16 System Resource Affinity Table (SRAT)
- * REF: https://github.com/riscv-non-isa/riscv-acpi/issues/25
- *      https://drive.google.com/file/d/1YTdDx2IPm5IeZjAW932EYU-tUtgS08tX/view
  */
 static void
 build_srat(GArray *table_data, BIOSLinker *linker, RISCVVirtState *vms)
Signature · 1 line
2.43.0
Reviewed-by on v2 2/3
#5 lore raw

Re: [PATCH v2 2/3] hw/riscv/virt-acpi-build.c: Update FADT and MADT versions

Quoted 11 lines · 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.

Update the code comments to reflect ACPI 6.6 version details.

---

Quoted 76 lines
  hw/riscv/virt-acpi-build.c | 25 ++++++++++---------------
  1 file changed, 10 insertions(+), 15 deletions(-)
hw/riscv/virt-acpi-build.c +10 -15
index ee1416d264..f1406cb683 100644
@@ -270,11 +270,8 @@ spcr_setup(GArray *table_data, BIOSLinker *linker, RISCVVirtState *s)
  #define RHCT_NODE_ARRAY_OFFSET 56
 
  /*
- * ACPI spec, Revision 6.5+
- * 5.2.36 RISC-V Hart Capabilities Table (RHCT)
- * REF: https://github.com/riscv-non-isa/riscv-acpi/issues/16
- *      https://drive.google.com/file/d/1nP3nFiH4jkPMp6COOxP6123DCZKR-tia/view
- *      https://drive.google.com/file/d/1sKbOa8m1UZw1JkquZYe3F1zQBN1xXsaf/view
+ * ACPI spec, Revision 6.6
+ * 5.2.37 RISC-V Hart Capabilities Table (RHCT)
   */
  static void build_rhct(GArray *table_data,
                         BIOSLinker *linker,
@@ -421,7 +418,10 @@ static void build_rhct(GArray *table_data,
      acpi_table_end(linker, &table);
  }
 
-/* FADT */
+/*
+ * ACPI spec, Revision 6.6
+ * 5.2.9 Fixed ACPI Description Table (MADT)
+ */
  static void build_fadt_rev6(GArray *table_data,
                              BIOSLinker *linker,
                              RISCVVirtState *s,
@@ -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,
      };
@@ -508,11 +508,8 @@ static void build_dsdt(GArray *table_data,
  }
 
  /*
- * ACPI spec, Revision 6.5+
+ * ACPI spec, Revision 6.6
   * 5.2.12 Multiple APIC Description Table (MADT)
- * REF: https://github.com/riscv-non-isa/riscv-acpi/issues/15
- *      https://drive.google.com/file/d/1R6k4MshhN3WTT-hwqAquu5nX6xSEqK2l/view
- *      https://drive.google.com/file/d/1oMGPyOD58JaPgMl1pKasT-VKsIKia7zR/view
   */
  static void build_madt(GArray *table_data,
                         BIOSLinker *linker,
@@ -537,7 +534,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);
@@ -812,10 +809,8 @@ static void build_rimt(GArray *table_data, BIOSLinker *linker,
  }
 
  /*
- * ACPI spec, Revision 6.5+
+ * ACPI spec, Revision 6.6
   * 5.2.16 System Resource Affinity Table (SRAT)
- * REF: https://github.com/riscv-non-isa/riscv-acpi/issues/25
- *      https://drive.google.com/file/d/1YTdDx2IPm5IeZjAW932EYU-tUtgS08tX/view
   */
  static void
  build_srat(GArray *table_data, BIOSLinker *linker, RISCVVirtState *vms)
Reviewed-by on v2 2/3
#6 lore raw

Re: [PATCH v2 2/3] hw/riscv/virt-acpi-build.c: Update FADT and MADT versions

In reply to Sunil V L
Quoted 11 lines · 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.

Update the code comments to reflect ACPI 6.6 version details.

---

Thanks,
Nutty

Quoted 76 lines
  hw/riscv/virt-acpi-build.c | 25 ++++++++++---------------
  1 file changed, 10 insertions(+), 15 deletions(-)
hw/riscv/virt-acpi-build.c +10 -15
index ee1416d264..f1406cb683 100644
@@ -270,11 +270,8 @@ spcr_setup(GArray *table_data, BIOSLinker *linker, RISCVVirtState *s)
  #define RHCT_NODE_ARRAY_OFFSET 56
 
  /*
- * ACPI spec, Revision 6.5+
- * 5.2.36 RISC-V Hart Capabilities Table (RHCT)
- * REF: https://github.com/riscv-non-isa/riscv-acpi/issues/16
- *      https://drive.google.com/file/d/1nP3nFiH4jkPMp6COOxP6123DCZKR-tia/view
- *      https://drive.google.com/file/d/1sKbOa8m1UZw1JkquZYe3F1zQBN1xXsaf/view
+ * ACPI spec, Revision 6.6
+ * 5.2.37 RISC-V Hart Capabilities Table (RHCT)
   */
  static void build_rhct(GArray *table_data,
                         BIOSLinker *linker,
@@ -421,7 +418,10 @@ static void build_rhct(GArray *table_data,
      acpi_table_end(linker, &table);
  }
 
-/* FADT */
+/*
+ * ACPI spec, Revision 6.6
+ * 5.2.9 Fixed ACPI Description Table (MADT)
+ */
  static void build_fadt_rev6(GArray *table_data,
                              BIOSLinker *linker,
                              RISCVVirtState *s,
@@ -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,
      };
@@ -508,11 +508,8 @@ static void build_dsdt(GArray *table_data,
  }
 
  /*
- * ACPI spec, Revision 6.5+
+ * ACPI spec, Revision 6.6
   * 5.2.12 Multiple APIC Description Table (MADT)
- * REF: https://github.com/riscv-non-isa/riscv-acpi/issues/15
- *      https://drive.google.com/file/d/1R6k4MshhN3WTT-hwqAquu5nX6xSEqK2l/view
- *      https://drive.google.com/file/d/1oMGPyOD58JaPgMl1pKasT-VKsIKia7zR/view
   */
  static void build_madt(GArray *table_data,
                         BIOSLinker *linker,
@@ -537,7 +534,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);
@@ -812,10 +809,8 @@ static void build_rimt(GArray *table_data, BIOSLinker *linker,
  }
 
  /*
- * ACPI spec, Revision 6.5+
+ * ACPI spec, Revision 6.6
   * 5.2.16 System Resource Affinity Table (SRAT)
- * REF: https://github.com/riscv-non-isa/riscv-acpi/issues/25
- *      https://drive.google.com/file/d/1YTdDx2IPm5IeZjAW932EYU-tUtgS08tX/view
   */
  static void
  build_srat(GArray *table_data, BIOSLinker *linker, RISCVVirtState *vms)
author
#7 lore raw

PATCH v2 3/3 tests/data/acpi/riscv64: Update expected FADT and MADT

In reply to 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 "
[...]

---
 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(-)
tests/data/acpi/riscv64/virt/APIC binary +0 -0
index 66a25dfd2d6ea2b607c024722b2eab95873a01e9..3fb5b753596fc7c2618b3d5210be8b00b0c177f6 100644
GIT binary patch
tests/data/acpi/riscv64/virt/FACP binary +0 -0
index a5276b65ea8ce46cc9b40d96d98f0669c9089ed4..78e1b14b1d4ff0533a6a4c041f195a69b4ef114d 100644
GIT binary patch
tests/qtest/bios-tables-test-allowed-diff.h +0 -2
index 0c3f7a6cac..dfb8523c8b 100644
@@ -1,3 +1 @@
 /* List of comma-separated changed AML files to ignore */
-"tests/data/acpi/riscv64/virt/APIC",
-"tests/data/acpi/riscv64/virt/FACP",
Signature · 1 line
2.43.0
Reviewed-by on v2 3/3
#8 lore raw

Re: [PATCH v2 3/3] tests/data/acpi/riscv64: Update expected FADT and MADT

Quoted 68 lines · 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

(quoted diff) +3 -3
@@ -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    "
[...]
Quoted 3 lines

---

Quoted 31 lines
  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(-)
tests/data/acpi/riscv64/virt/APIC binary +0 -0
index 66a25dfd2d6ea2b607c024722b2eab95873a01e9..3fb5b753596fc7c2618b3d5210be8b00b0c177f6 100644
GIT binary patch
tests/data/acpi/riscv64/virt/FACP binary +0 -0
index a5276b65ea8ce46cc9b40d96d98f0669c9089ed4..78e1b14b1d4ff0533a6a4c041f195a69b4ef114d 100644
GIT binary patch
tests/qtest/bios-tables-test-allowed-diff.h +0 -2
index 0c3f7a6cac..dfb8523c8b 100644
@@ -1,3 +1 @@
  /* List of comma-separated changed AML files to ignore */
-"tests/data/acpi/riscv64/virt/APIC",
-"tests/data/acpi/riscv64/virt/FACP",
Reviewed-by on v2 3/3
#9 lore raw

Re: [PATCH v2 3/3] tests/data/acpi/riscv64: Update expected FADT and MADT

In reply to Sunil V L
Quoted 68 lines · 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

(quoted diff) +3 -3
@@ -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    "
[...]
Quoted 3 lines

---

Thanks,
Nutty

Quoted 31 lines
  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(-)
tests/data/acpi/riscv64/virt/APIC binary +0 -0
index 66a25dfd2d6ea2b607c024722b2eab95873a01e9..3fb5b753596fc7c2618b3d5210be8b00b0c177f6 100644
GIT binary patch
tests/data/acpi/riscv64/virt/FACP binary +0 -0
index a5276b65ea8ce46cc9b40d96d98f0669c9089ed4..78e1b14b1d4ff0533a6a4c041f195a69b4ef114d 100644
GIT binary patch
tests/qtest/bios-tables-test-allowed-diff.h +0 -2
index 0c3f7a6cac..dfb8523c8b 100644
@@ -1,3 +1 @@
  /* List of comma-separated changed AML files to ignore */
-"tests/data/acpi/riscv64/virt/APIC",
-"tests/data/acpi/riscv64/virt/FACP",
#10 lore raw
In reply to Sunil V L
Quoted 4 lines · Sunil V L

Since RISC-V support is added only in ACPI 6.6, it should adhere to the expected FADT and MADT versions. Update them.

Quoted 8 lines

Changes since v1:
1) Updated code comments to reflect ACPI 6.6 chapter number.
2) Added Michael's Ack.

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

Thanks!

Applied to riscv-to-apply.next

Alistair

Quoted 10 lines
 hw/riscv/virt-acpi-build.c        |  25 ++++++++++---------------
 tests/data/acpi/riscv64/virt/APIC | Bin 116 -> 116 bytes
 tests/data/acpi/riscv64/virt/FACP | Bin 276 -> 276 bytes
 3 files changed, 10 insertions(+), 15 deletions(-)

--
2.43.0