[PATCH v2 1/7] ACPICA: Add GICv5 MADT structures

Lorenzo Pieralisi
2025-12-18T10:15:09Z

From: Jose Marinho <jose.marinho@arm.com>

The GICv5 adds the following MADT structures:
- IRS
- ITS Config Frame
- ITS Translate Frame

The ACPI spec ECR is at https://github.com/tianocore/edk2/issues/11148

Link: https://github.com/acpica/acpica/commit/69cca52d
Signed-off-by: Jose Marinho <jose.marinho@arm.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
---
include/acpi/actbl2.h | 49 +++++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 45 insertions(+), 4 deletions(-)

diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h
index f726bce3eb84..fdabc6c64a9c 100644
--- a/include/acpi/actbl2.h
+++ b/include/acpi/actbl2.h
@@ -1167,7 +1167,10 @@ enum acpi_madt_type {
ACPI_MADT_TYPE_IMSIC = 25,
ACPI_MADT_TYPE_APLIC = 26,
ACPI_MADT_TYPE_PLIC = 27,
- ACPI_MADT_TYPE_RESERVED = 28, /* 28 to 0x7F are reserved */
+ ACPI_MADT_TYPE_GICV5_IRS = 28,
+ ACPI_MADT_TYPE_GICV5_ITS = 29,
+ ACPI_MADT_TYPE_GICV5_ITS_TRANSLATE = 30,
+ ACPI_MADT_TYPE_RESERVED = 31, /* 31 to 0x7F are reserved */
ACPI_MADT_TYPE_OEM_RESERVED = 0x80 /* 0x80 to 0xFF are reserved for OEM use */
};

@@ -1289,7 +1292,7 @@ struct acpi_madt_local_x2apic_nmi {
u8 reserved[3]; /* reserved - must be zero */
};

-/* 11: Generic interrupt - GICC (ACPI 5.0 + ACPI 6.0 + ACPI 6.3 + ACPI 6.5 changes) */
+/* 11: Generic interrupt - GICC (ACPI 5.0 + ACPI 6.0 + ACPI 6.3 + ACPI 6.5 + ACPI 6.7 changes) */

struct acpi_madt_generic_interrupt {
struct acpi_subtable_header header;
@@ -1310,6 +1313,8 @@ struct acpi_madt_generic_interrupt {
u8 reserved2[1];
u16 spe_interrupt; /* ACPI 6.3 */
u16 trbe_interrupt; /* ACPI 6.5 */
+ u16 iaffid; /* ACPI 6.7 */
+ u32 irs_id;
};

/* Masks for Flags field above */
@@ -1332,7 +1337,7 @@ struct acpi_madt_generic_distributor {
u8 reserved2[3]; /* reserved - must be zero */
};

-/* Values for Version field above */
+/* Values for Version field above and Version field in acpi_madt_gicv5_irs */

enum acpi_madt_gic_version {
ACPI_MADT_GIC_VERSION_NONE = 0,
@@ -1340,7 +1345,8 @@ enum acpi_madt_gic_version {
ACPI_MADT_GIC_VERSION_V2 = 2,
ACPI_MADT_GIC_VERSION_V3 = 3,
ACPI_MADT_GIC_VERSION_V4 = 4,
- ACPI_MADT_GIC_VERSION_RESERVED = 5 /* 5 and greater are reserved */
+ ACPI_MADT_GIC_VERSION_V5 = 5,
+ ACPI_MADT_GIC_VERSION_RESERVED = 6 /* 6 and greater are reserved */
};

/* 13: Generic MSI Frame (ACPI 5.1) */
@@ -1611,6 +1617,41 @@ struct acpi_madt_plic {
u32 gsi_base;
};

+/* 28: Arm GICv5 IRS (ACPI 6.7) */
+struct acpi_madt_gicv5_irs {
+ struct acpi_subtable_header header;
+ u8 version;
+ u8 reserved;
+ u32 irs_id;
+ u32 flags;
+ u32 reserved2;
+ u64 config_base_address;
+ u64 setlpi_base_address;
+};
+
+#define ACPI_MADT_IRS_NON_COHERENT (1)
+
+/* 29: Arm GICv5 ITS Config Frame (ACPI 6.7) */
+struct acpi_madt_gicv5_translator {
+ struct acpi_subtable_header header;
+ u8 flags;
+ u8 reserved; /* reserved - must be zero */
+ u32 translator_id;
+ u64 base_address;
+};
+
+#define ACPI_MADT_GICV5_ITS_NON_COHERENT (1)
+
+/* 30: Arm GICv5 ITS Translate Frame (ACPI 6.7) */
+struct acpi_madt_gicv5_translate_frame {
+ struct acpi_subtable_header header;
+ u16 reserved; /* reserved - must be zero */
+ u32 linked_translator_id;
+ u32 translate_frame_id;
+ u32 reserved2;
+ u64 base_address;
+};
+
/* 80: OEM data */

struct acpi_madt_oem_data {

--
2.50.1