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

Go to the source code of this file.

Macros

#define IORT_GENERATOR_REVISION   CREATE_REVISION (1, 0)
 

Functions

 GET_OBJECT_LIST (EObjNameSpaceArm, EArmObjItsGroup, CM_ARM_ITS_GROUP_NODE)
 
 GET_OBJECT_LIST (EObjNameSpaceArm, EArmObjNamedComponent, CM_ARM_NAMED_COMPONENT_NODE)
 
 GET_OBJECT_LIST (EObjNameSpaceArm, EArmObjRootComplex, CM_ARM_ROOT_COMPLEX_NODE)
 
 GET_OBJECT_LIST (EObjNameSpaceArm, EArmObjSmmuV1SmmuV2, CM_ARM_SMMUV1_SMMUV2_NODE)
 
 GET_OBJECT_LIST (EObjNameSpaceArm, EArmObjSmmuV3, CM_ARM_SMMUV3_NODE)
 
 GET_OBJECT_LIST (EObjNameSpaceArm, EArmObjPmcg, CM_ARM_PMCG_NODE)
 
 GET_OBJECT_LIST (EObjNameSpaceArm, EArmObjRmr, CM_ARM_RMR_NODE)
 
 GET_OBJECT_LIST (EObjNameSpaceArm, EArmObjMemoryRangeDescriptor, CM_ARM_MEMORY_RANGE_DESCRIPTOR)
 
 GET_OBJECT_LIST (EObjNameSpaceArm, EArmObjGicItsIdentifierArray, CM_ARM_ITS_IDENTIFIER)
 
 GET_OBJECT_LIST (EObjNameSpaceArm, EArmObjIdMappingArray, CM_ARM_ID_MAPPING)
 
 GET_OBJECT_LIST (EObjNameSpaceArm, EArmObjSmmuInterruptArray, CM_ARM_SMMU_INTERRUPT)
 
STATIC UINT32 GetItsGroupNodeSize (IN CONST CM_ARM_ITS_GROUP_NODE *Node)
 
STATIC UINT64 GetSizeofItsGroupNodes (IN CONST UINT32 NodeStartOffset, IN CONST CM_ARM_ITS_GROUP_NODE *NodeList, IN UINT32 NodeCount, IN OUT IORT_NODE_INDEXER **CONST NodeIndexer)
 
STATIC UINT32 GetNamedComponentNodeSize (IN CONST CM_ARM_NAMED_COMPONENT_NODE *Node)
 
STATIC UINT64 GetSizeofNamedComponentNodes (IN CONST UINT32 NodeStartOffset, IN CONST CM_ARM_NAMED_COMPONENT_NODE *NodeList, IN UINT32 NodeCount, IN OUT IORT_NODE_INDEXER **CONST NodeIndexer)
 
STATIC UINT32 GetRootComplexNodeSize (IN CONST CM_ARM_ROOT_COMPLEX_NODE *Node)
 
STATIC UINT64 GetSizeofRootComplexNodes (IN CONST UINT32 NodeStartOffset, IN CONST CM_ARM_ROOT_COMPLEX_NODE *NodeList, IN UINT32 NodeCount, IN OUT IORT_NODE_INDEXER **CONST NodeIndexer)
 
STATIC UINT32 GetSmmuV1V2NodeSize (IN CONST CM_ARM_SMMUV1_SMMUV2_NODE *Node)
 
STATIC UINT64 GetSizeofSmmuV1V2Nodes (IN CONST UINT32 NodeStartOffset, IN CONST CM_ARM_SMMUV1_SMMUV2_NODE *NodeList, IN UINT32 NodeCount, IN OUT IORT_NODE_INDEXER **CONST NodeIndexer)
 
STATIC UINT32 GetSmmuV3NodeSize (IN CONST CM_ARM_SMMUV3_NODE *Node)
 
STATIC UINT64 GetSizeofSmmuV3Nodes (IN CONST UINT32 NodeStartOffset, IN CONST CM_ARM_SMMUV3_NODE *NodeList, IN UINT32 NodeCount, IN OUT IORT_NODE_INDEXER **CONST NodeIndexer)
 
STATIC UINT32 GetPmcgNodeSize (IN CONST CM_ARM_PMCG_NODE *Node)
 
STATIC UINT64 GetSizeofPmcgNodes (IN CONST UINT32 NodeStartOffset, IN CONST CM_ARM_PMCG_NODE *NodeList, IN UINT32 NodeCount, IN OUT IORT_NODE_INDEXER **CONST NodeIndexer)
 
STATIC UINT32 GetRmrNodeSize (IN CONST CM_ARM_RMR_NODE *Node)
 
STATIC UINT64 GetSizeofRmrNodes (IN CONST UINT32 NodeStartOffset, IN CONST CM_ARM_RMR_NODE *NodeList, IN UINT32 NodeCount, IN OUT IORT_NODE_INDEXER **CONST NodeIndexer)
 
STATIC EFI_STATUS GetNodeOffsetReferencedByToken (IN IORT_NODE_INDEXER *NodeIndexer, IN UINT32 NodeCount, IN CM_OBJECT_TOKEN Token, OUT UINT32 *NodeOffset)
 
STATIC EFI_STATUS AddIdMappingArray (IN CONST ACPI_TABLE_GENERATOR *CONST This, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE *IdMapArray, IN UINT32 IdCount, IN CONST CM_OBJECT_TOKEN IdMappingToken)
 
STATIC EFI_STATUS AddItsGroupNodes (IN CONST ACPI_TABLE_GENERATOR *CONST This, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo, IN CONST EFI_ACPI_6_0_IO_REMAPPING_TABLE *Iort, IN CONST UINT32 NodesStartOffset, IN CONST CM_ARM_ITS_GROUP_NODE *NodeList, IN UINT32 NodeCount)
 
STATIC EFI_STATUS AddNamedComponentNodes (IN CONST ACPI_TABLE_GENERATOR *CONST This, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo, IN CONST EFI_ACPI_6_0_IO_REMAPPING_TABLE *Iort, IN CONST UINT32 NodesStartOffset, IN CONST CM_ARM_NAMED_COMPONENT_NODE *NodeList, IN UINT32 NodeCount)
 
STATIC EFI_STATUS AddRootComplexNodes (IN CONST ACPI_TABLE_GENERATOR *CONST This, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo, IN CONST EFI_ACPI_6_0_IO_REMAPPING_TABLE *Iort, IN CONST UINT32 NodesStartOffset, IN CONST CM_ARM_ROOT_COMPLEX_NODE *NodeList, IN UINT32 NodeCount)
 
STATIC EFI_STATUS AddSmmuInterruptArray (IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN OUT EFI_ACPI_6_0_IO_REMAPPING_SMMU_INT *InterruptArray, IN UINT32 InterruptCount, IN CONST CM_OBJECT_TOKEN InterruptToken)
 
STATIC EFI_STATUS AddSmmuV1V2Nodes (IN CONST ACPI_TABLE_GENERATOR *CONST This, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo, IN CONST EFI_ACPI_6_0_IO_REMAPPING_TABLE *Iort, IN CONST UINT32 NodesStartOffset, IN CONST CM_ARM_SMMUV1_SMMUV2_NODE *NodeList, IN UINT32 NodeCount)
 
STATIC EFI_STATUS AddSmmuV3Nodes (IN CONST ACPI_TABLE_GENERATOR *CONST This, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo, IN CONST EFI_ACPI_6_0_IO_REMAPPING_TABLE *Iort, IN CONST UINT32 NodesStartOffset, IN CONST CM_ARM_SMMUV3_NODE *NodeList, IN UINT32 NodeCount)
 
STATIC EFI_STATUS AddPmcgNodes (IN CONST ACPI_TABLE_GENERATOR *CONST This, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo, IN CONST EFI_ACPI_6_0_IO_REMAPPING_TABLE *Iort, IN CONST UINT32 NodesStartOffset, IN CONST CM_ARM_PMCG_NODE *NodeList, IN UINT32 NodeCount)
 
STATIC EFI_STATUS AddMemRangeDescArray (IN CONST ACPI_TABLE_GENERATOR *CONST This, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN EFI_ACPI_6_0_IO_REMAPPING_MEM_RANGE_DESC *DescArray, IN UINT32 DescCount, IN CONST CM_OBJECT_TOKEN DescToken)
 
STATIC EFI_STATUS AddRmrNodes (IN CONST ACPI_TABLE_GENERATOR *CONST This, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo, IN CONST EFI_ACPI_6_0_IO_REMAPPING_TABLE *Iort, IN CONST UINT32 NodesStartOffset, IN CONST CM_ARM_RMR_NODE *NodeList, IN UINT32 NodeCount)
 
STATIC EFI_STATUS ValidateNodeIdentifiers (IN CONST IORT_NODE_INDEXER *CONST NodeIndexer, IN UINT32 NodeCount)
 
STATIC EFI_STATUS EFIAPI BuildIortTable (IN CONST ACPI_TABLE_GENERATOR *CONST This, IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, OUT EFI_ACPI_DESCRIPTION_HEADER **CONST Table)
 
STATIC EFI_STATUS FreeIortTableResources (IN CONST ACPI_TABLE_GENERATOR *CONST This, IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN OUT EFI_ACPI_DESCRIPTION_HEADER **CONST Table)
 
EFI_STATUS EFIAPI AcpiIortLibConstructor (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 
EFI_STATUS EFIAPI AcpiIortLibDestructor (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 

Variables

STATIC ACPI_IORT_GENERATOR IortGenerator
 

Detailed Description

IORT Table Generator

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

Reference(s):

Definition in file IortGenerator.c.

Macro Definition Documentation

◆ IORT_GENERATOR_REVISION

#define IORT_GENERATOR_REVISION   CREATE_REVISION (1, 0)

The IORT Table Generator revision.

Definition at line 2807 of file IortGenerator.c.

Function Documentation

◆ AcpiIortLibConstructor()

EFI_STATUS EFIAPI AcpiIortLibConstructor ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Register the Generator with the ACPI Table Factory.

Parameters
[in]ImageHandleThe handle to the image.
[in]SystemTablePointer to the System Table.
Return values
EFI_SUCCESSThe Generator is registered.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_ALREADY_STARTEDThe Generator for the Table ID is already registered.

Definition at line 2860 of file IortGenerator.c.

◆ AcpiIortLibDestructor()

EFI_STATUS EFIAPI AcpiIortLibDestructor ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Deregister the Generator from the ACPI Table Factory.

Parameters
[in]ImageHandleThe handle to the image.
[in]SystemTablePointer to the System Table.
Return values
EFI_SUCCESSThe Generator is deregistered.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_NOT_FOUNDThe Generator is not registered.

Definition at line 2884 of file IortGenerator.c.

◆ AddIdMappingArray()

STATIC EFI_STATUS AddIdMappingArray ( IN CONST ACPI_TABLE_GENERATOR *CONST  This,
IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST  CfgMgrProtocol,
IN EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE IdMapArray,
IN UINT32  IdCount,
IN CONST CM_OBJECT_TOKEN  IdMappingToken 
)

Update the Id Mapping Array.

This function retrieves the Id Mapping Array object referenced by the IdMappingToken and updates the IdMapArray.

Parameters
[in]ThisPointer to the table Generator.
[in]CfgMgrProtocolPointer to the Configuration Manager Protocol Interface.
[in]IdMapArrayPointer to an array of Id Mappings.
[in]IdCountNumber of Id Mappings.
[in]IdMappingTokenReference Token for retrieving the Id Mapping Array object.
Return values
EFI_SUCCESSTable generated successfully.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_NOT_FOUNDThe required object was not found.

Definition at line 754 of file IortGenerator.c.

◆ AddItsGroupNodes()

STATIC EFI_STATUS AddItsGroupNodes ( IN CONST ACPI_TABLE_GENERATOR *CONST  This,
IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST  CfgMgrProtocol,
IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST  AcpiTableInfo,
IN CONST EFI_ACPI_6_0_IO_REMAPPING_TABLE Iort,
IN CONST UINT32  NodesStartOffset,
IN CONST CM_ARM_ITS_GROUP_NODE NodeList,
IN UINT32  NodeCount 
)

Update the ITS Group Node Information.

Parameters
[in]ThisPointer to the table Generator.
[in]CfgMgrProtocolPointer to the Configuration Manager Protocol Interface.
[in]AcpiTableInfoPointer to the ACPI table info structure.
[in]IortPointer to IORT table structure.
[in]NodesStartOffsetOffset for the start of the ITS Group Nodes.
[in]NodeListPointer to an array of ITS Group Node Objects.
[in]NodeCountNumber of ITS Group Node Objects.
Return values
EFI_SUCCESSTable generated successfully.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_NOT_FOUNDThe required object was not found.

Definition at line 846 of file IortGenerator.c.

◆ AddMemRangeDescArray()

STATIC EFI_STATUS AddMemRangeDescArray ( IN CONST ACPI_TABLE_GENERATOR *CONST  This,
IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST  CfgMgrProtocol,
IN EFI_ACPI_6_0_IO_REMAPPING_MEM_RANGE_DESC DescArray,
IN UINT32  DescCount,
IN CONST CM_OBJECT_TOKEN  DescToken 
)

Update the Memory Range Descriptor Array.

This function retrieves the Memory Range Descriptor objects referenced by MemRangeDescToken and updates the Memory Range Descriptor array.

Parameters
[in]ThisPointer to the table Generator.
[in]CfgMgrProtocolPointer to the Configuration Manager Protocol Interface.
[in]DescArrayPointer to an array of Memory Range Descriptors.
[in]DescCountNumber of Id Descriptors.
[in]DescTokenReference Token for retrieving the Memory Range Descriptor Array.
Return values
EFI_SUCCESSTable generated successfully.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_NOT_FOUNDThe required object was not found.

Definition at line 1789 of file IortGenerator.c.

◆ AddNamedComponentNodes()

STATIC EFI_STATUS AddNamedComponentNodes ( IN CONST ACPI_TABLE_GENERATOR *CONST  This,
IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST  CfgMgrProtocol,
IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST  AcpiTableInfo,
IN CONST EFI_ACPI_6_0_IO_REMAPPING_TABLE Iort,
IN CONST UINT32  NodesStartOffset,
IN CONST CM_ARM_NAMED_COMPONENT_NODE NodeList,
IN UINT32  NodeCount 
)

Update the Named Component Node Information.

This function updates the Named Component node information in the IORT table.

Parameters
[in]ThisPointer to the table Generator.
[in]CfgMgrProtocolPointer to the Configuration Manager Protocol Interface.
[in]AcpiTableInfoPointer to the ACPI table info structure.
[in]IortPointer to IORT table structure.
[in]NodesStartOffsetOffset for the start of the Named Component Nodes.
[in]NodeListPointer to an array of Named Component Node Objects.
[in]NodeCountNumber of Named Component Node Objects.
Return values
EFI_SUCCESSTable generated successfully.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_NOT_FOUNDThe required object was not found.

Definition at line 963 of file IortGenerator.c.

◆ AddPmcgNodes()

STATIC EFI_STATUS AddPmcgNodes ( IN CONST ACPI_TABLE_GENERATOR *CONST  This,
IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST  CfgMgrProtocol,
IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST  AcpiTableInfo,
IN CONST EFI_ACPI_6_0_IO_REMAPPING_TABLE Iort,
IN CONST UINT32  NodesStartOffset,
IN CONST CM_ARM_PMCG_NODE NodeList,
IN UINT32  NodeCount 
)

Update the PMCG Node Information.

This function updates the PMCG node information in the IORT table.

Parameters
[in]ThisPointer to the table Generator.
[in]CfgMgrProtocolPointer to the Configuration Manager Protocol Interface.
[in]AcpiTableInfoPointer to the ACPI table info structure.
[in]IortPointer to IORT table structure.
[in]NodesStartOffsetOffset for the start of the PMCG Nodes.
[in]NodeListPointer to an array of PMCG Node Objects.
[in]NodeCountNumber of PMCG Node Objects.
Return values
EFI_SUCCESSTable generated successfully.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_NOT_FOUNDThe required object was not found.

Definition at line 1651 of file IortGenerator.c.

◆ AddRmrNodes()

STATIC EFI_STATUS AddRmrNodes ( IN CONST ACPI_TABLE_GENERATOR *CONST  This,
IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST  CfgMgrProtocol,
IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST  AcpiTableInfo,
IN CONST EFI_ACPI_6_0_IO_REMAPPING_TABLE Iort,
IN CONST UINT32  NodesStartOffset,
IN CONST CM_ARM_RMR_NODE NodeList,
IN UINT32  NodeCount 
)

Update the RMR Node Information.

This function updates the RMR node information in the IORT table.

Parameters
[in]ThisPointer to the table Generator.
[in]CfgMgrProtocolPointer to the Configuration Manager Protocol Interface.
[in]AcpiTableInfoPointer to the ACPI table info structure.
[in]IortPointer to IORT table structure.
[in]NodesStartOffsetOffset for the start of the PMCG Nodes.
[in]NodeListPointer to an array of PMCG Node Objects.
[in]NodeCountNumber of PMCG Node Objects.
Return values
EFI_SUCCESSTable generated successfully.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_NOT_FOUNDThe required object was not found.

Definition at line 1860 of file IortGenerator.c.

◆ AddRootComplexNodes()

STATIC EFI_STATUS AddRootComplexNodes ( IN CONST ACPI_TABLE_GENERATOR *CONST  This,
IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST  CfgMgrProtocol,
IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST  AcpiTableInfo,
IN CONST EFI_ACPI_6_0_IO_REMAPPING_TABLE Iort,
IN CONST UINT32  NodesStartOffset,
IN CONST CM_ARM_ROOT_COMPLEX_NODE NodeList,
IN UINT32  NodeCount 
)

Update the Root Complex Node Information.

This function updates the Root Complex node information in the IORT table.

Parameters
[in]ThisPointer to the table Generator.
[in]CfgMgrProtocolPointer to the Configuration Manager Protocol Interface.
[in]AcpiTableInfoPointer to the ACPI table info structure.
[in]IortPointer to IORT table structure.
[in]NodesStartOffsetOffset for the start of the Root Complex Nodes.
[in]NodeListPointer to an array of Root Complex Node Objects.
[in]NodeCountNumber of Root Complex Node Objects.
Return values
EFI_SUCCESSTable generated successfully.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_NOT_FOUNDThe required object was not found.

Definition at line 1108 of file IortGenerator.c.

◆ AddSmmuInterruptArray()

STATIC EFI_STATUS AddSmmuInterruptArray ( IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST  CfgMgrProtocol,
IN OUT EFI_ACPI_6_0_IO_REMAPPING_SMMU_INT InterruptArray,
IN UINT32  InterruptCount,
IN CONST CM_OBJECT_TOKEN  InterruptToken 
)

Update the SMMU Interrupt Array.

This function retrieves the InterruptArray object referenced by the InterruptToken and updates the SMMU InterruptArray.

Parameters
[in]CfgMgrProtocolPointer to the Configuration Manager Protocol Interface.
[in,out]InterruptArrayPointer to an array of Interrupts.
[in]InterruptCountNumber of entries in the InterruptArray.
[in]InterruptTokenReference Token for retrieving the SMMU InterruptArray object.
Return values
EFI_SUCCESSTable generated successfully.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_NOT_FOUNDThe required object was not found.

Definition at line 1232 of file IortGenerator.c.

◆ AddSmmuV1V2Nodes()

STATIC EFI_STATUS AddSmmuV1V2Nodes ( IN CONST ACPI_TABLE_GENERATOR *CONST  This,
IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST  CfgMgrProtocol,
IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST  AcpiTableInfo,
IN CONST EFI_ACPI_6_0_IO_REMAPPING_TABLE Iort,
IN CONST UINT32  NodesStartOffset,
IN CONST CM_ARM_SMMUV1_SMMUV2_NODE NodeList,
IN UINT32  NodeCount 
)

Update the SMMU v1/v2 Node Information.

Parameters
[in]ThisPointer to the table Generator.
[in]CfgMgrProtocolPointer to the Configuration Manager Protocol Interface.
[in]AcpiTableInfoPointer to the ACPI table info structure.
[in]IortPointer to IORT table structure.
[in]NodesStartOffsetOffset for the start of the SMMU v1/v2 Nodes.
[in]NodeListPointer to an array of SMMU v1/v2 Node Objects.
[in]NodeCountNumber of SMMU v1/v2 Node Objects.
Return values
EFI_SUCCESSTable generated successfully.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_NOT_FOUNDThe required object was not found.

Definition at line 1299 of file IortGenerator.c.

◆ AddSmmuV3Nodes()

STATIC EFI_STATUS AddSmmuV3Nodes ( IN CONST ACPI_TABLE_GENERATOR *CONST  This,
IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST  CfgMgrProtocol,
IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST  AcpiTableInfo,
IN CONST EFI_ACPI_6_0_IO_REMAPPING_TABLE Iort,
IN CONST UINT32  NodesStartOffset,
IN CONST CM_ARM_SMMUV3_NODE NodeList,
IN UINT32  NodeCount 
)

Update the SMMUv3 Node Information.

This function updates the SMMUv3 node information in the IORT table.

Parameters
[in]ThisPointer to the table Generator.
[in]CfgMgrProtocolPointer to the Configuration Manager Protocol Interface.
[in]AcpiTableInfoPointer to the ACPI table info structure.
[in]IortPointer to IORT table structure.
[in]NodesStartOffsetOffset for the start of the SMMUv3 Nodes.
[in]NodeListPointer to an array of SMMUv3 Node Objects.
[in]NodeCountNumber of SMMUv3 Node Objects.
Return values
EFI_SUCCESSTable generated successfully.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_NOT_FOUNDThe required object was not found.

Definition at line 1512 of file IortGenerator.c.

◆ BuildIortTable()

Construct the IORT ACPI table.

This function invokes the Configuration Manager protocol interface to get the required hardware information for generating the ACPI table.

If this function allocates any resources then they must be freed in the FreeXXXXTableResources function.

Parameters
[in]ThisPointer to the table generator.
[in]AcpiTableInfoPointer to the ACPI Table Info.
[in]CfgMgrProtocolPointer to the Configuration Manager Protocol Interface.
[out]TablePointer to the constructed ACPI Table.
Return values
EFI_SUCCESSTable generated successfully.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_NOT_FOUNDThe required object was not found.
EFI_BAD_BUFFER_SIZEThe size returned by the Configuration Manager is less than the Object size for the requested object.

Definition at line 2062 of file IortGenerator.c.

◆ FreeIortTableResources()

Free any resources allocated for constructing the IORT

Parameters
[in]ThisPointer to the table generator.
[in]AcpiTableInfoPointer to the ACPI Table Info.
[in]CfgMgrProtocolPointer to the Configuration Manager Protocol Interface.
[in,out]TablePointer to the ACPI Table.
Return values
EFI_SUCCESSThe resources were freed successfully.
EFI_INVALID_PARAMETERThe table pointer is NULL or invalid.

Definition at line 2771 of file IortGenerator.c.

◆ GET_OBJECT_LIST() [1/11]

This macro expands to a function that retrieves the ITS Identifier Array information from the Configuration Manager.

◆ GET_OBJECT_LIST() [2/11]

GET_OBJECT_LIST ( EObjNameSpaceArm  ,
EArmObjIdMappingArray  ,
CM_ARM_ID_MAPPING   
)

This macro expands to a function that retrieves the Id Mapping Array information from the Configuration Manager.

◆ GET_OBJECT_LIST() [3/11]

GET_OBJECT_LIST ( EObjNameSpaceArm  ,
EArmObjItsGroup  ,
CM_ARM_ITS_GROUP_NODE   
)

ARM standard IORT Generator

Requirements: The following Configuration Manager Object(s) are required by this Generator:

  • EArmObjItsGroup
  • EArmObjNamedComponent
  • EArmObjRootComplex
  • EArmObjSmmuV1SmmuV2
  • EArmObjSmmuV3
  • EArmObjPmcg
  • EArmObjRmr
  • EArmObjGicItsIdentifierArray
  • EArmObjIdMappingArray
  • EArmObjSmmuInterruptArray
  • EArmObjMemoryRangeDescriptor This macro expands to a function that retrieves the ITS Group node information from the Configuration Manager.

◆ GET_OBJECT_LIST() [4/11]

This macro expands to a function that retrieves the Memory Range Descriptor Array information from the Configuration Manager.

◆ GET_OBJECT_LIST() [5/11]

This macro expands to a function that retrieves the Named Component node information from the Configuration Manager.

◆ GET_OBJECT_LIST() [6/11]

GET_OBJECT_LIST ( EObjNameSpaceArm  ,
EArmObjPmcg  ,
CM_ARM_PMCG_NODE   
)

This macro expands to a function that retrieves the PMCG node information from the Configuration Manager.

◆ GET_OBJECT_LIST() [7/11]

GET_OBJECT_LIST ( EObjNameSpaceArm  ,
EArmObjRmr  ,
CM_ARM_RMR_NODE   
)

This macro expands to a function that retrieves the RMR node information from the Configuration Manager.

◆ GET_OBJECT_LIST() [8/11]

This macro expands to a function that retrieves the Root Complex node information from the Configuration Manager.

◆ GET_OBJECT_LIST() [9/11]

This macro expands to a function that retrieves the SMMU Interrupt Array information from the Configuration Manager.

◆ GET_OBJECT_LIST() [10/11]

This macro expands to a function that retrieves the SMMU v1/v2 node information from the Configuration Manager.

◆ GET_OBJECT_LIST() [11/11]

GET_OBJECT_LIST ( EObjNameSpaceArm  ,
EArmObjSmmuV3  ,
CM_ARM_SMMUV3_NODE   
)

This macro expands to a function that retrieves the SMMU v3 node information from the Configuration Manager.

◆ GetItsGroupNodeSize()

STATIC UINT32 GetItsGroupNodeSize ( IN CONST CM_ARM_ITS_GROUP_NODE Node)

Returns the size of the ITS Group node.

Parameters
[in]NodePointer to ITS Group node.
Return values
Sizeof the ITS Group Node.

Definition at line 154 of file IortGenerator.c.

◆ GetNamedComponentNodeSize()

STATIC UINT32 GetNamedComponentNodeSize ( IN CONST CM_ARM_NAMED_COMPONENT_NODE Node)

Returns the size of the Named Component node.

Parameters
[in]NodePointer to Named Component node.
Return values
Sizeof the Named Component node.

Definition at line 228 of file IortGenerator.c.

◆ GetNodeOffsetReferencedByToken()

STATIC EFI_STATUS GetNodeOffsetReferencedByToken ( IN IORT_NODE_INDEXER NodeIndexer,
IN UINT32  NodeCount,
IN CM_OBJECT_TOKEN  Token,
OUT UINT32 *  NodeOffset 
)

Returns the offset of the Node referenced by the Token.

Parameters
[in]NodeIndexerPointer to node indexer array.
[in]NodeCountCount of the nodes.
[in]TokenReference token for the node.
[out]NodeOffsetOffset of the node from the start of the IORT table.
Return values
EFI_SUCCESSSuccess.
EFI_NOT_FOUNDNo matching token reference found in node indexer array.

Definition at line 695 of file IortGenerator.c.

◆ GetPmcgNodeSize()

STATIC UINT32 GetPmcgNodeSize ( IN CONST CM_ARM_PMCG_NODE Node)

Returns the size of the PMCG node.

Parameters
[in]NodePointer to PMCG node.
Return values
Sizeof the PMCG node.

Definition at line 536 of file IortGenerator.c.

◆ GetRmrNodeSize()

STATIC UINT32 GetRmrNodeSize ( IN CONST CM_ARM_RMR_NODE Node)

Returns the size of the RMR node.

Parameters
[in]NodePointer to RMR node.
Return values
Sizeof the RMR node.

Definition at line 611 of file IortGenerator.c.

◆ GetRootComplexNodeSize()

STATIC UINT32 GetRootComplexNodeSize ( IN CONST CM_ARM_ROOT_COMPLEX_NODE Node)

Returns the size of the Root Complex node.

Parameters
[in]NodePointer to Root Complex node.
Return values
Sizeof the Root Complex node.

Definition at line 305 of file IortGenerator.c.

◆ GetSizeofItsGroupNodes()

STATIC UINT64 GetSizeofItsGroupNodes ( IN CONST UINT32  NodeStartOffset,
IN CONST CM_ARM_ITS_GROUP_NODE NodeList,
IN UINT32  NodeCount,
IN OUT IORT_NODE_INDEXER **CONST  NodeIndexer 
)

Returns the total size required for the ITS Group nodes and updates the Node Indexer.

This function calculates the size required for the node group and also populates the Node Indexer array with offsets for the individual nodes.

Parameters
[in]NodeStartOffsetOffset from the start of the IORT where this node group starts.
[in]NodeListPointer to ITS Group node list.
[in]NodeCountCount of the ITS Group nodes.
[in,out]NodeIndexerPointer to the next Node Indexer.
Return values
Totalsize of the ITS Group Nodes.

Definition at line 184 of file IortGenerator.c.

◆ GetSizeofNamedComponentNodes()

STATIC UINT64 GetSizeofNamedComponentNodes ( IN CONST UINT32  NodeStartOffset,
IN CONST CM_ARM_NAMED_COMPONENT_NODE NodeList,
IN UINT32  NodeCount,
IN OUT IORT_NODE_INDEXER **CONST  NodeIndexer 
)

Returns the total size required for the Named Component nodes and updates the Node Indexer.

This function calculates the size required for the node group and also populates the Node Indexer array with offsets for the individual nodes.

Parameters
[in]NodeStartOffsetOffset from the start of the IORT where this node group starts.
[in]NodeListPointer to Named Component node list.
[in]NodeCountCount of the Named Component nodes.
[in,out]NodeIndexerPointer to the next Node Indexer.
Return values
Totalsize of the Named Component nodes.

Definition at line 261 of file IortGenerator.c.

◆ GetSizeofPmcgNodes()

STATIC UINT64 GetSizeofPmcgNodes ( IN CONST UINT32  NodeStartOffset,
IN CONST CM_ARM_PMCG_NODE NodeList,
IN UINT32  NodeCount,
IN OUT IORT_NODE_INDEXER **CONST  NodeIndexer 
)

Returns the total size required for the PMCG nodes and updates the Node Indexer.

This function calculates the size required for the node group and also populates the Node Indexer array with offsets for the individual nodes.

Parameters
[in]NodeStartOffsetOffset from the start of the IORT where this node group starts.
[in]NodeListPointer to PMCG node list.
[in]NodeCountCount of the PMCG nodes.
[in,out]NodeIndexerPointer to the next Node Indexer.
Return values
Totalsize of the PMCG nodes.

Definition at line 567 of file IortGenerator.c.

◆ GetSizeofRmrNodes()

STATIC UINT64 GetSizeofRmrNodes ( IN CONST UINT32  NodeStartOffset,
IN CONST CM_ARM_RMR_NODE NodeList,
IN UINT32  NodeCount,
IN OUT IORT_NODE_INDEXER **CONST  NodeIndexer 
)

Returns the total size required for the RMR nodes and updates the Node Indexer.

This function calculates the size required for the node group and also populates the Node Indexer array with offsets for the individual nodes.

Parameters
[in]NodeStartOffsetOffset from the start of the IORT where this node group starts.
[in]NodeListPointer to RMR node list.
[in]NodeCountCount of the RMR nodes.
[in,out]NodeIndexerPointer to the next Node Indexer.
Return values
Totalsize of the RMR nodes.

Definition at line 645 of file IortGenerator.c.

◆ GetSizeofRootComplexNodes()

STATIC UINT64 GetSizeofRootComplexNodes ( IN CONST UINT32  NodeStartOffset,
IN CONST CM_ARM_ROOT_COMPLEX_NODE NodeList,
IN UINT32  NodeCount,
IN OUT IORT_NODE_INDEXER **CONST  NodeIndexer 
)

Returns the total size required for the Root Complex nodes and updates the Node Indexer.

This function calculates the size required for the node group and also populates the Node Indexer array with offsets for the individual nodes.

Parameters
[in]NodeStartOffsetOffset from the start of the IORT where this node group starts.
[in]NodeListPointer to Root Complex node list.
[in]NodeCountCount of the Root Complex nodes.
[in,out]NodeIndexerPointer to the next Node Indexer.
Return values
Totalsize of the Root Complex nodes.

Definition at line 336 of file IortGenerator.c.

◆ GetSizeofSmmuV1V2Nodes()

STATIC UINT64 GetSizeofSmmuV1V2Nodes ( IN CONST UINT32  NodeStartOffset,
IN CONST CM_ARM_SMMUV1_SMMUV2_NODE NodeList,
IN UINT32  NodeCount,
IN OUT IORT_NODE_INDEXER **CONST  NodeIndexer 
)

Returns the total size required for the SMMUv1/SMMUv2 nodes and updates the Node Indexer.

This function calculates the size required for the node group and also populates the Node Indexer array with offsets for the individual nodes.

Parameters
[in]NodeStartOffsetOffset from the start of the IORT where this node group starts.
[in]NodeListPointer to SMMUv1/SMMUv2 node list.
[in]NodeCountCount of the SMMUv1/SMMUv2 nodes.
[in,out]NodeIndexerPointer to the next Node Indexer.
Return values
Totalsize of the SMMUv1/SMMUv2 nodes.

Definition at line 417 of file IortGenerator.c.

◆ GetSizeofSmmuV3Nodes()

STATIC UINT64 GetSizeofSmmuV3Nodes ( IN CONST UINT32  NodeStartOffset,
IN CONST CM_ARM_SMMUV3_NODE NodeList,
IN UINT32  NodeCount,
IN OUT IORT_NODE_INDEXER **CONST  NodeIndexer 
)

Returns the total size required for the SMMUv3 nodes and updates the Node Indexer.

This function calculates the size required for the node group and also populates the Node Indexer array with offsets for the individual nodes.

Parameters
[in]NodeStartOffsetOffset from the start of the IORT where this node group starts.
[in]NodeListPointer to SMMUv3 node list.
[in]NodeCountCount of the SMMUv3 nodes.
[in,out]NodeIndexerPointer to the next Node Indexer.
Return values
Totalsize of the SMMUv3 nodes.

Definition at line 492 of file IortGenerator.c.

◆ GetSmmuV1V2NodeSize()

STATIC UINT32 GetSmmuV1V2NodeSize ( IN CONST CM_ARM_SMMUV1_SMMUV2_NODE Node)

Returns the size of the SMMUv1/SMMUv2 node.

Parameters
[in]NodePointer to SMMUv1/SMMUv2 node list.
Return values
Sizeof the SMMUv1/SMMUv2 node.

Definition at line 380 of file IortGenerator.c.

◆ GetSmmuV3NodeSize()

STATIC UINT32 GetSmmuV3NodeSize ( IN CONST CM_ARM_SMMUV3_NODE Node)

Returns the size of the SMMUv3 node.

Parameters
[in]NodePointer to SMMUv3 node list.
Return values
Totalsize of the SMMUv3 nodes.

Definition at line 461 of file IortGenerator.c.

◆ ValidateNodeIdentifiers()

STATIC EFI_STATUS ValidateNodeIdentifiers ( IN CONST IORT_NODE_INDEXER *CONST  NodeIndexer,
IN UINT32  NodeCount 
)

Validates that the IORT nodes Identifier are unique.

Parameters
[in]NodeIndexerPointer to the Node Indexer.
[in]NodeCountNumber of IORT Nodes.
Return values
EFI_SUCCESSSuccess.
EFI_INVALID_PARAMETERIdentifier field not unique.

Definition at line 2009 of file IortGenerator.c.

Variable Documentation

◆ IortGenerator

STATIC ACPI_IORT_GENERATOR IortGenerator

The interface for the MADT Table Generator.

Definition at line 2812 of file IortGenerator.c.