]> git.proxmox.com Git - mirror_edk2.git/commitdiff
DynamicTablesPkg: Update PPTT generator to ACPI 6.4
authorChris Jones <christopher.jones@arm.com>
Wed, 8 Dec 2021 16:06:29 +0000 (16:06 +0000)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fri, 10 Dec 2021 20:06:52 +0000 (20:06 +0000)
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>
DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c

index 58ad338d339f7f2cf506df961f016edb160f0edc..3d416ca78ec16a1929ede87abbe4f8f4464ef0cf 100644 (file)
@@ -1,11 +1,11 @@
 /** @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
-  - ACPI 6.3 Specification, January 2019\r
+  - ACPI 6.4 Specification, January 2021\r
 \r
   @par Glossary:\r
   - Cm or CM   - Configuration Manager\r
@@ -96,7 +96,7 @@ GetProcHierarchyNodeSize (
   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
@@ -116,7 +116,7 @@ GET_SIZE_OF_PPTT_STRUCTS (
 */\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
@@ -468,12 +468,12 @@ EFI_STATUS
 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
-  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
@@ -494,7 +494,7 @@ AddProcHierarchyNodes (
     (Pptt != NULL)\r
     );\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
@@ -538,7 +538,7 @@ AddProcHierarchyNodes (
     }\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
@@ -661,7 +661,7 @@ AddProcHierarchyNodes (
 \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
@@ -684,7 +684,7 @@ AddProcHierarchyNodes (
     }\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
@@ -748,12 +748,12 @@ EFI_STATUS
 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
-  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
@@ -765,7 +765,7 @@ AddCacheTypeStructures (
     (Pptt != NULL)\r
     );\r
 \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
@@ -775,13 +775,13 @@ AddCacheTypeStructures (
     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
-    // 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
@@ -941,7 +941,7 @@ AddCacheTypeStructures (
     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
@@ -999,7 +999,7 @@ BuildPpttTable (
   // 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
@@ -1087,7 +1087,7 @@ BuildPpttTable (
   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
@@ -1155,7 +1155,7 @@ BuildPpttTable (
     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
@@ -1312,9 +1312,9 @@ ACPI_PPTT_GENERATOR  PpttGenerator = {
     // 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
-    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