45 if (*(UINT32 *)Ptr != 0) {
48 L
"\nERROR: System Vector Base must be zero."
70 UINT16 SpeOverflowInterrupt;
72 SpeOverflowInterrupt = *(UINT16 *)Ptr;
75 if (SpeOverflowInterrupt == 0) {
79 if ((SpeOverflowInterrupt < ARM_PPI_ID_MIN) ||
81 (SpeOverflowInterrupt < ARM_PPI_ID_EXTENDED_MIN)) ||
82 (SpeOverflowInterrupt > ARM_PPI_ID_EXTENDED_MAX))
86 L
"\nERROR: SPE Overflow Interrupt ID of %d is not in the allowed PPI ID "
87 L
"ranges of %d-%d or %d-%d (for GICv3.1 or later).",
91 ARM_PPI_ID_EXTENDED_MIN,
92 ARM_PPI_ID_EXTENDED_MAX
94 }
else if (SpeOverflowInterrupt != ARM_PPI_ID_PMBIRQ) {
97 L
"\nWARNING: SPE Overflow Interrupt ID of %d is not compliant with SBSA "
98 L
"Level 3 PPI ID assignment: %d.",
122 UINT16 TrbeInterrupt;
124 TrbeInterrupt = *(UINT16 *)Ptr;
127 if (TrbeInterrupt == 0) {
131 if ((TrbeInterrupt < ARM_PPI_ID_MIN) ||
133 (TrbeInterrupt < ARM_PPI_ID_EXTENDED_MIN)) ||
134 (TrbeInterrupt > ARM_PPI_ID_EXTENDED_MAX))
138 L
"\nERROR: TRBE Interrupt ID of %d is not in the allowed PPI ID "
139 L
"ranges of %d-%d or %d-%d (for GICv3.1 or later).",
143 ARM_PPI_ID_EXTENDED_MIN,
144 ARM_PPI_ID_EXTENDED_MAX
165 IN UINT32 Length OPTIONAL
170 CONST CHAR16 *Format_Alt;
173 Format_Alt = Format + Len + 1;
174 Value = *(UINT32 *)Ptr;
176 Print (L
"%s", Value ? Format : Format_Alt);
181 { L
"Performance Inter. Mode", 1, 1, L
"Level Triggered\0Edge Triggered",
DumpValue,
NULL,
NULL,
NULL },
182 { L
"VGIC Maintenance Inter. Mode", 1, 2, L
"Level Triggered\0Edge Triggered",
DumpValue,
NULL,
NULL,
NULL },
199 IN CONST CHAR16 *Format OPTIONAL,
201 IN UINT32 Length OPTIONAL
204 Print (L
"0x%X\n", *(UINT32 *)Ptr);
236 { L
"Processor Power Efficiency Class", 1, 76, L
"0x%x",
NULL,
NULL,
NULL,
NULL },
238 { L
"SPE overflow Interrupt", 2, 78, L
"0x%x",
NULL,
NULL,
240 { L
"TRBE Interrupt", 2, 80, L
"0x%x",
NULL,
NULL,
254 { L
"System Vector Base", 4, 16, L
"0x%x",
NULL,
NULL,
284 { L
"Discovery Range Base Address", 8, 4, L
"0x%lx",
NULL,
NULL,
NULL,
343 IN CONST CHAR16 *Format OPTIONAL,
348 if (Format !=
NULL) {
349 Print (Format, *(UINT32 *)Ptr);
353 Print (L
"0x%X\n", *(UINT32 *)Ptr);
493 { L
"Local Interrupt Controller Address",4, 36, L
"0x%x",
NULL,
NULL,
NULL,
503 { L
"Length", 1, 1,
NULL,
NULL, (VOID **)&MadtInterruptControllerLength,
NULL,
533 IN UINT32 AcpiTableLength,
534 IN UINT8 AcpiTableRevision
538 UINT8 *InterruptContollerPtr;
555 InterruptContollerPtr = Ptr + Offset;
557 while (Offset < AcpiTableLength) {
563 InterruptContollerPtr,
564 AcpiTableLength - Offset,
570 if ((MadtInterruptControllerType ==
NULL) ||
571 (MadtInterruptControllerLength ==
NULL))
575 L
"ERROR: Insufficient remaining table buffer length to read the " \
576 L
"Interrupt Controller Structure header. Length = %d.\n",
577 AcpiTableLength - Offset
583 if ((*MadtInterruptControllerLength == 0) ||
584 ((Offset + (*MadtInterruptControllerLength)) > AcpiTableLength))
588 L
"ERROR: Invalid Interrupt Controller Structure length. " \
589 L
"Length = %d. Offset = %d. AcpiTableLength = %d.\n",
590 *MadtInterruptControllerLength,
597 switch (*MadtInterruptControllerType) {
598 case EFI_ACPI_6_3_GIC:
604 InterruptContollerPtr,
605 *MadtInterruptControllerLength,
611 case EFI_ACPI_6_3_GICD:
613 if (++GICDCount > 1) {
616 L
"ERROR: Only one GICD must be present,"
617 L
" GICDCount = %d\n",
626 InterruptContollerPtr,
627 *MadtInterruptControllerLength,
633 case EFI_ACPI_6_3_GIC_MSI_FRAME:
639 InterruptContollerPtr,
640 *MadtInterruptControllerLength,
646 case EFI_ACPI_6_3_GICR:
652 InterruptContollerPtr,
653 *MadtInterruptControllerLength,
659 case EFI_ACPI_6_3_GIC_ITS:
665 InterruptContollerPtr,
666 *MadtInterruptControllerLength,
672 case EFI_ACPI_6_3_IO_APIC:
678 InterruptContollerPtr,
679 *MadtInterruptControllerLength,
685 case EFI_ACPI_6_3_INTERRUPT_SOURCE_OVERRIDE:
690 "INTERRUPT SOURCE OVERRIDE",
691 InterruptContollerPtr,
692 *MadtInterruptControllerLength,
697 case EFI_ACPI_6_3_PROCESSOR_LOCAL_APIC:
702 "PROCESSOR LOCAL APIC",
703 InterruptContollerPtr,
704 *MadtInterruptControllerLength,
709 case EFI_ACPI_6_3_PROCESSOR_LOCAL_X2APIC:
714 "PROCESSOR LOCAL X2APIC",
715 InterruptContollerPtr,
716 *MadtInterruptControllerLength,
722 case EFI_ACPI_6_3_LOCAL_X2APIC_NMI:
728 InterruptContollerPtr,
729 *MadtInterruptControllerLength,
735 case EFI_ACPI_6_5_CORE_PIC:
741 InterruptContollerPtr,
742 *MadtInterruptControllerLength,
748 case EFI_ACPI_6_5_LIO_PIC:
754 InterruptContollerPtr,
755 *MadtInterruptControllerLength,
761 case EFI_ACPI_6_5_HT_PIC:
767 InterruptContollerPtr,
768 *MadtInterruptControllerLength,
774 case EFI_ACPI_6_5_EIO_PIC:
780 InterruptContollerPtr,
781 *MadtInterruptControllerLength,
787 case EFI_ACPI_6_5_MSI_PIC:
793 InterruptContollerPtr,
794 *MadtInterruptControllerLength,
800 case EFI_ACPI_6_5_BIO_PIC:
806 InterruptContollerPtr,
807 *MadtInterruptControllerLength,
813 case EFI_ACPI_6_5_LPC_PIC:
819 InterruptContollerPtr,
820 *MadtInterruptControllerLength,
830 L
"ERROR: Unknown Interrupt Controller Structure,"
831 L
" Type = %d, Length = %d\n",
832 *MadtInterruptControllerType,
833 *MadtInterruptControllerLength
838 InterruptContollerPtr += *MadtInterruptControllerLength;
839 Offset += *MadtInterruptControllerLength;
VOID EFIAPI IncrementWarningCount(VOID)
VOID EFIAPI Dump3Chars(IN CONST CHAR16 *Format OPTIONAL, IN UINT8 *Ptr, IN UINT32 Length)
VOID EFIAPI IncrementErrorCount(VOID)
UINT32 EFIAPI ParseAcpi(IN BOOLEAN Trace, IN UINT32 Indent, IN CONST CHAR8 *AsciiName OPTIONAL, IN UINT8 *Ptr, IN UINT32 Length, IN CONST ACPI_PARSER *Parser, IN UINT32 ParserItems)
UINT32 EFIAPI ParseAcpiBitFields(IN BOOLEAN Trace, IN UINT32 Indent, IN CONST CHAR8 *AsciiName OPTIONAL, IN UINT8 *Ptr, IN UINT32 Length, IN CONST ACPI_PARSER *Parser, IN UINT32 ParserItems)
#define PARSER_PARAMS(Parser)
#define PARSE_ACPI_HEADER(Info)
UINTN EFIAPI StrLen(IN CONST CHAR16 *String)
STATIC CONST ACPI_PARSER GicRParser[]
STATIC CONST ACPI_PARSER GicCParser[]
STATIC VOID EFIAPI ValidateSpeOverflowInterrupt(IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context)
STATIC CONST ACPI_PARSER CorePic[]
VOID EFIAPI ParseAcpiMadt(IN BOOLEAN Trace, IN UINT8 *Ptr, IN UINT32 AcpiTableLength, IN UINT8 AcpiTableRevision)
STATIC CONST ACPI_PARSER MadtParser[]
STATIC CONST ACPI_PARSER InterruptSourceOverride[]
STATIC CONST ACPI_PARSER GicDParser[]
STATIC CONST ACPI_PARSER LocalX2ApicNmi[]
STATIC CONST ACPI_PARSER MadtInterruptControllerHeaderParser[]
STATIC CONST ACPI_PARSER LegacyIoPic[]
STATIC CONST ACPI_PARSER BridgeIoPic[]
STATIC VOID EFIAPI DumpGicCFlags(IN CONST CHAR16 *Format OPTIONAL, IN UINT8 *Ptr, IN UINT32 Length OPTIONAL)
STATIC CONST ACPI_PARSER IoApic[]
STATIC CONST ACPI_PARSER ProcessorLocalApic[]
STATIC CONST ACPI_PARSER MsiPic[]
STATIC VOID EFIAPI ValidateGICDSystemVectorBase(IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context)
STATIC CONST ACPI_PARSER ProcessorLocalX2Apic[]
STATIC CONST ACPI_PARSER LpcPic[]
STATIC CONST ACPI_PARSER GicMSIFrameParser[]
STATIC VOID EFIAPI DumpValue(IN CONST CHAR16 *Format, IN UINT8 *Ptr, IN UINT32 Length OPTIONAL)
STATIC CONST ACPI_PARSER GicITSParser[]
STATIC CONST ACPI_PARSER ExtendIoPic[]
STATIC CONST ACPI_PARSER HyperTransportPic[]
VOID EFIAPI DumpLocalApicBitFlags(IN CONST CHAR16 *Format OPTIONAL, IN UINT8 *Ptr, IN UINT32 Length)
STATIC VOID EFIAPI ValidateTrbeInterrupt(IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context)
UINTN EFIAPI Print(IN CONST CHAR16 *Format,...)