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 v2 5/7] DynamicTablesPkg: Remove PPTT ID structure from ACPI 6.4 generator
Date: Wed, 3 Nov 2021 15:41:06 +0000 [thread overview]
Message-ID: <20211103154108.6534-6-christopher.jones@arm.com> (raw)
In-Reply-To: <20211103154108.6534-1-christopher.jones@arm.com>
Bugzilla: 3697 (https://bugzilla.tianocore.org/show_bug.cgi?id=3697)
ACPI 6.3A deprecated PPTT ID (type 2) structure which was subsequently
removed in ACPI 6.4. Therefore remove support for generating PPTT ID
structures.
Signed-off-by: Chris Jones <christopher.jones@arm.com>
---
DynamicTablesPkg/Include/ArmNameSpaceObjects.h | 23 +--
DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c | 155 +-------------------
DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.h | 4 -
3 files changed, 3 insertions(+), 179 deletions(-)
diff --git a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h
index f19c9c70666970bb70b6aa09f064bb10a9a67112..6bc5ab6b2b28424c1afddc26cc89a54b81941aeb 100644
--- a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h
+++ b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h
@@ -50,7 +50,7 @@ typedef enum ArmObjectID {
EArmObjSmmuInterruptArray, ///< 26 - SMMU Interrupt Array
EArmObjProcHierarchyInfo, ///< 27 - Processor Hierarchy Info
EArmObjCacheInfo, ///< 28 - Cache Info
- EArmObjProcNodeIdInfo, ///< 29 - Processor Node ID Info
+ EArmObjReserved29, ///< 29 - Reserved
EArmObjCmRef, ///< 30 - CM Object Reference
EArmObjMemoryAffinityInfo, ///< 31 - Memory Affinity Info
EArmObjDeviceHandleAcpi, ///< 32 - Device Handle Acpi
@@ -746,27 +746,6 @@ typedef struct CmArmCacheInfo {
UINT16 LineSize;
} CM_ARM_CACHE_INFO;
-/** A structure that describes the ID Structure (Type 2) in PPTT
-
- ID: EArmObjProcNodeIdInfo
-*/
-typedef struct CmArmProcNodeIdInfo {
- /// A unique token used to identify this object
- CM_OBJECT_TOKEN Token;
- // Vendor ID (as described in ACPI ID registry)
- UINT32 VendorId;
- /// First level unique node ID
- UINT64 Level1Id;
- /// Second level unique node ID
- UINT64 Level2Id;
- /// Major revision of the node
- UINT16 MajorRev;
- /// Minor revision of the node
- UINT16 MinorRev;
- /// Spin revision of the node
- UINT16 SpinRev;
-} CM_ARM_PROC_NODE_ID_INFO;
-
/** A structure that describes a reference to another Configuration Manager
object.
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c
index d70fc59e754e7d348965b8c3739822a9f1c4b7e6..65d1661c0ec47a4d1631c0dcac7bcb16dbc619e0 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c
@@ -34,7 +34,6 @@
The following Configuration Manager Object(s) are used by this Generator:
- EArmObjProcHierarchyInfo (REQUIRED)
- EArmObjCacheInfo
- - EArmObjProcNodeIdInfo
- EArmObjCmRef
- EArmObjGicCInfo (REQUIRED)
*/
@@ -59,16 +58,6 @@ GET_OBJECT_LIST (
CM_ARM_CACHE_INFO
);
-/**
- This macro expands to a function that retrieves the ID information for
- Processor Hierarchy Nodes from the Configuration Manager.
-*/
-GET_OBJECT_LIST (
- EObjNameSpaceArm,
- EArmObjProcNodeIdInfo,
- CM_ARM_PROC_NODE_ID_INFO
- );
-
/**
This macro expands to a function that retrieves the cross-CM-object-
reference information from the Configuration Manager.
@@ -131,15 +120,6 @@ GET_SIZE_OF_PPTT_STRUCTS (
CM_ARM_CACHE_INFO
);
-/** This macro expands to a function that retrieves the amount of memory
- required to store the ID Structures (Type 2) and updates the Node Indexer.
-*/
-GET_SIZE_OF_PPTT_STRUCTS (
- IdStructs,
- sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_ID),
- CM_ARM_PROC_NODE_ID_INFO
- );
-
/**
Search the Node Indexer and return the indexed PPTT node with the given
Token.
@@ -372,8 +352,8 @@ AddPrivateResources (
}
// The Node indexer has the Processor hierarchy nodes at the begining
- // followed by the cache structs and Id structs. Therefore we can
- // skip the Processor hierarchy nodes in the node indexer search.
+ // followed by the cache structs. Therefore we can skip the Processor
+ // hierarchy nodes in the node indexer search.
Status = GetPpttNodeReferencedByToken (
Generator->CacheStructIndexedList,
(Generator->ProcTopologyStructCount -
@@ -964,72 +944,6 @@ AddCacheTypeStructures (
return EFI_SUCCESS;
}
-/**
- Update the ID Type Structure (Type 2) information.
-
- This function populates the ID Type Structures with information from
- the Configuration Manager and and adds this information to the PPTT table.
-
- @param [in] Generator Pointer to the PPTT Generator.
- @param [in] CfgMgrProtocol Pointer to the Configuration Manager
- Protocol Interface.
- @param [in] Pptt Pointer to PPTT table structure.
- @param [in] NodesStartOffset Offset from the start of PPTT table to the
- start of ID Type Structures.
-
- @retval EFI_SUCCESS Structures updated successfully.
- @retval EFI_INVALID_PARAMETER A parameter is invalid.
- @retval EFI_NOT_FOUND A required object was not found.
-**/
-STATIC
-EFI_STATUS
-AddIdTypeStructures (
- 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 UINT32 NodesStartOffset
- )
-{
- EFI_ACPI_6_3_PPTT_STRUCTURE_ID * IdStruct;
- CM_ARM_PROC_NODE_ID_INFO * ProcIdInfoNode;
- PPTT_NODE_INDEXER * IdStructIterator;
- UINT32 NodeCount;
-
-
- ASSERT (
- (Generator != NULL) &&
- (CfgMgrProtocol != NULL) &&
- (Pptt != NULL)
- );
-
- IdStruct = (EFI_ACPI_6_3_PPTT_STRUCTURE_ID*)((UINT8*)Pptt + NodesStartOffset);
-
- IdStructIterator = Generator->IdStructIndexedList;
- NodeCount = Generator->IdStructCount;
- while (NodeCount-- != 0) {
- ProcIdInfoNode = (CM_ARM_PROC_NODE_ID_INFO*)IdStructIterator->Object;
-
- // Populate the node
- IdStruct->Type = EFI_ACPI_6_3_PPTT_TYPE_ID;
- IdStruct->Length = sizeof (EFI_ACPI_6_3_PPTT_STRUCTURE_ID);
- IdStruct->Reserved[0] = EFI_ACPI_RESERVED_BYTE;
- IdStruct->Reserved[1] = EFI_ACPI_RESERVED_BYTE;
- IdStruct->VendorId = ProcIdInfoNode->VendorId;
- IdStruct->Level1Id = ProcIdInfoNode->Level1Id;
- IdStruct->Level2Id = ProcIdInfoNode->Level2Id;
- IdStruct->MajorRev = ProcIdInfoNode->MajorRev;
- IdStruct->MinorRev = ProcIdInfoNode->MinorRev;
- IdStruct->SpinRev = ProcIdInfoNode->SpinRev;
-
- // Next ID Type Structure
- IdStruct = (EFI_ACPI_6_3_PPTT_STRUCTURE_ID*)((UINT8*)IdStruct +
- IdStruct->Length);
- IdStructIterator++;
- } // ID Type Structure
-
- return EFI_SUCCESS;
-}
-
/**
Construct the PPTT ACPI table.
@@ -1068,15 +982,12 @@ BuildPpttTable (
UINT32 ProcTopologyStructCount;
UINT32 ProcHierarchyNodeCount;
UINT32 CacheStructCount;
- UINT32 IdStructCount;
UINT32 ProcHierarchyNodeOffset;
UINT32 CacheStructOffset;
- UINT32 IdStructOffset;
CM_ARM_PROC_HIERARCHY_INFO * ProcHierarchyNodeList;
CM_ARM_CACHE_INFO * CacheStructList;
- CM_ARM_PROC_NODE_ID_INFO * IdStructList;
ACPI_PPTT_GENERATOR * Generator;
@@ -1150,27 +1061,6 @@ BuildPpttTable (
ProcTopologyStructCount += CacheStructCount;
Generator->CacheStructCount = CacheStructCount;
- // Get the processor hierarchy node ID info and update the processor topology
- // structure count with ID Structures (Type 2)
- Status = GetEArmObjProcNodeIdInfo (
- CfgMgrProtocol,
- CM_NULL_TOKEN,
- &IdStructList,
- &IdStructCount
- );
- if (EFI_ERROR (Status) && (Status != EFI_NOT_FOUND)) {
- DEBUG ((
- DEBUG_ERROR,
- "ERROR: PPTT: Failed to get processor hierarchy node ID info. " \
- "Status = %r\n",
- Status
- ));
- goto error_handler;
- }
-
- ProcTopologyStructCount += IdStructCount;
- Generator->IdStructCount = IdStructCount;
-
// Allocate Node Indexer array
NodeIndexer = (PPTT_NODE_INDEXER*)AllocateZeroPool (
sizeof (PPTT_NODE_INDEXER) *
@@ -1237,27 +1127,6 @@ BuildPpttTable (
));
}
- // Include the size of ID Type Structures and index them
- if (Generator->IdStructCount != 0) {
- IdStructOffset = TableSize;
- Generator->IdStructIndexedList = NodeIndexer;
- TableSize += GetSizeofIdStructs (
- IdStructOffset,
- IdStructList,
- Generator->IdStructCount,
- &NodeIndexer
- );
- DEBUG ((
- DEBUG_INFO,
- " IdStructCount = %d\n" \
- " IdStructOffset = 0x%x\n" \
- " IdStructIndexedList = 0x%p\n",
- Generator->IdStructCount,
- IdStructOffset,
- Generator->IdStructIndexedList
- ));
- }
-
DEBUG ((
DEBUG_INFO,
"INFO: PPTT:\n" \
@@ -1343,24 +1212,6 @@ BuildPpttTable (
}
}
- // Add ID Type Structures (Type 2) to the generated table
- if (Generator->IdStructCount != 0) {
- Status = AddIdTypeStructures (
- Generator,
- CfgMgrProtocol,
- Pptt,
- IdStructOffset
- );
- if (EFI_ERROR (Status)) {
- DEBUG ((
- DEBUG_ERROR,
- "ERROR: PPTT: Failed to add ID Type Structures. Status = %r\n",
- Status
- ));
- goto error_handler;
- }
- }
-
// Validate CM object cross-references in PPTT
Status = DetectCyclesInTopology (Generator);
if (EFI_ERROR (Status)) {
@@ -1484,8 +1335,6 @@ ACPI_PPTT_GENERATOR PpttGenerator = {
0,
// Count of Cache Structures
0,
- // Count of Id Structures
- 0,
// Pointer to PPTT Node Indexer
NULL
};
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.h b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.h
index 0a14da502d595e27d87262b1bac681318f1d9ced..59ddd71ac4ef57d748e143afaa6ac0befb4900e0 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.h
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.h
@@ -171,8 +171,6 @@ typedef struct AcpiPpttGenerator {
UINT32 ProcHierarchyNodeCount;
/// Count of Cache Structures
UINT32 CacheStructCount;
- /// Count of Id Structures
- UINT32 IdStructCount;
/// List of indexed CM objects for PPTT generation
PPTT_NODE_INDEXER * NodeIndexer;
/// Pointer to the start of Processor Hierarchy nodes in
@@ -180,8 +178,6 @@ typedef struct AcpiPpttGenerator {
PPTT_NODE_INDEXER * ProcHierarchyNodeIndexedList;
/// Pointer to the start of Cache Structures in the Node Indexer array
PPTT_NODE_INDEXER * CacheStructIndexedList;
- /// Pointer to the start of Id Structures in the Node Indexer array
- PPTT_NODE_INDEXER * IdStructIndexedList;
} ACPI_PPTT_GENERATOR;
#pragma pack()
--
Guid("CE165669-3EF3-493F-B85D-6190EE5B9759")
next prev parent reply other threads:[~2021-11-03 15:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-03 15:41 [PATCH v2 0/7] Support ACPI 6.4 PPTT changes Chris Jones
2021-11-03 15:41 ` [PATCH v2 1/7] MdePkg: Add missing Cache ID (in)valid define Chris Jones
2021-11-09 1:19 ` [edk2-devel] " Gao, Zhichao
2021-11-03 15:41 ` [PATCH v2 2/7] MdePkg: Remove PPTT ID type structure Chris Jones
2021-11-03 15:41 ` [PATCH v2 3/7] ShellPkg: Update Acpiview PPTT parser to ACPI 6.4 Chris Jones
2021-11-09 1:20 ` Gao, Zhichao
2021-11-03 15:41 ` [PATCH v2 4/7] ShellPkg: Add Cache ID to PPTT parser Chris Jones
2021-11-09 1:20 ` [edk2-devel] " Gao, Zhichao
2021-11-03 15:41 ` Chris Jones [this message]
2021-11-03 15:41 ` [PATCH v2 6/7] DynamicTablesPkg: Update PPTT generator to ACPI 6.4 Chris Jones
2021-11-03 15:41 ` [PATCH v2 7/7] DynamicTablesPkg: Add CacheId to PPTT generator Chris Jones
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=20211103154108.6534-6-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