Bugzilla: 3697 (https://bugzilla.tianocore.org/show_bug.cgi?id=3697)
Update the PPTT generator to use Acpi64.h.
Signed-off-by: Chris Jones <christopher.jones@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
/** @file\r
PPTT Table Generator\r
\r
/** @file\r
PPTT Table Generator\r
\r
- Copyright (c) 2019, ARM Limited. All rights reserved.\r
+ Copyright (c) 2021, ARM Limited. All rights reserved.\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
@par Reference(s):\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
@par Reference(s):\r
- - ACPI 6.3 Specification, January 2019\r
+ - ACPI 6.4 Specification, January 2021\r
\r
@par Glossary:\r
- Cm or CM - Configuration Manager\r
\r
@par Glossary:\r
- Cm or CM - Configuration Manager\r
ASSERT (Node != NULL);\r
\r
// <size of Processor Hierarchy Node> + <size of Private Resources array>\r
ASSERT (Node != NULL);\r
\r
// <size of Processor Hierarchy Node> + <size of Private Resources array>\r
- return sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR) +\r
+ return sizeof (EFI_ACPI_6_4_PPTT_STRUCTURE_PROCESSOR) +\r
(Node->NoOfPrivateResources * sizeof (UINT32));\r
}\r
\r
(Node->NoOfPrivateResources * sizeof (UINT32));\r
}\r
\r
*/\r
GET_SIZE_OF_PPTT_STRUCTS (\r
CacheTypeStructs,\r
*/\r
GET_SIZE_OF_PPTT_STRUCTS (\r
CacheTypeStructs,\r
- sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE),\r
+ sizeof (EFI_ACPI_6_4_PPTT_STRUCTURE_CACHE),\r
CM_ARM_CACHE_INFO\r
);\r
\r
CM_ARM_CACHE_INFO\r
);\r
\r
AddProcHierarchyNodes (\r
IN CONST ACPI_PPTT_GENERATOR *CONST Generator,\r
IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol,\r
AddProcHierarchyNodes (\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 EFI_ACPI_6_4_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_HEADER *Pptt,\r
IN CONST UINT32 NodesStartOffset\r
)\r
{\r
EFI_STATUS Status;\r
IN CONST UINT32 NodesStartOffset\r
)\r
{\r
EFI_STATUS Status;\r
- EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR *ProcStruct;\r
+ EFI_ACPI_6_4_PPTT_STRUCTURE_PROCESSOR *ProcStruct;\r
UINT32 *PrivateResources;\r
BOOLEAN IsGicCTokenDuplicated;\r
\r
UINT32 *PrivateResources;\r
BOOLEAN IsGicCTokenDuplicated;\r
\r
- ProcStruct = (EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR *)((UINT8 *)Pptt +\r
+ ProcStruct = (EFI_ACPI_6_4_PPTT_STRUCTURE_PROCESSOR *)((UINT8 *)Pptt +\r
NodesStartOffset);\r
\r
ProcNodeIterator = Generator->ProcHierarchyNodeIndexedList;\r
NodesStartOffset);\r
\r
ProcNodeIterator = Generator->ProcHierarchyNodeIndexedList;\r
}\r
\r
// Populate the node header\r
}\r
\r
// Populate the node header\r
- ProcStruct->Type = EFI_ACPI_6_3_PPTT_TYPE_PROCESSOR;\r
+ ProcStruct->Type = EFI_ACPI_6_4_PPTT_TYPE_PROCESSOR;\r
ProcStruct->Length = (UINT8)Length;\r
ProcStruct->Reserved[0] = EFI_ACPI_RESERVED_BYTE;\r
ProcStruct->Reserved[1] = EFI_ACPI_RESERVED_BYTE;\r
ProcStruct->Length = (UINT8)Length;\r
ProcStruct->Reserved[0] = EFI_ACPI_RESERVED_BYTE;\r
ProcStruct->Reserved[1] = EFI_ACPI_RESERVED_BYTE;\r
\r
ProcStruct->NumberOfPrivateResources = ProcInfoNode->NoOfPrivateResources;\r
PrivateResources = (UINT32 *)((UINT8 *)ProcStruct +\r
\r
ProcStruct->NumberOfPrivateResources = ProcInfoNode->NoOfPrivateResources;\r
PrivateResources = (UINT32 *)((UINT8 *)ProcStruct +\r
- sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR));\r
+ sizeof (EFI_ACPI_6_4_PPTT_STRUCTURE_PROCESSOR));\r
\r
if (ProcStruct->NumberOfPrivateResources != 0) {\r
// Populate the private resources array\r
\r
if (ProcStruct->NumberOfPrivateResources != 0) {\r
// Populate the private resources array\r
}\r
\r
// Next Processor Hierarchy Node\r
}\r
\r
// Next Processor Hierarchy Node\r
- ProcStruct = (EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR *)((UINT8 *)ProcStruct +\r
+ ProcStruct = (EFI_ACPI_6_4_PPTT_STRUCTURE_PROCESSOR *)((UINT8 *)ProcStruct +\r
ProcStruct->Length);\r
ProcNodeIterator++;\r
} // Processor Hierarchy Node\r
ProcStruct->Length);\r
ProcNodeIterator++;\r
} // Processor Hierarchy Node\r
AddCacheTypeStructures (\r
IN CONST ACPI_PPTT_GENERATOR *CONST Generator,\r
IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol,\r
AddCacheTypeStructures (\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 EFI_ACPI_6_4_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_HEADER *Pptt,\r
IN CONST UINT32 NodesStartOffset\r
)\r
{\r
EFI_STATUS Status;\r
IN CONST UINT32 NodesStartOffset\r
)\r
{\r
EFI_STATUS Status;\r
- EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE *CacheStruct;\r
+ EFI_ACPI_6_4_PPTT_STRUCTURE_CACHE *CacheStruct;\r
PPTT_NODE_INDEXER *PpttNodeFound;\r
CM_ARM_CACHE_INFO *CacheInfoNode;\r
PPTT_NODE_INDEXER *CacheNodeIterator;\r
PPTT_NODE_INDEXER *PpttNodeFound;\r
CM_ARM_CACHE_INFO *CacheInfoNode;\r
PPTT_NODE_INDEXER *CacheNodeIterator;\r
- CacheStruct = (EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE *)((UINT8 *)Pptt +\r
+ CacheStruct = (EFI_ACPI_6_4_PPTT_STRUCTURE_CACHE *)((UINT8 *)Pptt +\r
NodesStartOffset);\r
\r
CacheNodeIterator = Generator->CacheStructIndexedList;\r
NodesStartOffset);\r
\r
CacheNodeIterator = Generator->CacheStructIndexedList;\r
CacheInfoNode = (CM_ARM_CACHE_INFO *)CacheNodeIterator->Object;\r
\r
// Populate the node header\r
CacheInfoNode = (CM_ARM_CACHE_INFO *)CacheNodeIterator->Object;\r
\r
// Populate the node header\r
- CacheStruct->Type = EFI_ACPI_6_3_PPTT_TYPE_CACHE;\r
- CacheStruct->Length = sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE);\r
+ CacheStruct->Type = EFI_ACPI_6_4_PPTT_TYPE_CACHE;\r
+ CacheStruct->Length = sizeof (EFI_ACPI_6_4_PPTT_STRUCTURE_CACHE);\r
CacheStruct->Reserved[0] = EFI_ACPI_RESERVED_BYTE;\r
CacheStruct->Reserved[1] = EFI_ACPI_RESERVED_BYTE;\r
\r
// "On Arm-based systems, all cache properties must be provided in the\r
CacheStruct->Reserved[0] = EFI_ACPI_RESERVED_BYTE;\r
CacheStruct->Reserved[1] = EFI_ACPI_RESERVED_BYTE;\r
\r
// "On Arm-based systems, all cache properties must be provided in the\r
- // table." (ACPI 6.3, Section 5.2.29.2)\r
+ // table." (ACPI 6.4, Section 5.2.29.2)\r
CacheStruct->Flags.SizePropertyValid = 1;\r
CacheStruct->Flags.NumberOfSetsValid = 1;\r
CacheStruct->Flags.AssociativityValid = 1;\r
CacheStruct->Flags.SizePropertyValid = 1;\r
CacheStruct->Flags.NumberOfSetsValid = 1;\r
CacheStruct->Flags.AssociativityValid = 1;\r
CacheStruct->LineSize = CacheInfoNode->LineSize;\r
\r
// Next Cache Type Structure\r
CacheStruct->LineSize = CacheInfoNode->LineSize;\r
\r
// Next Cache Type Structure\r
- CacheStruct = (EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE *)((UINT8 *)CacheStruct +\r
+ CacheStruct = (EFI_ACPI_6_4_PPTT_STRUCTURE_CACHE *)((UINT8 *)CacheStruct +\r
CacheStruct->Length);\r
CacheNodeIterator++;\r
} // Cache Type Structure\r
CacheStruct->Length);\r
CacheNodeIterator++;\r
} // Cache Type Structure\r
// Pointer to the Node Indexer array\r
PPTT_NODE_INDEXER *NodeIndexer;\r
\r
// Pointer to the Node Indexer array\r
PPTT_NODE_INDEXER *NodeIndexer;\r
\r
- EFI_ACPI_6_3_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_HEADER *Pptt;\r
+ EFI_ACPI_6_4_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_HEADER *Pptt;\r
\r
ASSERT (\r
(This != NULL) &&\r
\r
ASSERT (\r
(This != NULL) &&\r
Generator->NodeIndexer = NodeIndexer;\r
\r
// Calculate the size of the PPTT table\r
Generator->NodeIndexer = NodeIndexer;\r
\r
// Calculate the size of the PPTT table\r
- TableSize = sizeof (EFI_ACPI_6_3_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_HEADER);\r
+ TableSize = sizeof (EFI_ACPI_6_4_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_HEADER);\r
\r
// Include the size of Processor Hierarchy Nodes and index them\r
if (Generator->ProcHierarchyNodeCount != 0) {\r
\r
// Include the size of Processor Hierarchy Nodes and index them\r
if (Generator->ProcHierarchyNodeCount != 0) {\r
goto error_handler;\r
}\r
\r
goto error_handler;\r
}\r
\r
- Pptt = (EFI_ACPI_6_3_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_HEADER *)*Table;\r
+ Pptt = (EFI_ACPI_6_4_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_HEADER *)*Table;\r
\r
DEBUG ((\r
DEBUG_INFO,\r
\r
DEBUG ((\r
DEBUG_INFO,\r
// Generator Description\r
L"ACPI.STD.PPTT.GENERATOR",\r
// ACPI Table Signature\r
// Generator Description\r
L"ACPI.STD.PPTT.GENERATOR",\r
// ACPI Table Signature\r
- EFI_ACPI_6_3_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_STRUCTURE_SIGNATURE,\r
+ EFI_ACPI_6_4_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_STRUCTURE_SIGNATURE,\r
// ACPI Table Revision supported by this Generator\r
// ACPI Table Revision supported by this Generator\r
- EFI_ACPI_6_3_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_REVISION,\r
+ EFI_ACPI_6_4_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_REVISION,\r
// Minimum supported ACPI Table Revision\r
EFI_ACPI_6_3_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_REVISION,\r
// Creator ID\r
// Minimum supported ACPI Table Revision\r
EFI_ACPI_6_3_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_REVISION,\r
// Creator ID\r