TianoCore EDK2 master
|
#include <IndustryStandard/IoRemappingTable.h>
#include <Library/PrintLib.h>
#include <Library/UefiLib.h>
#include "AcpiParser.h"
#include "AcpiTableParser.h"
#include "AcpiViewConfig.h"
Go to the source code of this file.
Macros | |
#define | PARSE_IORT_NODE_HEADER(ValidateIdMappingCount, ValidateIdArrayReference) |
Functions | |
STATIC VOID EFIAPI | ValidateItsIdMappingCount (IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context) |
STATIC VOID EFIAPI | ValidatePmcgIdMappingCount (IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context) |
STATIC VOID EFIAPI | ValidateItsIdArrayReference (IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context) |
STATIC VOID EFIAPI | ValidatePhysicalRange (IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context) |
STATIC VOID EFIAPI | ValidateRmrMemDescCount (IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context) |
STATIC VOID | DumpIortNodeIdMappings (IN UINT8 *Ptr, IN UINT32 Length, IN UINT32 MappingCount) |
STATIC VOID | DumpIortNodeSmmuV1V2 (IN UINT8 *Ptr, IN UINT16 Length, IN UINT32 MappingCount, IN UINT32 MappingOffset) |
STATIC VOID | DumpIortNodeSmmuV3 (IN UINT8 *Ptr, IN UINT16 Length, IN UINT32 MappingCount, IN UINT32 MappingOffset) |
STATIC VOID | DumpIortNodeIts (IN UINT8 *Ptr, IN UINT16 Length) |
STATIC VOID | DumpIortNodeNamedComponent (IN UINT8 *Ptr, IN UINT16 Length, IN UINT32 MappingCount, IN UINT32 MappingOffset) |
STATIC VOID | DumpIortNodeRootComplex (IN UINT8 *Ptr, IN UINT16 Length, IN UINT32 MappingCount, IN UINT32 MappingOffset) |
STATIC VOID | DumpIortNodePmcg (IN UINT8 *Ptr, IN UINT16 Length, IN UINT32 MappingCount, IN UINT32 MappingOffset) |
STATIC VOID | DumpIortNodeRmrMemRangeDesc (IN UINT8 *Ptr, IN UINT32 Length, IN UINT32 DescCount) |
STATIC VOID | DumpIortNodeRmr (IN UINT8 *Ptr, IN UINT16 Length, IN UINT32 MappingCount, IN UINT32 MappingOffset) |
VOID EFIAPI | ParseAcpiIort (IN BOOLEAN Trace, IN UINT8 *Ptr, IN UINT32 AcpiTableLength, IN UINT8 AcpiTableRevision) |
IORT table parser
Copyright (c) 2016 - 2024, Arm Limited. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file IortParser.c.
#define PARSE_IORT_NODE_HEADER | ( | ValidateIdMappingCount, | |
ValidateIdArrayReference | |||
) |
Helper Macro for populating the IORT Node header in the ACPI_PARSER array.
[out] | ValidateIdMappingCount | Optional pointer to a function for validating the ID Mapping count. |
[out] | ValidateIdArrayReference | Optional pointer to a function for validating the ID Array reference. |
Definition at line 173 of file IortParser.c.
This function parses the IORT Node Id Mapping array.
[in] | Ptr | Pointer to the start of the ID mapping array. |
[in] | Length | Length of the buffer. |
[in] | MappingCount | The ID Mapping count. |
Definition at line 352 of file IortParser.c.
This function parses the IORT ITS node.
[in] | Ptr | Pointer to the start of the buffer. |
[in] | Length | Length of the buffer. |
Definition at line 527 of file IortParser.c.
STATIC VOID DumpIortNodeNamedComponent | ( | IN UINT8 * | Ptr, |
IN UINT16 | Length, | ||
IN UINT32 | MappingCount, | ||
IN UINT32 | MappingOffset | ||
) |
This function parses the IORT Named Component node.
[in] | Ptr | Pointer to the start of the buffer. |
[in] | Length | Length of the buffer. |
[in] | MappingCount | The ID Mapping count. |
[in] | MappingOffset | The offset of the ID Mapping array from the start of the IORT table. |
Definition at line 592 of file IortParser.c.
STATIC VOID DumpIortNodePmcg | ( | IN UINT8 * | Ptr, |
IN UINT16 | Length, | ||
IN UINT32 | MappingCount, | ||
IN UINT32 | MappingOffset | ||
) |
This function parses the IORT PMCG node.
[in] | Ptr | Pointer to the start of the buffer. |
[in] | Length | Length of the buffer. |
[in] | MappingCount | The ID Mapping count. |
[in] | MappingOffset | The offset of the ID Mapping array from the start of the IORT table. |
Definition at line 674 of file IortParser.c.
STATIC VOID DumpIortNodeRmr | ( | IN UINT8 * | Ptr, |
IN UINT16 | Length, | ||
IN UINT32 | MappingCount, | ||
IN UINT32 | MappingOffset | ||
) |
This function parses the IORT RMR node.
[in] | Ptr | Pointer to the start of the buffer. |
[in] | Length | Length of the buffer. |
[in] | MappingCount | The ID Mapping count. |
[in] | MappingOffset | The offset of the ID Mapping array from the start of the IORT table. |
Definition at line 752 of file IortParser.c.
This function parses the IORT RMR Node Memory Range Descriptor array.
[in] | Ptr | Pointer to the start of the Memory Range Descriptor array. |
[in] | Length | Length of the buffer. |
[in] | DescCount | Memory Range Descriptor count. |
Definition at line 707 of file IortParser.c.
STATIC VOID DumpIortNodeRootComplex | ( | IN UINT8 * | Ptr, |
IN UINT16 | Length, | ||
IN UINT32 | MappingCount, | ||
IN UINT32 | MappingOffset | ||
) |
This function parses the IORT Root Complex node.
[in] | Ptr | Pointer to the start of the buffer. |
[in] | Length | Length of the buffer. |
[in] | MappingCount | The ID Mapping count. |
[in] | MappingOffset | The offset of the ID Mapping array from the start of the IORT table. |
Definition at line 640 of file IortParser.c.
STATIC VOID DumpIortNodeSmmuV1V2 | ( | IN UINT8 * | Ptr, |
IN UINT16 | Length, | ||
IN UINT32 | MappingCount, | ||
IN UINT32 | MappingOffset | ||
) |
This function parses the IORT SMMUv1/2 node.
[in] | Ptr | Pointer to the start of the buffer. |
[in] | Length | Length of the buffer. |
[in] | MappingCount | The ID Mapping count. |
[in] | MappingOffset | The offset of the ID Mapping array from the start of the IORT table. |
Definition at line 397 of file IortParser.c.
STATIC VOID DumpIortNodeSmmuV3 | ( | IN UINT8 * | Ptr, |
IN UINT16 | Length, | ||
IN UINT32 | MappingCount, | ||
IN UINT32 | MappingOffset | ||
) |
This function parses the IORT SMMUv3 node.
[in] | Ptr | Pointer to the start of the buffer. |
[in] | Length | Length of the buffer. |
[in] | MappingCount | The ID Mapping count. |
[in] | MappingOffset | The offset of the ID Mapping array from the start of the IORT table. |
Definition at line 496 of file IortParser.c.
VOID EFIAPI ParseAcpiIort | ( | IN BOOLEAN | Trace, |
IN UINT8 * | Ptr, | ||
IN UINT32 | AcpiTableLength, | ||
IN UINT8 | AcpiTableRevision | ||
) |
This function parses the ACPI IORT table. When trace is enabled this function parses the IORT table and traces the ACPI fields.
This function also parses the following nodes:
This function also performs validation of the ACPI table fields.
[in] | Trace | If TRUE, trace the ACPI fields. |
[in] | Ptr | Pointer to the start of the buffer. |
[in] | AcpiTableLength | Length of the ACPI table. |
[in] | AcpiTableRevision | Revision of the ACPI table. |
Definition at line 812 of file IortParser.c.
STATIC VOID EFIAPI ValidateItsIdArrayReference | ( | IN UINT8 * | Ptr, |
IN UINT32 | Length, | ||
IN VOID * | Context | ||
) |
This function validates the ID Mapping array offset for the ITS node.
[in] | Ptr | Pointer to the start of the field data. |
[in] | Length | Length of the field. |
[in] | Context | Pointer to context specific information e.g. this could be a pointer to the ACPI table header. |
Definition at line 103 of file IortParser.c.
STATIC VOID EFIAPI ValidateItsIdMappingCount | ( | IN UINT8 * | Ptr, |
IN UINT32 | Length, | ||
IN VOID * | Context | ||
) |
This function validates the ID Mapping array count for the ITS node.
[in] | Ptr | Pointer to the start of the field data. |
[in] | Length | Length of the field. |
[in] | Context | Pointer to context specific information e.g. this could be a pointer to the ACPI table header. |
Definition at line 56 of file IortParser.c.
This function validates that the Physical Range address or length is not zero and is 64K aligned.
[in] | Ptr | Pointer to the start of the field data. |
[in] | Length | Length of the field. |
[in] | Context | Pointer to context specific information e.g. this could be a pointer to the ACPI table header. |
Definition at line 127 of file IortParser.c.
STATIC VOID EFIAPI ValidatePmcgIdMappingCount | ( | IN UINT8 * | Ptr, |
IN UINT32 | Length, | ||
IN VOID * | Context | ||
) |
This function validates the ID Mapping array count for the Performance Monitoring Counter Group (PMCG) node.
[in] | Ptr | Pointer to the start of the field data. |
[in] | Length | Length of the field. |
[in] | Context | Pointer to context specific information e.g. this could be a pointer to the ACPI table header. |
Definition at line 80 of file IortParser.c.
This function validates that the RMR memory range descriptor count.
[in] | Ptr | Pointer to the start of the field data. |
[in] | Length | Length of the field. |
[in] | Context | Pointer to context specific information e.g. this could be a pointer to the ACPI table header. |
Definition at line 153 of file IortParser.c.
STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo |
Definition at line 24 of file IortParser.c.
STATIC CONST ACPI_PARSER InterruptArrayParser[] |
Definition at line 35 of file IortParser.c.
Definition at line 36 of file IortParser.c.
Definition at line 32 of file IortParser.c.
Definition at line 33 of file IortParser.c.
Definition at line 26 of file IortParser.c.
STATIC CONST ACPI_PARSER IortNodeHeaderParser[] |
An ACPI_PARSER array describing the IORT node header structure.
Definition at line 199 of file IortParser.c.
STATIC CONST ACPI_PARSER IortNodeIdMappingParser[] |
An ACPI_PARSER array describing the IORT ID Mapping.
Definition at line 241 of file IortParser.c.
STATIC CONST ACPI_PARSER IortNodeItsParser[] |
An ACPI_PARSER array describing the IORT ITS node.
Definition at line 270 of file IortParser.c.
Definition at line 30 of file IortParser.c.
STATIC CONST ACPI_PARSER IortNodeNamedComponentParser[] |
An ACPI_PARSER array describing the IORT Names Component node.
Definition at line 288 of file IortParser.c.
Definition at line 27 of file IortParser.c.
STATIC CONST ACPI_PARSER IortNodePmcgParser[] |
An ACPI_PARSER array describing the IORT PMCG node.
Definition at line 312 of file IortParser.c.
Definition at line 31 of file IortParser.c.
STATIC CONST ACPI_PARSER IortNodeRmrMemRangeDescParser[] |
An ACPI_PARSER array describing the IORT RMR Memory Range Descriptor.
Definition at line 335 of file IortParser.c.
STATIC CONST ACPI_PARSER IortNodeRmrParser[] |
An ACPI_PARSER array describing the IORT RMR node.
Definition at line 323 of file IortParser.c.
STATIC CONST ACPI_PARSER IortNodeRootComplexParser[] |
An ACPI_PARSER array describing the IORT Root Complex node.
Definition at line 298 of file IortParser.c.
STATIC CONST ACPI_PARSER IortNodeSmmuV1V2Parser[] |
An ACPI_PARSER array describing the IORT SMMUv1/2 node.
Definition at line 206 of file IortParser.c.
STATIC CONST ACPI_PARSER IortNodeSmmuV3Parser[] |
An ACPI_PARSER array describing the IORT SMMUv3 node.
Definition at line 252 of file IortParser.c.
Definition at line 29 of file IortParser.c.
STATIC CONST ACPI_PARSER IortParser[] |
An ACPI_PARSER array describing the ACPI IORT Table
Definition at line 187 of file IortParser.c.
Definition at line 40 of file IortParser.c.
STATIC CONST ACPI_PARSER ItsIdParser[] |
An ACPI_PARSER array describing the ITS ID.
Definition at line 281 of file IortParser.c.
Definition at line 37 of file IortParser.c.
Definition at line 38 of file IortParser.c.
Definition at line 42 of file IortParser.c.
Definition at line 43 of file IortParser.c.