From: "Chris Jones" <christopher.jones@arm.com>
To: <devel@edk2.groups.io>
Cc: <michael.d.kinney@intel.com>, <gaoliming@byosoft.com.cn>,
<zhiguang.liu@intel.com>, <ray.ni@intel.com>,
<zhichao.gao@intel.com>, <Alexei.Fedorov@arm.com>,
<Sami.Mujawar@arm.com>, <nd@arm.com>
Subject: [PATCH v3 6/7] DynamicTablesPkg: Update PPTT generator to ACPI 6.4
Date: Wed, 8 Dec 2021 16:06:29 +0000 [thread overview]
Message-ID: <20211208160630.10923-7-christopher.jones@arm.com> (raw)
In-Reply-To: <20211208160630.10923-1-christopher.jones@arm.com>
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>
---
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 58ad338d339f7f2cf506df961f016edb160f0edc..3d416ca78ec16a1929ede87abbe4f8f4464ef0cf 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
);
@@ -468,12 +468,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;
@@ -494,7 +494,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;
@@ -538,7 +538,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;
@@ -661,7 +661,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
@@ -684,7 +684,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
@@ -748,12 +748,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;
@@ -765,7 +765,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;
@@ -775,13 +775,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;
@@ -941,7 +941,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
@@ -999,7 +999,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) &&
@@ -1087,7 +1087,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) {
@@ -1155,7 +1155,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,
@@ -1312,9 +1312,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")
next prev parent reply other threads:[~2021-12-08 16:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-08 16:06 [PATCH v3 0/7] Support ACPI 6.4 PPTT changes Chris Jones
2021-12-08 16:06 ` [PATCH v3 1/7] MdePkg: Add missing Cache ID (in)valid define Chris Jones
2021-12-08 16:06 ` [PATCH v3 2/7] MdePkg: Remove PPTT ID type structure Chris Jones
2021-12-08 16:06 ` [PATCH v3 3/7] ShellPkg: Update Acpiview PPTT parser to ACPI 6.4 Chris Jones
2021-12-08 16:06 ` [PATCH v3 4/7] ShellPkg: Add Cache ID to PPTT parser Chris Jones
2021-12-08 16:06 ` [PATCH v3 5/7] DynamicTablesPkg: Remove PPTT ID structure from ACPI 6.4 generator Chris Jones
2021-12-08 16:06 ` Chris Jones [this message]
2021-12-08 16:06 ` [PATCH v3 7/7] DynamicTablesPkg: Add CacheId to PPTT generator Chris Jones
2021-12-09 13:19 ` Sami Mujawar
2021-12-09 13:42 ` Chris Jones
2021-12-09 17:00 ` [PATCH v3 0/7] Support ACPI 6.4 PPTT changes Sami Mujawar
[not found] ` <16BF24D08620153C.20064@groups.io>
2021-12-10 20:10 ` [edk2-devel] " Sami Mujawar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211208160630.10923-7-christopher.jones@arm.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox