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.jo...@arm.com> --- DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c | 44 ++++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c index 65d1661c0ec47a4d1631c0dcac7bcb16dbc619e0..18f093998db57ea4698953ed06a9826df559c1b7 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c @@ -1,11 +1,11 @@ /** @file PPTT Table Generator - Copyright (c) 2019, ARM Limited. All rights reserved. + Copyright (c) 2021, ARM Limited. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent @par Reference(s): - - ACPI 6.3 Specification, January 2019 + - ACPI 6.4 Specification, January 2021 @par Glossary: - Cm or CM - Configuration Manager @@ -96,7 +96,7 @@ GetProcHierarchyNodeSize ( ASSERT (Node != NULL); // <size of Processor Hierarchy Node> + <size of Private Resources array> - return sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR) + + return sizeof (EFI_ACPI_6_4_PPTT_STRUCTURE_PROCESSOR) + (Node->NoOfPrivateResources * sizeof (UINT32)); } @@ -116,7 +116,7 @@ GET_SIZE_OF_PPTT_STRUCTS ( */ GET_SIZE_OF_PPTT_STRUCTS ( CacheTypeStructs, - sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE), + sizeof (EFI_ACPI_6_4_PPTT_STRUCTURE_CACHE), CM_ARM_CACHE_INFO ); @@ -466,12 +466,12 @@ EFI_STATUS AddProcHierarchyNodes ( IN CONST ACPI_PPTT_GENERATOR * CONST Generator, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST CfgMgrProtocol, - IN CONST EFI_ACPI_6_3_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_HEADER * Pptt, + IN CONST EFI_ACPI_6_4_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_HEADER * Pptt, IN CONST UINT32 NodesStartOffset ) { EFI_STATUS Status; - EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR * ProcStruct; + EFI_ACPI_6_4_PPTT_STRUCTURE_PROCESSOR * ProcStruct; UINT32 * PrivateResources; BOOLEAN IsGicCTokenDuplicated; @@ -492,7 +492,7 @@ AddProcHierarchyNodes ( (Pptt != NULL) ); - ProcStruct = (EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR*)((UINT8*)Pptt + + ProcStruct = (EFI_ACPI_6_4_PPTT_STRUCTURE_PROCESSOR*)((UINT8*)Pptt + NodesStartOffset); ProcNodeIterator = Generator->ProcHierarchyNodeIndexedList; @@ -536,7 +536,7 @@ AddProcHierarchyNodes ( } // Populate the node header - ProcStruct->Type = EFI_ACPI_6_3_PPTT_TYPE_PROCESSOR; + ProcStruct->Type = EFI_ACPI_6_4_PPTT_TYPE_PROCESSOR; ProcStruct->Length = (UINT8)Length; ProcStruct->Reserved[0] = EFI_ACPI_RESERVED_BYTE; ProcStruct->Reserved[1] = EFI_ACPI_RESERVED_BYTE; @@ -657,7 +657,7 @@ AddProcHierarchyNodes ( ProcStruct->NumberOfPrivateResources = ProcInfoNode->NoOfPrivateResources; PrivateResources = (UINT32*)((UINT8*)ProcStruct + - sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR)); + sizeof (EFI_ACPI_6_4_PPTT_STRUCTURE_PROCESSOR)); if (ProcStruct->NumberOfPrivateResources != 0) { // Populate the private resources array @@ -680,7 +680,7 @@ AddProcHierarchyNodes ( } // Next Processor Hierarchy Node - ProcStruct = (EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR*)((UINT8*)ProcStruct + + ProcStruct = (EFI_ACPI_6_4_PPTT_STRUCTURE_PROCESSOR*)((UINT8*)ProcStruct + ProcStruct->Length); ProcNodeIterator++; } // Processor Hierarchy Node @@ -744,12 +744,12 @@ EFI_STATUS AddCacheTypeStructures ( IN CONST ACPI_PPTT_GENERATOR * CONST Generator, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST CfgMgrProtocol, - IN CONST EFI_ACPI_6_3_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_HEADER * Pptt, + IN CONST EFI_ACPI_6_4_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_HEADER * Pptt, IN CONST UINT32 NodesStartOffset ) { EFI_STATUS Status; - EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE * CacheStruct; + EFI_ACPI_6_4_PPTT_STRUCTURE_CACHE * CacheStruct; PPTT_NODE_INDEXER * PpttNodeFound; CM_ARM_CACHE_INFO * CacheInfoNode; PPTT_NODE_INDEXER * CacheNodeIterator; @@ -761,7 +761,7 @@ AddCacheTypeStructures ( (Pptt != NULL) ); - CacheStruct = (EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE*)((UINT8*)Pptt + + CacheStruct = (EFI_ACPI_6_4_PPTT_STRUCTURE_CACHE*)((UINT8*)Pptt + NodesStartOffset); CacheNodeIterator = Generator->CacheStructIndexedList; @@ -771,13 +771,13 @@ AddCacheTypeStructures ( CacheInfoNode = (CM_ARM_CACHE_INFO*)CacheNodeIterator->Object; // Populate the node header - CacheStruct->Type = EFI_ACPI_6_3_PPTT_TYPE_CACHE; - CacheStruct->Length = sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE); + CacheStruct->Type = EFI_ACPI_6_4_PPTT_TYPE_CACHE; + CacheStruct->Length = sizeof (EFI_ACPI_6_4_PPTT_STRUCTURE_CACHE); CacheStruct->Reserved[0] = EFI_ACPI_RESERVED_BYTE; CacheStruct->Reserved[1] = EFI_ACPI_RESERVED_BYTE; // "On Arm-based systems, all cache properties must be provided in the - // table." (ACPI 6.3, Section 5.2.29.2) + // table." (ACPI 6.4, Section 5.2.29.2) CacheStruct->Flags.SizePropertyValid = 1; CacheStruct->Flags.NumberOfSetsValid = 1; CacheStruct->Flags.AssociativityValid = 1; @@ -936,7 +936,7 @@ AddCacheTypeStructures ( CacheStruct->LineSize = CacheInfoNode->LineSize; // Next Cache Type Structure - CacheStruct = (EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE*)((UINT8*)CacheStruct + + CacheStruct = (EFI_ACPI_6_4_PPTT_STRUCTURE_CACHE*)((UINT8*)CacheStruct + CacheStruct->Length); CacheNodeIterator++; } // Cache Type Structure @@ -994,7 +994,7 @@ BuildPpttTable ( // Pointer to the Node Indexer array PPTT_NODE_INDEXER * NodeIndexer; - EFI_ACPI_6_3_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_HEADER * Pptt; + EFI_ACPI_6_4_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_HEADER * Pptt; ASSERT ( (This != NULL) && @@ -1081,7 +1081,7 @@ BuildPpttTable ( Generator->NodeIndexer = NodeIndexer; // Calculate the size of the PPTT table - TableSize = sizeof (EFI_ACPI_6_3_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_HEADER); + TableSize = sizeof (EFI_ACPI_6_4_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_HEADER); // Include the size of Processor Hierarchy Nodes and index them if (Generator->ProcHierarchyNodeCount != 0) { @@ -1150,7 +1150,7 @@ BuildPpttTable ( goto error_handler; } - Pptt = (EFI_ACPI_6_3_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_HEADER*)*Table; + Pptt = (EFI_ACPI_6_4_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_HEADER*)*Table; DEBUG (( DEBUG_INFO, @@ -1307,9 +1307,9 @@ ACPI_PPTT_GENERATOR PpttGenerator = { // Generator Description L"ACPI.STD.PPTT.GENERATOR", // ACPI Table Signature - EFI_ACPI_6_3_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_STRUCTURE_SIGNATURE, + EFI_ACPI_6_4_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_STRUCTURE_SIGNATURE, // ACPI Table Revision supported by this Generator - EFI_ACPI_6_3_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_REVISION, + EFI_ACPI_6_4_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_REVISION, // Minimum supported ACPI Table Revision EFI_ACPI_6_3_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_REVISION, // Creator ID -- Guid("CE165669-3EF3-493F-B85D-6190EE5B9759") -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#82234): https://edk2.groups.io/g/devel/message/82234 Mute This Topic: https://groups.io/mt/86416277/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-