TianoCore EDK2 master
Loading...
Searching...
No Matches
AestParser.c File Reference

Go to the source code of this file.

Functions

STATIC VOID EFIAPI ValidateProcessorFlags (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 EFIAPI ValidateInterruptType (IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context)
 
STATIC VOID EFIAPI ValidateInterruptFlags (IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context)
 
VOID EFIAPI DumpVendorSpecificData (IN CONST CHAR16 *Format OPTIONAL, IN UINT8 *Ptr, IN UINT32 Length)
 
STATIC VOID DumpProcessorNode (IN UINT8 *Ptr, IN UINT32 Length)
 
STATIC VOID DumpMemoryControllerNode (IN UINT8 *Ptr, IN UINT32 Length)
 
STATIC VOID DumpSmmuNode (IN UINT8 *Ptr, IN UINT32 Length)
 
STATIC VOID DumpVendorDefinedNode (IN UINT8 *Ptr, IN UINT32 Length)
 
STATIC VOID DumpGicNode (IN UINT8 *Ptr, IN UINT32 Length)
 
STATIC VOID DumpNodeInterface (IN UINT8 *Ptr, IN UINT32 Length)
 
STATIC VOID DumpNodeInterrupts (IN UINT8 *Ptr, IN UINT32 Length, IN UINT32 InterruptCount)
 
STATIC VOID DumpAestNodeStructure (IN UINT8 *Ptr, IN UINT32 Length, IN UINT8 NodeType, IN UINT32 DataOffset, IN UINT32 InterfaceOffset, IN UINT32 InterruptArrayOffset, IN UINT32 InterruptCount)
 
VOID EFIAPI ParseAcpiAest (IN BOOLEAN Trace, IN UINT8 *Ptr, IN UINT32 AcpiTableLength, IN UINT8 AcpiTableRevision)
 

Variables

STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo
 
STATIC UINT8 * AestNodeType
 
STATIC UINT16 * AestNodeLength
 
STATIC UINT32 * NodeDataOffset
 
STATIC UINT32 * NodeInterfaceOffset
 
STATIC UINT32 * NodeInterruptArrayOffset
 
STATIC UINT32 * NodeInterruptCount
 
STATIC UINT32 * ProcessorId
 
STATIC UINT8 * ProcessorFlags
 
STATIC UINT8 * ProcessorResourceType
 
STATIC CONST ACPI_PARSER AestParser []
 
STATIC CONST ACPI_PARSER AestNodeHeaderParser []
 
STATIC CONST ACPI_PARSER AestProcessorStructure []
 
STATIC CONST ACPI_PARSER AestProcessorCacheResourceSubstructure []
 
STATIC CONST ACPI_PARSER AestProcessorTlbResourceSubstructure []
 
STATIC CONST ACPI_PARSER AestProcessorGenericResourceSubstructure []
 
STATIC CONST ACPI_PARSER AestMemoryControllerStructure []
 
STATIC CONST ACPI_PARSER AestSmmuStructure []
 
STATIC CONST ACPI_PARSER AestVendorDefinedStructure []
 
STATIC CONST ACPI_PARSER AestGicStructure []
 
STATIC CONST ACPI_PARSER AestNodeInterface []
 
STATIC CONST ACPI_PARSER AestNodeInterrupt []
 

Detailed Description

AEST table parser

Copyright (c) 2020 - 2024, Arm Limited. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent

Reference(s):

Definition in file AestParser.c.

Function Documentation

◆ DumpAestNodeStructure()

STATIC VOID DumpAestNodeStructure ( IN UINT8 *  Ptr,
IN UINT32  Length,
IN UINT8  NodeType,
IN UINT32  DataOffset,
IN UINT32  InterfaceOffset,
IN UINT32  InterruptArrayOffset,
IN UINT32  InterruptCount 
)

Parses a single AEST Node Structure.

Parameters
[in]PtrPointer to the start of the Node.
[in]LengthMaximum length of the Node.
[in]NodeTypeAEST node type.
[in]DataOffsetOffset to the node data.
[in]InterfaceOffsetOffset to the node interface data.
[in]InterruptArrayOffsetOffset to the node interrupt array.
[in]InterruptCountNumber of interrupts.

Definition at line 581 of file AestParser.c.

◆ DumpGicNode()

STATIC VOID DumpGicNode ( IN UINT8 *  Ptr,
IN UINT32  Length 
)

Parses the GIC node.

Parameters
[in]PtrPointer to the start of the GIC node.
[in]LengthMaximum length of the GIC node.

Definition at line 479 of file AestParser.c.

◆ DumpMemoryControllerNode()

STATIC VOID DumpMemoryControllerNode ( IN UINT8 *  Ptr,
IN UINT32  Length 
)

Parses the Memory Controller node.

Parameters
[in]PtrPointer to the start of the Memory Controller node.
[in]LengthMaximum length of the Memory Controller node.

Definition at line 410 of file AestParser.c.

◆ DumpNodeInterface()

STATIC VOID DumpNodeInterface ( IN UINT8 *  Ptr,
IN UINT32  Length 
)

Parses the Node Interface structure.

Parameters
[in]PtrPointer to the start of the Node Interface Structure.
[in]LengthMaximum length of the Node Interface Structure.

Definition at line 502 of file AestParser.c.

◆ DumpNodeInterrupts()

STATIC VOID DumpNodeInterrupts ( IN UINT8 *  Ptr,
IN UINT32  Length,
IN UINT32  InterruptCount 
)

Parses the Node Interrupts Structure.

Parameters
[in]PtrPointer to the start of the Node Interrupt array.
[in]LengthMaximum length of the Node Interrupt array.
[in]InterruptCountNumber if interrupts in the Node Interrupts array.

Definition at line 526 of file AestParser.c.

◆ DumpProcessorNode()

STATIC VOID DumpProcessorNode ( IN UINT8 *  Ptr,
IN UINT32  Length 
)

Parses the Processor Error Node structure along with its resource specific data.

Parameters
[in]PtrPointer to the start of the Processor node.
[in]LengthMaximum length of the Processor node.

Definition at line 334 of file AestParser.c.

◆ DumpSmmuNode()

STATIC VOID DumpSmmuNode ( IN UINT8 *  Ptr,
IN UINT32  Length 
)

Parses the SMMU node.

Parameters
[in]PtrPointer to the start of the SMMU node.
[in]LengthMaximum length of the SMMU node.

Definition at line 433 of file AestParser.c.

◆ DumpVendorDefinedNode()

STATIC VOID DumpVendorDefinedNode ( IN UINT8 *  Ptr,
IN UINT32  Length 
)

Parses the Vendor-defined structure.

Parameters
[in]PtrPointer to the start of the Vendor-defined node.
[in]LengthMaximum length of the Vendor-defined node.

Definition at line 456 of file AestParser.c.

◆ DumpVendorSpecificData()

VOID EFIAPI DumpVendorSpecificData ( IN CONST CHAR16 *Format  OPTIONAL,
IN UINT8 *  Ptr,
IN UINT32  Length 
)

Dumps 16 bytes of data.

Parameters
[in]FormatOptional format string for tracing the data.
[in]PtrPointer to the start of the buffer.
[in]LengthLength of the field.

Definition at line 164 of file AestParser.c.

◆ ParseAcpiAest()

VOID EFIAPI ParseAcpiAest ( IN BOOLEAN  Trace,
IN UINT8 *  Ptr,
IN UINT32  AcpiTableLength,
IN UINT8  AcpiTableRevision 
)

This function parses the ACPI AEST table. When trace is enabled this function parses the AEST table and traces the ACPI table fields.

This function also performs validation of the ACPI table fields.

Parameters
[in]TraceIf TRUE, trace the ACPI fields.
[in]PtrPointer to the start of the buffer.
[in]AcpiTableLengthLength of the ACPI table.
[in]AcpiTableRevisionRevision of the ACPI table.

Definition at line 692 of file AestParser.c.

◆ ValidateGicInterfaceType()

STATIC VOID EFIAPI ValidateGicInterfaceType ( IN UINT8 *  Ptr,
IN UINT32  Length,
IN VOID *  Context 
)

Validate GIC Interface Type.

Parameters
[in]PtrPointer to the start of the field data.
[in]LengthLength of the field.
[in]ContextPointer to context specific information e.g. this could be a pointer to the ACPI table header.

Definition at line 71 of file AestParser.c.

◆ ValidateInterfaceType()

STATIC VOID EFIAPI ValidateInterfaceType ( IN UINT8 *  Ptr,
IN UINT32  Length,
IN VOID *  Context 
)

Validate Interface Type.

Parameters
[in]PtrPointer to the start of the field data.
[in]LengthLength of the field.
[in]ContextPointer to context specific information e.g. this could be a pointer to the ACPI table header.

Definition at line 97 of file AestParser.c.

◆ ValidateInterruptFlags()

STATIC VOID EFIAPI ValidateInterruptFlags ( IN UINT8 *  Ptr,
IN UINT32  Length,
IN VOID *  Context 
)

Validate interrupt flags.

Parameters
[in]PtrPointer to the start of the field data.
[in]LengthLength of the field.
[in]ContextPointer to context specific information e.g. this could be a pointer to the ACPI table header.

Definition at line 143 of file AestParser.c.

◆ ValidateInterruptType()

STATIC VOID EFIAPI ValidateInterruptType ( IN UINT8 *  Ptr,
IN UINT32  Length,
IN VOID *  Context 
)

Validate Interrupt Type.

Parameters
[in]PtrPointer to the start of the field data.
[in]LengthLength of the field.
[in]ContextPointer to context specific information e.g. this could be a pointer to the ACPI table header.

Definition at line 120 of file AestParser.c.

◆ ValidateProcessorFlags()

STATIC VOID EFIAPI ValidateProcessorFlags ( IN UINT8 *  Ptr,
IN UINT32  Length,
IN VOID *  Context 
)

Validate Processor Flags.

Parameters
[in]PtrPointer to the start of the field data.
[in]LengthLength of the field.
[in]ContextPointer to context specific information e.g. this could be a pointer to the ACPI table header.

Definition at line 43 of file AestParser.c.

Variable Documentation

◆ AcpiHdrInfo

Definition at line 21 of file AestParser.c.

◆ AestGicStructure

STATIC CONST ACPI_PARSER AestGicStructure[]
Initial value:
= {
{ L"GIC Interface Type", 4, 0, L"0x%x", NULL, NULL, ValidateGicInterfaceType,
NULL },
{ L"GIC Interface reference ID", 4, 4, L"0x%x", NULL, NULL, NULL, NULL}
}
STATIC VOID EFIAPI ValidateGicInterfaceType(IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context)
Definition: AestParser.c:71
#define NULL
Definition: Base.h:319

An ACPI_PARSER array describing the GIC structure.

Definition at line 292 of file AestParser.c.

◆ AestMemoryControllerStructure

STATIC CONST ACPI_PARSER AestMemoryControllerStructure[]
Initial value:
= {
{ L"Proximity Domain", 4, 0, L"0x%x", NULL, NULL, NULL, NULL }
}

An ACPI_PARSER array describing the memory controller structure.

Definition at line 268 of file AestParser.c.

◆ AestNodeHeaderParser

STATIC CONST ACPI_PARSER AestNodeHeaderParser[]
Initial value:
= {
{ L"Type", 1, 0, L"%d", NULL, (VOID **)&AestNodeType, NULL, NULL },
{ L"Length", 2, 1, L"%d", NULL, (VOID **)&AestNodeLength, NULL, NULL },
{ L"Reserved", 1, 3, L"0x%x", NULL, NULL, NULL, NULL },
{ L"Node Data Offset", 4, 4, L"%d", NULL, (VOID **)&NodeDataOffset, NULL, NULL },
{ L"Node Interface Offset", 4, 8, L"%d", NULL,
(VOID **)&NodeInterfaceOffset, NULL, NULL },
{ L"Node Interrupt Array Offset", 4, 12, L"%d", NULL,
(VOID **)&NodeInterruptArrayOffset, NULL, NULL },
{ L"Node Interrupt Count", 4, 16, L"%d", NULL,
(VOID **)&NodeInterruptCount, NULL, NULL },
{ L"Timestamp Rate", 8, 20, L"%ld", NULL, NULL, NULL, NULL },
{ L"Reserved1", 8, 28, L"0x%lx", NULL, NULL, NULL, NULL },
{ L"Error Injection Countdown Rate", 8, 36, L"%ld", NULL, NULL, NULL, NULL }
}

An ACPI_PARSER array describing the AEST Node Header.

Definition at line 207 of file AestParser.c.

◆ AestNodeInterface

STATIC CONST ACPI_PARSER AestNodeInterface[]
Initial value:
= {
{ L"Interface Type", 1, 0, L"%d", NULL, NULL, ValidateInterfaceType, NULL },
{ L"Reserved", 3, 1, L"%x %x %x", Dump3Chars, NULL, NULL, NULL },
{ L"Flags", 4, 4, L"0x%x", NULL, NULL, NULL, NULL },
{ L"Base Address", 8, 8, L"0x%lx", NULL, NULL, NULL, NULL },
{ L"Start Error Record Index", 4, 16, L"0x%x", NULL, NULL, NULL, NULL },
{ L"Number of Error Records", 4, 20, L"0x%x", NULL, NULL, NULL, NULL },
{ L"Error Records Implemented", 8, 24, L"0x%lx", NULL, NULL, NULL, NULL },
{ L"Error Records Support", 8, 32, L"0x%lx", NULL, NULL, NULL, NULL },
{ L"Addressing mode", 8, 40, L"0x%lx", NULL, NULL, NULL, NULL }
}
VOID EFIAPI Dump3Chars(IN CONST CHAR16 *Format OPTIONAL, IN UINT8 *Ptr, IN UINT32 Length)
Definition: AcpiParser.c:326
STATIC VOID EFIAPI ValidateInterfaceType(IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context)
Definition: AestParser.c:97

An ACPI_PARSER array describing the node interface.

Definition at line 301 of file AestParser.c.

◆ AestNodeInterrupt

STATIC CONST ACPI_PARSER AestNodeInterrupt[]
Initial value:
= {
{ L"Interrupt Type", 1, 0, L"%d", NULL, NULL, ValidateInterruptType, NULL },
{ L"Reserved", 2, 1, L"0x%x", NULL, NULL, NULL, NULL },
{ L"Interrupt Flags", 1, 3, L"0x%x", NULL, NULL, ValidateInterruptFlags, NULL },
{ L"Interrupt GSIV", 4, 4, L"0x%x", NULL, NULL, NULL, NULL },
{ L"ID", 1, 8, L"0x%x", NULL, NULL, NULL, NULL },
{ L"Reserved1", 3, 9, L"%x %x %x", Dump3Chars, NULL, NULL, NULL }
}
STATIC VOID EFIAPI ValidateInterruptFlags(IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context)
Definition: AestParser.c:143
STATIC VOID EFIAPI ValidateInterruptType(IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context)
Definition: AestParser.c:120

An ACPI_PARSER array describing the node interrupts.

Definition at line 316 of file AestParser.c.

◆ AestNodeLength

STATIC UINT16* AestNodeLength

Definition at line 23 of file AestParser.c.

◆ AestNodeType

STATIC UINT8* AestNodeType

Definition at line 22 of file AestParser.c.

◆ AestParser

STATIC CONST ACPI_PARSER AestParser[]
Initial value:
= {
}

An ACPI_PARSER array describing the ACPI AEST Table.

Definition at line 200 of file AestParser.c.

◆ AestProcessorCacheResourceSubstructure

STATIC CONST ACPI_PARSER AestProcessorCacheResourceSubstructure[]
Initial value:
= {
{ L"Cache reference ID", 4, 0, L"0x%x", NULL, NULL, NULL, NULL },
{ L"Reserved", 4, 4, L"%d", NULL, NULL, NULL, NULL }
}

An ACPI_PARSER array describing the processor cache resource substructure.

Definition at line 245 of file AestParser.c.

◆ AestProcessorGenericResourceSubstructure

STATIC CONST ACPI_PARSER AestProcessorGenericResourceSubstructure[]
Initial value:
= {
{ L"Vendor-defined data", 4, 0, L"%x", NULL, NULL, NULL, NULL }
}

An ACPI_PARSER array describing the processor generic resource substructure.

Definition at line 261 of file AestParser.c.

◆ AestProcessorStructure

STATIC CONST ACPI_PARSER AestProcessorStructure[]
Initial value:
= {
{ L"ACPI Processor ID", 4, 0, L"0x%x", NULL, (VOID **)&ProcessorId, NULL, NULL },
{ L"Resource Type", 1, 4, L"%d", NULL, (VOID **)&ProcessorResourceType, NULL,
NULL },
{ L"Reserved", 1, 5, L"0x%x", NULL, NULL, NULL, NULL },
{ L"Flags", 1, 6, L"0x%x", NULL, (VOID **)&ProcessorFlags,
{ L"Revision", 1, 7, L"%d", NULL, NULL, NULL, NULL },
{ L"Processor Affinity Level Indicator", 8, 8, L"0x%lx", NULL, NULL, NULL,
NULL },
}
STATIC VOID EFIAPI ValidateProcessorFlags(IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context)
Definition: AestParser.c:43

An ACPI_PARSER array describing the Processor error node specific data.

Definition at line 229 of file AestParser.c.

◆ AestProcessorTlbResourceSubstructure

STATIC CONST ACPI_PARSER AestProcessorTlbResourceSubstructure[]
Initial value:
= {
{ L"TLB reference ID", 4, 0, L"0x%x", NULL, NULL, NULL, NULL },
{ L"Reserved", 4, 4, L"%d", NULL, NULL, NULL, NULL }
}

An ACPI_PARSER array describing the processor TLB resource substructure.

Definition at line 253 of file AestParser.c.

◆ AestSmmuStructure

STATIC CONST ACPI_PARSER AestSmmuStructure[]
Initial value:
= {
{ L"IORT Node reference ID", 4, 0, L"0x%x", NULL, NULL, NULL, NULL },
{ L"SubComponent reference ID", 4, 4, L"0x%x", NULL, NULL, NULL, NULL }
}

An ACPI_PARSER array describing the SMMU structure.

Definition at line 275 of file AestParser.c.

◆ AestVendorDefinedStructure

STATIC CONST ACPI_PARSER AestVendorDefinedStructure[]
Initial value:
= {
{ L"Hardware ID", 4, 0, L"0x%x", NULL, NULL, NULL, NULL },
{ L"Unique ID", 4, 4, L"0x%x", NULL, NULL, NULL, NULL },
{ L"Vendor-specific data", 16, 8, NULL, DumpVendorSpecificData, NULL, NULL }
}
VOID EFIAPI DumpVendorSpecificData(IN CONST CHAR16 *Format OPTIONAL, IN UINT8 *Ptr, IN UINT32 Length)
Definition: AestParser.c:164

An ACPI_PARSER array describing the vendor-defined structure.

Definition at line 283 of file AestParser.c.

◆ NodeDataOffset

STATIC UINT32* NodeDataOffset

Definition at line 24 of file AestParser.c.

◆ NodeInterfaceOffset

STATIC UINT32* NodeInterfaceOffset

Definition at line 25 of file AestParser.c.

◆ NodeInterruptArrayOffset

STATIC UINT32* NodeInterruptArrayOffset

Definition at line 26 of file AestParser.c.

◆ NodeInterruptCount

STATIC UINT32* NodeInterruptCount

Definition at line 27 of file AestParser.c.

◆ ProcessorFlags

STATIC UINT8* ProcessorFlags

Definition at line 29 of file AestParser.c.

◆ ProcessorId

STATIC UINT32* ProcessorId

Definition at line 28 of file AestParser.c.

◆ ProcessorResourceType

STATIC UINT8* ProcessorResourceType

Definition at line 30 of file AestParser.c.