diff options
| author | Sarah Walker <Sarah.Walker2@arm.com> | 2026-06-29 15:45:41 +0300 |
|---|---|---|
| committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2026-09-15 13:12:13 +0300 |
| commit | ce755c8f1bb408f3a640a48903cd250371efdbb0 (patch) | |
| tree | 42b401f347d671ac4b6590a11018ac7d4c872af3 /ShellPkg/Library/UefiShellAcpiViewCommandLib | |
| parent | 4841acc4822e873df65787a481eb2a124a5217c6 (diff) | |
| download | edk2-ce755c8f1bb408f3a640a48903cd250371efdbb0.tar.xz | |
ShellPkg: AcpiView: add support for GICv5 MADT table
Add support for printing GICv5-related fields with acpiview
in the MADT table.
Signed-off-by: Sarah Walker <Sarah.Walker2@arm.com>
Diffstat (limited to 'ShellPkg/Library/UefiShellAcpiViewCommandLib')
| -rw-r--r-- | ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtParser.c | 95 |
1 files changed, 91 insertions, 4 deletions
diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtParser.c index 8f0a454cc4..66ff009c9e 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtParser.c @@ -1,7 +1,7 @@ /** @file
MADT table parser
- Copyright (c) 2016 - 2024, Arm Limited. All rights reserved.
+ Copyright (c) 2016 - 2026, Arm Limited. All rights reserved.
Copyright (c) 2022, AMD Incorporated. All rights reserved.
Copyright (c) 2024, Loongson Technology Corporation Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -84,7 +84,7 @@ ValidateSpeOverflowInterrupt ( IncrementErrorCount ();
Print (
L"\nERROR: SPE Overflow Interrupt ID of %d is not in the allowed PPI ID "
- L"ranges of %d-%d or %d-%d (for GICv3.1 or later).",
+ L"ranges of %d-%d or %d-%d (for GICv3.1 - 4).",
SpeOverflowInterrupt,
ARM_PPI_ID_MIN,
ARM_PPI_ID_MAX,
@@ -136,7 +136,7 @@ ValidateTrbeInterrupt ( IncrementErrorCount ();
Print (
L"\nERROR: TRBE Interrupt ID of %d is not in the allowed PPI ID "
- L"ranges of %d-%d or %d-%d (for GICv3.1 or later).",
+ L"ranges of %d-%d or %d-%d (for GICv3.1 - 4).",
TrbeInterrupt,
ARM_PPI_ID_MIN,
ARM_PPI_ID_MAX,
@@ -238,7 +238,9 @@ STATIC CONST ACPI_PARSER GicCParser[] = { { L"SPE overflow Interrupt", 2, 78, L"0x%x", NULL, NULL,
ValidateSpeOverflowInterrupt, NULL },
{ L"TRBE Interrupt", 2, 80, L"0x%x", NULL, NULL,
- ValidateTrbeInterrupt, NULL }
+ ValidateTrbeInterrupt, NULL },
+ { L"IAFFID", 2, 82, L"0x%x", NULL, NULL, NULL, NULL },
+ { L"IrsID", 4, 84, L"0x%x", NULL, NULL, NULL, NULL },
};
/**
@@ -486,6 +488,49 @@ STATIC CONST ACPI_PARSER LpcPic[] = { };
/**
+ An ACPI_PARSER array describing the GIC IRS Interrupt Controller Structure.
+**/
+STATIC CONST ACPI_PARSER GicIrsParser[] = {
+ { L"Type", 1, 0, L"0x%x", NULL, NULL, NULL, NULL },
+ { L"Length", 1, 1, L"%d", NULL, NULL, NULL, NULL },
+ { L"GIC Version", 1, 2, L"%d", NULL, NULL, NULL, NULL },
+ { L"Reserved", 1, 3, L"0x%x", NULL, NULL, NULL, NULL },
+
+ { L"GIC IRS ID", 4, 4, L"0x%x", NULL, NULL, NULL, NULL },
+ { L"Flags", 4, 8, L"0x%x", NULL, NULL, NULL, NULL },
+ { L"Reserved", 4, 12, L"0x%x", NULL, NULL, NULL, NULL },
+ { L"IRS Config Frame Base", 8, 16, L"0x%lx", NULL, NULL, NULL, NULL },
+ { L"IRS Set LPI Frame Base", 8, 24, L"0x%lx", NULL, NULL, NULL, NULL }
+};
+
+/**
+ An ACPI_PARSER array describing the GIC ITSv5 Interrupt Controller Structure.
+**/
+STATIC CONST ACPI_PARSER GicItsV5Parser[] = {
+ { L"Type", 1, 0, L"0x%x", NULL, NULL, NULL, NULL },
+ { L"Length", 1, 1, L"%d", NULL, NULL, NULL, NULL },
+ { L"Flags", 1, 2, L"0x%x", NULL, NULL, NULL, NULL },
+ { L"Reserved", 1, 3, L"0x%x", NULL, NULL, NULL, NULL },
+
+ { L"GIC ITS ID", 4, 4, L"0x%x", NULL, NULL, NULL, NULL },
+ { L"Physical Base Address", 8, 8, L"0x%lx", NULL, NULL, NULL, NULL },
+};
+
+/**
+ An ACPI_PARSER array describing the GIC ITSv5 Translate Frame Structure.
+**/
+STATIC CONST ACPI_PARSER GicItsV5TranslateFrameParser[] = {
+ { L"Type", 1, 0, L"0x%x", NULL, NULL, NULL, NULL },
+ { L"Length", 1, 1, L"%d", NULL, NULL, NULL, NULL },
+ { L"Reserved", 2, 2, L"0x%x", NULL, NULL, NULL, NULL },
+
+ { L"Linked GIC ITS ID", 4, 4, L"0x%x", NULL, NULL, NULL, NULL },
+ { L"ITS Translate Frame ID", 4, 8, L"0x%x", NULL, NULL, NULL, NULL },
+ { L"Reserved", 4, 12, L"0x%x", NULL, NULL, NULL, NULL },
+ { L"ITS Translate Frame Base Address", 8, 16, L"0x%lx", NULL, NULL, NULL, NULL }
+};
+
+/**
An ACPI_PARSER array describing the ACPI MADT Table.
**/
STATIC CONST ACPI_PARSER MadtParser[] = {
@@ -517,6 +562,9 @@ STATIC CONST ACPI_PARSER MadtInterruptControllerHeaderParser[] = { - GIC MSI Frame
- GICR
- GIC ITS
+ - GIC IRS
+ - GIC ITSv5
+ - GIC ITSv5 translate frame
This function also performs validation of the ACPI table fields.
@@ -823,6 +871,45 @@ ParseAcpiMadt ( break;
}
+ case EFI_ACPI_6_7_GIC_IRS:
+ {
+ ParseAcpi (
+ TRUE,
+ 2,
+ "GIC IRS",
+ InterruptContollerPtr,
+ *MadtInterruptControllerLength,
+ PARSER_PARAMS (GicIrsParser)
+ );
+ break;
+ }
+
+ case EFI_ACPI_6_7_GIC_ITSV5:
+ {
+ ParseAcpi (
+ TRUE,
+ 2,
+ "GIC ITSv5",
+ InterruptContollerPtr,
+ *MadtInterruptControllerLength,
+ PARSER_PARAMS (GicItsV5Parser)
+ );
+ break;
+ }
+
+ case EFI_ACPI_6_7_GIC_ITSV5_TRANSLATE_FRAME:
+ {
+ ParseAcpi (
+ TRUE,
+ 2,
+ "GIC ITSv5 Translate Frame",
+ InterruptContollerPtr,
+ *MadtInterruptControllerLength,
+ PARSER_PARAMS (GicItsV5TranslateFrameParser)
+ );
+ break;
+ }
+
default:
{
IncrementErrorCount ();
|
