diff mbox series

acpi: update fadt and madt revisions to ACPI 6.5

Message ID 20230713063054.34674-1-ivan.hu@canonical.com
State Accepted
Headers show
Series acpi: update fadt and madt revisions to ACPI 6.5 | expand

Commit Message

ivanhu July 13, 2023, 6:30 a.m. UTC
BugLink: https://bugs.launchpad.net/ubuntu/+source/fwts/+bug/2026305

Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
---
 src/acpi/madt/madt.c        | 16 ++++++++++++++--
 src/lib/include/fwts_acpi.h | 12 ++++++++++--
 2 files changed, 24 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/src/acpi/madt/madt.c b/src/acpi/madt/madt.c
index 973cf6b8..05f93ed8 100644
--- a/src/acpi/madt/madt.c
+++ b/src/acpi/madt/madt.c
@@ -118,11 +118,11 @@ 
 
 #define FADT_MAX_MAJOR_REVISION	((uint8_t)((FWTS_ACPI_VERSION_NOW & 0xF00) >> 8))
 #define FADT_MAX_MINOR_REVISION	((uint8_t)(FWTS_ACPI_VERSION_NOW & 0xF0) >> 4)
-#define MADT_MAX_REVISION	((uint8_t)5)
+#define MADT_MAX_REVISION	((uint8_t)6)
 
 #define SUBTABLE_UNDEFINED	0x00
 #define SUBTABLE_VARIABLE	0xff
-#define NUM_SUBTABLE_TYPES	16
+#define NUM_SUBTABLE_TYPES	24
 #define MAX_IO_APIC_ID		256 /* IO APIC ID field is 1 byte */
 
 #define SBBR_ACPI_MAJOR_VERSION 6
@@ -238,6 +238,18 @@  static struct acpi_madt_subtable_lengths spec_info[] = {
 		.lengths = { 8, 12, 10, 8, 6, 12, 16, SUBTABLE_VARIABLE,
 			     16, 16, 12, 80, 24, 24, 16, 20 }
 	},
+	{ /* for ACPI 6.5 */
+		.major_version = 6,
+		.minor_version = 5,
+		.madt_version = 6,
+		.num_types = 24,
+		.lengths = { 8, 12, 10, 8, 6, 12, 16, SUBTABLE_VARIABLE,
+			     16, 16, 12, 82, 24, 24, 16, 20, 16,
+			     SUBTABLE_VARIABLE, SUBTABLE_VARIABLE,
+			     SUBTABLE_VARIABLE, SUBTABLE_VARIABLE,
+			     SUBTABLE_VARIABLE, SUBTABLE_VARIABLE,
+			     SUBTABLE_VARIABLE }
+	},
 	{ /* terminator */
 		.major_version = 0,
 		.minor_version = 0,
diff --git a/src/lib/include/fwts_acpi.h b/src/lib/include/fwts_acpi.h
index 9c3aa9fd..8b85fac2 100644
--- a/src/lib/include/fwts_acpi.h
+++ b/src/lib/include/fwts_acpi.h
@@ -87,8 +87,9 @@ 
 #define FWTS_GAS_ADDR_SPACE_ID_PCC		(0x0a)
 #define FWTS_GAS_ADDR_SPACE_ID_FFH		(0x7f)
 
-#define FWTS_ACPI_VERSION_NOW	(FWTS_ACPI_VERSION_64)
-#define FWTS_ACPI_VERSION_NEXT	(0x650)
+#define FWTS_ACPI_VERSION_NOW	(FWTS_ACPI_VERSION_65)
+#define FWTS_ACPI_VERSION_NEXT	(0x660)
+#define FWTS_ACPI_VERSION_65	(0x650)
 #define FWTS_ACPI_VERSION_64 	(0x640)
 #define FWTS_ACPI_VERSION_63 	(0x630)
 #define FWTS_ACPI_VERSION_62 	(0x620)
@@ -523,6 +524,13 @@  typedef enum {
 	FWTS_MADT_GIC_R_REDISTRIBUTOR,
 	FWTS_MADT_GIC_ITS,
 	FWTS_MADT_MP_WAKEUP,
+	FWTS_MADT_CORE_PIC,
+	FWTS_MADT_LIO_PIC,
+	FWTS_MADT_HT_PIC,
+	FWTS_MADT_EIO_PIC,
+	FWTS_MADT_MSI_PIC,
+	FWTS_MADT_BIO_PIC,
+	FWTS_MADT_LPC_PIC,
 	FWTS_MADT_RESERVED, /* does not have defined structure */
 	FWTS_MADT_OEM /* does not have defined structure */
 } fwts_acpi_madt_type;