EArmObjSmmuInterruptArray, ///< 26 - SMMU Interrupt Array\r
EArmObjProcHierarchyInfo, ///< 27 - Processor Hierarchy Info\r
EArmObjCacheInfo, ///< 28 - Cache Info\r
- EArmObjProcNodeIdInfo, ///< 29 - Processor Node ID Info\r
+ EArmObjReserved29, ///< 29 - Reserved\r
EArmObjCmRef, ///< 30 - CM Object Reference\r
EArmObjMemoryAffinityInfo, ///< 31 - Memory Affinity Info\r
EArmObjDeviceHandleAcpi, ///< 32 - Device Handle Acpi\r
UINT16 LineSize;\r
} CM_ARM_CACHE_INFO;\r
\r
-/** A structure that describes the ID Structure (Type 2) in PPTT\r
-\r
- ID: EArmObjProcNodeIdInfo\r
-*/\r
-typedef struct CmArmProcNodeIdInfo {\r
- /// A unique token used to identify this object\r
- CM_OBJECT_TOKEN Token;\r
- // Vendor ID (as described in ACPI ID registry)\r
- UINT32 VendorId;\r
- /// First level unique node ID\r
- UINT64 Level1Id;\r
- /// Second level unique node ID\r
- UINT64 Level2Id;\r
- /// Major revision of the node\r
- UINT16 MajorRev;\r
- /// Minor revision of the node\r
- UINT16 MinorRev;\r
- /// Spin revision of the node\r
- UINT16 SpinRev;\r
-} CM_ARM_PROC_NODE_ID_INFO;\r
-\r
/** A structure that describes a reference to another Configuration Manager\r
object.\r
\r
The following Configuration Manager Object(s) are used by this Generator:\r
- EArmObjProcHierarchyInfo (REQUIRED)\r
- EArmObjCacheInfo\r
- - EArmObjProcNodeIdInfo\r
- EArmObjCmRef\r
- EArmObjGicCInfo (REQUIRED)\r
*/\r
CM_ARM_CACHE_INFO\r
);\r
\r
-/**\r
- This macro expands to a function that retrieves the ID information for\r
- Processor Hierarchy Nodes from the Configuration Manager.\r
-*/\r
-GET_OBJECT_LIST (\r
- EObjNameSpaceArm,\r
- EArmObjProcNodeIdInfo,\r
- CM_ARM_PROC_NODE_ID_INFO\r
- );\r
-\r
/**\r
This macro expands to a function that retrieves the cross-CM-object-\r
reference information from the Configuration Manager.\r
CM_ARM_CACHE_INFO\r
);\r
\r
-/** This macro expands to a function that retrieves the amount of memory\r
- required to store the ID Structures (Type 2) and updates the Node Indexer.\r
-*/\r
-GET_SIZE_OF_PPTT_STRUCTS (\r
- IdStructs,\r
- sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_ID),\r
- CM_ARM_PROC_NODE_ID_INFO\r
- );\r
-\r
/**\r
Search the Node Indexer and return the indexed PPTT node with the given\r
Token.\r
}\r
\r
// The Node indexer has the Processor hierarchy nodes at the begining\r
- // followed by the cache structs and Id structs. Therefore we can\r
- // skip the Processor hierarchy nodes in the node indexer search.\r
+ // followed by the cache structs. Therefore we can skip the Processor\r
+ // hierarchy nodes in the node indexer search.\r
Status = GetPpttNodeReferencedByToken (\r
Generator->CacheStructIndexedList,\r
(Generator->ProcTopologyStructCount -\r
return EFI_SUCCESS;\r
}\r
\r
-/**\r
- Update the ID Type Structure (Type 2) information.\r
-\r
- This function populates the ID Type Structures with information from\r
- the Configuration Manager and and adds this information to the PPTT table.\r
-\r
- @param [in] Generator Pointer to the PPTT Generator.\r
- @param [in] CfgMgrProtocol Pointer to the Configuration Manager\r
- Protocol Interface.\r
- @param [in] Pptt Pointer to PPTT table structure.\r
- @param [in] NodesStartOffset Offset from the start of PPTT table to the\r
- start of ID Type Structures.\r
-\r
- @retval EFI_SUCCESS Structures updated successfully.\r
- @retval EFI_INVALID_PARAMETER A parameter is invalid.\r
- @retval EFI_NOT_FOUND A required object was not found.\r
-**/\r
-STATIC\r
-EFI_STATUS\r
-AddIdTypeStructures (\r
- IN CONST ACPI_PPTT_GENERATOR *CONST Generator,\r
- IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol,\r
- IN CONST EFI_ACPI_6_3_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_HEADER *Pptt,\r
- IN CONST UINT32 NodesStartOffset\r
- )\r
-{\r
- EFI_ACPI_6_3_PPTT_STRUCTURE_ID *IdStruct;\r
- CM_ARM_PROC_NODE_ID_INFO *ProcIdInfoNode;\r
- PPTT_NODE_INDEXER *IdStructIterator;\r
- UINT32 NodeCount;\r
-\r
- ASSERT (\r
- (Generator != NULL) &&\r
- (CfgMgrProtocol != NULL) &&\r
- (Pptt != NULL)\r
- );\r
-\r
- IdStruct = (EFI_ACPI_6_3_PPTT_STRUCTURE_ID *)((UINT8 *)Pptt + NodesStartOffset);\r
-\r
- IdStructIterator = Generator->IdStructIndexedList;\r
- NodeCount = Generator->IdStructCount;\r
- while (NodeCount-- != 0) {\r
- ProcIdInfoNode = (CM_ARM_PROC_NODE_ID_INFO *)IdStructIterator->Object;\r
-\r
- // Populate the node\r
- IdStruct->Type = EFI_ACPI_6_3_PPTT_TYPE_ID;\r
- IdStruct->Length = sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_ID);\r
- IdStruct->Reserved[0] = EFI_ACPI_RESERVED_BYTE;\r
- IdStruct->Reserved[1] = EFI_ACPI_RESERVED_BYTE;\r
- IdStruct->VendorId = ProcIdInfoNode->VendorId;\r
- IdStruct->Level1Id = ProcIdInfoNode->Level1Id;\r
- IdStruct->Level2Id = ProcIdInfoNode->Level2Id;\r
- IdStruct->MajorRev = ProcIdInfoNode->MajorRev;\r
- IdStruct->MinorRev = ProcIdInfoNode->MinorRev;\r
- IdStruct->SpinRev = ProcIdInfoNode->SpinRev;\r
-\r
- // Next ID Type Structure\r
- IdStruct = (EFI_ACPI_6_3_PPTT_STRUCTURE_ID *)((UINT8 *)IdStruct +\r
- IdStruct->Length);\r
- IdStructIterator++;\r
- } // ID Type Structure\r
-\r
- return EFI_SUCCESS;\r
-}\r
-\r
/**\r
Construct the PPTT ACPI table.\r
\r
UINT32 ProcTopologyStructCount;\r
UINT32 ProcHierarchyNodeCount;\r
UINT32 CacheStructCount;\r
- UINT32 IdStructCount;\r
\r
UINT32 ProcHierarchyNodeOffset;\r
UINT32 CacheStructOffset;\r
- UINT32 IdStructOffset;\r
\r
CM_ARM_PROC_HIERARCHY_INFO *ProcHierarchyNodeList;\r
CM_ARM_CACHE_INFO *CacheStructList;\r
- CM_ARM_PROC_NODE_ID_INFO *IdStructList;\r
\r
ACPI_PPTT_GENERATOR *Generator;\r
\r
ProcTopologyStructCount += CacheStructCount;\r
Generator->CacheStructCount = CacheStructCount;\r
\r
- // Get the processor hierarchy node ID info and update the processor topology\r
- // structure count with ID Structures (Type 2)\r
- Status = GetEArmObjProcNodeIdInfo (\r
- CfgMgrProtocol,\r
- CM_NULL_TOKEN,\r
- &IdStructList,\r
- &IdStructCount\r
- );\r
- if (EFI_ERROR (Status) && (Status != EFI_NOT_FOUND)) {\r
- DEBUG ((\r
- DEBUG_ERROR,\r
- "ERROR: PPTT: Failed to get processor hierarchy node ID info. " \\r
- "Status = %r\n",\r
- Status\r
- ));\r
- goto error_handler;\r
- }\r
-\r
- ProcTopologyStructCount += IdStructCount;\r
- Generator->IdStructCount = IdStructCount;\r
-\r
// Allocate Node Indexer array\r
NodeIndexer = (PPTT_NODE_INDEXER *)AllocateZeroPool (\r
sizeof (PPTT_NODE_INDEXER) *\r
));\r
}\r
\r
- // Include the size of ID Type Structures and index them\r
- if (Generator->IdStructCount != 0) {\r
- IdStructOffset = TableSize;\r
- Generator->IdStructIndexedList = NodeIndexer;\r
- TableSize += GetSizeofIdStructs (\r
- IdStructOffset,\r
- IdStructList,\r
- Generator->IdStructCount,\r
- &NodeIndexer\r
- );\r
- DEBUG ((\r
- DEBUG_INFO,\r
- " IdStructCount = %d\n" \\r
- " IdStructOffset = 0x%x\n" \\r
- " IdStructIndexedList = 0x%p\n",\r
- Generator->IdStructCount,\r
- IdStructOffset,\r
- Generator->IdStructIndexedList\r
- ));\r
- }\r
-\r
DEBUG ((\r
DEBUG_INFO,\r
"INFO: PPTT:\n" \\r
}\r
}\r
\r
- // Add ID Type Structures (Type 2) to the generated table\r
- if (Generator->IdStructCount != 0) {\r
- Status = AddIdTypeStructures (\r
- Generator,\r
- CfgMgrProtocol,\r
- Pptt,\r
- IdStructOffset\r
- );\r
- if (EFI_ERROR (Status)) {\r
- DEBUG ((\r
- DEBUG_ERROR,\r
- "ERROR: PPTT: Failed to add ID Type Structures. Status = %r\n",\r
- Status\r
- ));\r
- goto error_handler;\r
- }\r
- }\r
-\r
// Validate CM object cross-references in PPTT\r
Status = DetectCyclesInTopology (Generator);\r
if (EFI_ERROR (Status)) {\r
0,\r
// Count of Cache Structures\r
0,\r
- // Count of Id Structures\r
- 0,\r
// Pointer to PPTT Node Indexer\r
NULL\r
};\r