23STATIC UINT16 *AestNodeLength;
24STATIC UINT32 *NodeDataOffset;
25STATIC UINT32 *NodeInterfaceOffset;
26STATIC UINT32 *NodeInterruptArrayOffset;
27STATIC UINT32 *NodeInterruptCount;
29STATIC UINT8 *ProcessorFlags;
30STATIC UINT8 *ProcessorResourceType;
51 if (((*Ptr & 0x3) != 0) && (*ProcessorId != 0)) {
54 L
"\nERROR: 'ACPI Processor ID' field must be set to 0 for global"
77 UINT32 GicInterfaceType;
79 GicInterfaceType = *(UINT32 *)Ptr;
80 if (GicInterfaceType > 3) {
82 Print (L
"\nError: Invalid GIC Interface type %d", GicInterfaceType);
105 Print (L
"\nError: Interface type should be 0 or 1");
128 Print (L
"\nError: Interrupt type should be 0 or 1");
149 if ((*Ptr & 0xfe) != 0) {
151 Print (L
"\nError: Reserved Flag bits not set to 0");
165 IN CONST CHAR16 *Format OPTIONAL,
171 L
"%02X %02X %02X %02X %02X %02X %02X %02X\n",
183 L
"%*a %02X %02X %02X %02X %02X %02X %02X %02X",
184 OUTPUT_FIELD_COLUMN_WIDTH,
208 { L
"Type", 1, 0, L
"%d",
NULL, (VOID **)&AestNodeType,
NULL,
NULL },
209 { L
"Length", 2, 1, L
"%d",
NULL, (VOID **)&AestNodeLength,
NULL,
NULL },
211 { L
"Node Data Offset", 4, 4, L
"%d",
NULL, (VOID **)&NodeDataOffset,
NULL,
NULL },
212 { L
"Node Interface Offset", 4, 8, L
"%d",
NULL,
213 (VOID **)&NodeInterfaceOffset,
NULL,
NULL },
214 { L
"Node Interrupt Array Offset", 4, 12, L
"%d",
NULL,
215 (VOID **)&NodeInterruptArrayOffset,
NULL,
NULL },
216 { L
"Node Interrupt Count", 4, 16, L
"%d",
NULL,
217 (VOID **)&NodeInterruptCount,
NULL,
NULL },
220 { L
"Error Injection Countdown Rate", 8, 36, L
"%ld",
NULL,
NULL,
NULL,
NULL }
230 { L
"ACPI Processor ID", 4, 0, L
"0x%x",
NULL, (VOID **)&ProcessorId,
NULL,
NULL },
231 { L
"Resource Type", 1, 4, L
"%d",
NULL, (VOID **)&ProcessorResourceType,
NULL,
234 { L
"Flags", 1, 6, L
"0x%x",
NULL, (VOID **)&ProcessorFlags,
237 { L
"Processor Affinity Level Indicator", 8, 8, L
"0x%lx",
NULL,
NULL,
NULL,
352 if ((ProcessorId ==
NULL) ||
353 (ProcessorResourceType ==
NULL) ||
354 (ProcessorFlags ==
NULL))
358 L
"ERROR: Insufficient Processor Error Node length. Length = %d.\n",
364 switch (*ProcessorResourceType) {
365 case EFI_ACPI_AEST_PROCESSOR_RESOURCE_TYPE_CACHE:
375 case EFI_ACPI_AEST_PROCESSOR_RESOURCE_TYPE_TLB:
385 case EFI_ACPI_AEST_PROCESSOR_RESOURCE_TYPE_GENERIC:
397 Print (L
"ERROR: Invalid Processor Resource Type.");
529 IN UINT32 InterruptCount
539 L
"ERROR: Node not long enough for Interrupt Array.\n" \
540 L
" Length left = %d, Required = %d, Interrupt Count = %d\n",
549 for (Index = 0; Index < InterruptCount; Index++) {
553 "Node Interrupt [%d]",
585 IN UINT32 DataOffset,
586 IN UINT32 InterfaceOffset,
587 IN UINT32 InterruptArrayOffset,
588 IN UINT32 InterruptCount
592 UINT32 RemainingLength;
604 if ((Offset > DataOffset) || (DataOffset > Length)) {
607 L
"ERROR: Invalid Node Data Offset: %d.\n" \
608 L
" It should be between %d and %d.\n",
615 if ((Offset > InterfaceOffset) || (InterfaceOffset > Length)) {
618 L
"ERROR: Invalid Node Interface Offset: %d.\n" \
619 L
" It should be between %d and %d.\n",
626 if ((Offset > InterruptArrayOffset) || (InterruptArrayOffset > Length)) {
629 L
"ERROR: Invalid Node Interrupt Array Offset: %d.\n" \
630 L
" It should be between %d and %d.\n",
631 InterruptArrayOffset,
638 NodeDataPtr = Ptr + DataOffset;
639 RemainingLength = Length - DataOffset;
641 case EFI_ACPI_AEST_NODE_TYPE_PROCESSOR:
644 case EFI_ACPI_AEST_NODE_TYPE_MEMORY:
647 case EFI_ACPI_AEST_NODE_TYPE_SMMU:
650 case EFI_ACPI_AEST_NODE_TYPE_VENDOR_DEFINED:
653 case EFI_ACPI_AEST_NODE_TYPE_GIC:
658 Print (L
"ERROR: Invalid Error Node Type.\n");
664 Ptr + InterfaceOffset,
665 Length - InterfaceOffset
670 Ptr + InterruptArrayOffset,
671 Length - InterruptArrayOffset,
695 IN UINT32 AcpiTableLength,
696 IN UINT8 AcpiTableRevision
715 while (Offset < AcpiTableLength) {
716 NodePtr = Ptr + Offset;
723 AcpiTableLength - Offset,
729 if ((AestNodeType ==
NULL) ||
730 (AestNodeLength ==
NULL) ||
731 (NodeDataOffset ==
NULL) ||
732 (NodeInterfaceOffset ==
NULL) ||
733 (NodeInterruptArrayOffset ==
NULL) ||
734 (NodeInterruptCount ==
NULL))
738 L
"ERROR: Insufficient length left for Node Structure.\n" \
739 L
" Length left = %d.\n",
740 AcpiTableLength - Offset
746 if ((*AestNodeLength == 0) ||
747 ((Offset + (*AestNodeLength)) > AcpiTableLength))
751 L
"ERROR: Invalid AEST Node length. " \
752 L
"Length = %d. Offset = %d. AcpiTableLength = %d.\n",
765 *NodeInterfaceOffset,
766 *NodeInterruptArrayOffset,
770 Offset += *AestNodeLength;
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)
#define PARSER_PARAMS(Parser)
#define PARSE_ACPI_HEADER(Info)
STATIC CONST ACPI_PARSER AestNodeInterface[]
STATIC CONST ACPI_PARSER AestNodeHeaderParser[]
STATIC VOID DumpSmmuNode(IN UINT8 *Ptr, IN UINT32 Length)
STATIC CONST ACPI_PARSER AestParser[]
STATIC VOID DumpAestNodeStructure(IN UINT8 *Ptr, IN UINT32 Length, IN UINT8 NodeType, IN UINT32 DataOffset, IN UINT32 InterfaceOffset, IN UINT32 InterruptArrayOffset, IN UINT32 InterruptCount)
STATIC VOID EFIAPI ValidateInterruptFlags(IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context)
STATIC VOID EFIAPI ValidateGicInterfaceType(IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context)
STATIC VOID EFIAPI ValidateInterfaceType(IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context)
STATIC VOID DumpNodeInterrupts(IN UINT8 *Ptr, IN UINT32 Length, IN UINT32 InterruptCount)
STATIC CONST ACPI_PARSER AestGicStructure[]
STATIC CONST ACPI_PARSER AestProcessorStructure[]
STATIC VOID EFIAPI ValidateInterruptType(IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context)
STATIC VOID DumpMemoryControllerNode(IN UINT8 *Ptr, IN UINT32 Length)
STATIC CONST ACPI_PARSER AestProcessorTlbResourceSubstructure[]
VOID EFIAPI DumpVendorSpecificData(IN CONST CHAR16 *Format OPTIONAL, IN UINT8 *Ptr, IN UINT32 Length)
STATIC VOID DumpVendorDefinedNode(IN UINT8 *Ptr, IN UINT32 Length)
STATIC CONST ACPI_PARSER AestVendorDefinedStructure[]
STATIC CONST ACPI_PARSER AestNodeInterrupt[]
STATIC CONST ACPI_PARSER AestSmmuStructure[]
STATIC CONST ACPI_PARSER AestMemoryControllerStructure[]
STATIC CONST ACPI_PARSER AestProcessorCacheResourceSubstructure[]
STATIC VOID DumpNodeInterface(IN UINT8 *Ptr, IN UINT32 Length)
STATIC VOID EFIAPI ValidateProcessorFlags(IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context)
VOID EFIAPI ParseAcpiAest(IN BOOLEAN Trace, IN UINT8 *Ptr, IN UINT32 AcpiTableLength, IN UINT8 AcpiTableRevision)
STATIC CONST ACPI_PARSER AestProcessorGenericResourceSubstructure[]
STATIC VOID DumpProcessorNode(IN UINT8 *Ptr, IN UINT32 Length)
STATIC VOID DumpGicNode(IN UINT8 *Ptr, IN UINT32 Length)
UINTN EFIAPI AsciiSPrint(OUT CHAR8 *StartOfBuffer, IN UINTN BufferSize, IN CONST CHAR8 *FormatString,...)
UINTN EFIAPI Print(IN CONST CHAR16 *Format,...)