From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 8B68CD811AC for ; Thu, 21 Mar 2024 15:54:42 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=A31YmzPPLntJuluepz1cFGjVnz+5pGA6a1qjxQgcMpo=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20240206; t=1711036481; v=1; b=f68J7bRMKpiL1IwsTY7lslJO9v4ABMLxggQxyco6EnM2AVVMd0b88nm80iz3WtxAIs8rjJm3 LTvQXiUOAu7FmxM6tKaBPGd9F+7eKZEPnH2r9fV5Aqiwylz3+DL080yK42Uq/owAmZBERBcwJrP NQvkHW3hUnDdxMArCvgCb9xysL9i5LPEFyJQpE5s7g65bJ+zGYco4zxJ4MAqRk8Fap8PO6p/amG wIJUzAOIN6x8usW8xqn+k+xWgB64hGMzjCpRTVHU6HC83CWiiITsqsXDDxOPzz4UYQnmmg0UuTX 3OE0NR5f5kGfb0IB5DWxhrUcSEbPp41v2Ad/McR5cg+jg== X-Received: by 127.0.0.2 with SMTP id qDVqYY7687511xWO3U32XdHS; Thu, 21 Mar 2024 08:54:41 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.408.1711036480551955800 for ; Thu, 21 Mar 2024 08:54:40 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 85D3E168F; Thu, 21 Mar 2024 08:55:14 -0700 (PDT) X-Received: from e126645.nice.arm.com (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 545BF3F67D; Thu, 21 Mar 2024 08:54:37 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io Cc: Pierre Gondois , Sami Mujawar , Pierre Gondois , Yeo Reum Yun , Sunil V L , AbdulLateef Attar , Jeshua Smith , Jeff Brasen , Girish Mahadevan , Leif Lindholm , Meenakshi Aggarwal Subject: [edk2-devel] [PATCH 15/16] DynamicTablesPkg: Move Cm Reference object to Arch Common Date: Thu, 21 Mar 2024 16:53:18 +0100 Message-Id: <20240321155319.701355-16-pierre.gondois@arm.com> In-Reply-To: <20240321155319.701355-1-pierre.gondois@arm.com> References: <20240321155319.701355-1-pierre.gondois@arm.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Thu, 21 Mar 2024 08:54:40 -0700 Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 4FPV5yMCrwUIpVfFZL846hKAx7686176AA= Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=f68J7bRM; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=arm.com (policy=none) From: Sami Mujawar Move Cm Reference object from Arm Namespace to the Arch Common namespace. Correspondingly also update the following modules to reflect the changes introduced by the move: - PPTT generator - SSDT CPU topology generator - SSDT PCIe generator - ConfigurationManagerObjectParser - Dynamic Plat Repo, the Token Mapper and the TokenFixer map. - FdtHwInfoParser library Cc: Pierre Gondois Cc: Yeo Reum Yun Cc: AbdulLateef Attar Cc: Jeshua Smith Cc: Jeff Brasen Cc: Girish Mahadevan Cc: Leif Lindholm Cc: Meenakshi Aggarwal Signed-off-by: Sami Mujawar Signed-off-by: Pierre Gondois --- .../Include/ArchCommonNameSpaceObjects.h | 17 ++++++ .../Include/ArmNameSpaceObjects.h | 61 +++++++------------ .../Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c | 20 +++--- .../SsdtCpuTopologyGenerator.c | 14 ++--- .../SsdtCpuTopologyGenerator.h | 10 +-- .../AcpiSsdtPcieLibArm/SsdtPcieGenerator.c | 20 +++--- .../DynamicPlatRepoLib/CmObjectTokenFixer.c | 37 ++++++----- .../DynamicPlatRepoLib/DynamicPlatRepo.c | 28 ++++----- .../Common/DynamicPlatRepoLib/TokenMapper.c | 9 +-- .../ConfigurationManagerObjectParser.c | 6 +- .../FdtHwInfoParserLib/CmObjectDescUtility.c | 10 +-- .../FdtHwInfoParserLib/CmObjectDescUtility.h | 6 +- DynamicTablesPkg/Readme.md | 40 ++++++------ 13 files changed, 139 insertions(+), 139 deletions(-) diff --git a/DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h b/Dynami= cTablesPkg/Include/ArchCommonNameSpaceObjects.h index 1030488f4561..632816da09de 100644 --- a/DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h +++ b/DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h @@ -27,6 +27,7 @@ typedef enum ArchCommonObjectID { EArchCommonObjSerialDebugPortInfo, ///< 4 - Serial Debug Por= t Info=0D EArchCommonObjHypervisorVendorIdentity, ///< 5 - Hypervisor Vendo= r Id=0D EArchCommonObjFixedFeatureFlags, ///< 6 - Fixed feature fl= ags for FADT=0D + EArchCommonObjCmRef, ///< 7 - CM Object Refere= nce=0D EArchCommonObjMax=0D } EARCH_COMMON_OBJECT_ID;=0D =0D @@ -97,6 +98,22 @@ typedef struct CmArchCommonFixedFeatureFlags { UINT32 Flags;=0D } CM_ARCH_COMMON_FIXED_FEATURE_FLAGS;=0D =0D +/** A structure that describes a reference to another Configuration Manage= r=0D + object.=0D +=0D + This is useful for creating an array of reference tokens. The framewor= k=0D + can then query the configuration manager for these arrays using the=0D + object ID EArchCommonObjCmRef.=0D +=0D + This can be used is to represent one-to-many relationships between obj= ects.=0D +=0D + ID: EArchCommonObjCmRef=0D +*/=0D +typedef struct CmArchCommonObjRef {=0D + /// Token of the CM object being referenced=0D + CM_OBJECT_TOKEN ReferenceToken;=0D +} CM_ARCH_COMMON_OBJ_REF;=0D +=0D #pragma pack()=0D =0D #endif // ARCH_COMMON_NAMESPACE_OBJECTS_H_=0D diff --git a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h b/DynamicTables= Pkg/Include/ArmNameSpaceObjects.h index 66709c41fd69..cfcb2c7d2758 100644 --- a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h +++ b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h @@ -51,26 +51,25 @@ typedef enum ArmObjectID { EArmObjSmmuInterruptArray, ///< 20 - S= MMU Interrupt Array=0D EArmObjProcHierarchyInfo, ///< 21 - P= rocessor Hierarchy Info=0D EArmObjCacheInfo, ///< 22 - C= ache Info=0D - EArmObjCmRef, ///< 23 - C= M Object Reference=0D - EArmObjMemoryAffinityInfo, ///< 24 - M= emory Affinity Info=0D - EArmObjDeviceHandleAcpi, ///< 25 - D= evice Handle Acpi=0D - EArmObjDeviceHandlePci, ///< 26 - D= evice Handle Pci=0D - EArmObjGenericInitiatorAffinityInfo, ///< 27 - G= eneric Initiator Affinity=0D - EArmObjCmn600Info, ///< 28 - C= MN-600 Info=0D - EArmObjLpiInfo, ///< 29 - L= pi Info=0D - EArmObjPciAddressMapInfo, ///< 30 - P= ci Address Map Info=0D - EArmObjPciInterruptMapInfo, ///< 31 - P= ci Interrupt Map Info=0D - EArmObjRmr, ///< 32 - R= eserved Memory Range Node=0D - EArmObjMemoryRangeDescriptor, ///< 33 - M= emory Range Descriptor=0D - EArmObjCpcInfo, ///< 34 - C= ontinuous Performance Control Info=0D - EArmObjPccSubspaceType0Info, ///< 35 - P= cc Subspace Type 0 Info=0D - EArmObjPccSubspaceType1Info, ///< 36 - P= cc Subspace Type 2 Info=0D - EArmObjPccSubspaceType2Info, ///< 37 - P= cc Subspace Type 2 Info=0D - EArmObjPccSubspaceType3Info, ///< 38 - P= cc Subspace Type 3 Info=0D - EArmObjPccSubspaceType4Info, ///< 39 - P= cc Subspace Type 4 Info=0D - EArmObjPccSubspaceType5Info, ///< 40 - P= cc Subspace Type 5 Info=0D - EArmObjEtInfo, ///< 41 - E= mbedded Trace Extension/Module Info=0D - EArmObjPsdInfo, ///< 42 - P= -State Dependency (PSD) Info=0D + EArmObjMemoryAffinityInfo, ///< 23 - M= emory Affinity Info=0D + EArmObjDeviceHandleAcpi, ///< 24 - D= evice Handle Acpi=0D + EArmObjDeviceHandlePci, ///< 25 - D= evice Handle Pci=0D + EArmObjGenericInitiatorAffinityInfo, ///< 26 - G= eneric Initiator Affinity=0D + EArmObjCmn600Info, ///< 27 - C= MN-600 Info=0D + EArmObjLpiInfo, ///< 28 - L= pi Info=0D + EArmObjPciAddressMapInfo, ///< 29 - P= ci Address Map Info=0D + EArmObjPciInterruptMapInfo, ///< 30 - P= ci Interrupt Map Info=0D + EArmObjRmr, ///< 31 - R= eserved Memory Range Node=0D + EArmObjMemoryRangeDescriptor, ///< 32 - M= emory Range Descriptor=0D + EArmObjCpcInfo, ///< 33 - C= ontinuous Performance Control Info=0D + EArmObjPccSubspaceType0Info, ///< 34 - P= cc Subspace Type 0 Info=0D + EArmObjPccSubspaceType1Info, ///< 35 - P= cc Subspace Type 2 Info=0D + EArmObjPccSubspaceType2Info, ///< 36 - P= cc Subspace Type 2 Info=0D + EArmObjPccSubspaceType3Info, ///< 37 - P= cc Subspace Type 3 Info=0D + EArmObjPccSubspaceType4Info, ///< 38 - P= cc Subspace Type 4 Info=0D + EArmObjPccSubspaceType5Info, ///< 39 - P= cc Subspace Type 5 Info=0D + EArmObjEtInfo, ///< 40 - E= mbedded Trace Extension/Module Info=0D + EArmObjPsdInfo, ///< 41 - P= -State Dependency (PSD) Info=0D EArmObjMax=0D } EARM_OBJECT_ID;=0D =0D @@ -428,11 +427,11 @@ typedef struct CmArmPciConfigSpaceInfo { UINT8 EndBusNumber;=0D =0D /// Optional field: Reference Token for address mapping.=0D - /// Token identifying a CM_ARM_OBJ_REF structure.=0D + /// Token identifying a CM_ARCH_COMMON_OBJ_REF structure.=0D CM_OBJECT_TOKEN AddressMapToken;=0D =0D /// Optional field: Reference Token for interrupt mapping.=0D - /// Token identifying a CM_ARM_OBJ_REF structure.=0D + /// Token identifying a CM_ARCH_COMMON_OBJ_REF structure.=0D CM_OBJECT_TOKEN InterruptMapToken;=0D } CM_ARM_PCI_CONFIG_SPACE_INFO;=0D =0D @@ -721,7 +720,7 @@ typedef struct CmArmProcHierarchyInfo { /// this field to CM_NULL_TOKEN.=0D CM_OBJECT_TOKEN PrivateResourcesArrayToken;=0D /// Optional field: Reference Token for the Lpi state of this processor.= =0D - /// Token identifying a CM_ARM_OBJ_REF structure, itself referencing=0D + /// Token identifying a CM_ARCH_COMMON_OBJ_REF structure, itself referen= cing=0D /// CM_ARM_LPI_INFO objects.=0D CM_OBJECT_TOKEN LpiToken;=0D /// Set to TRUE if UID should override index for name and _UID=0D @@ -767,22 +766,6 @@ typedef struct CmArmCacheInfo { UINT32 CacheId;=0D } CM_ARM_CACHE_INFO;=0D =0D -/** A structure that describes a reference to another Configuration Manage= r=0D - object.=0D -=0D - This is useful for creating an array of reference tokens. The framewor= k=0D - can then query the configuration manager for these arrays using the=0D - object ID EArmObjCmRef.=0D -=0D - This can be used is to represent one-to-many relationships between obj= ects.=0D -=0D - ID: EArmObjCmRef=0D -*/=0D -typedef struct CmArmObjRef {=0D - /// Token of the CM object being referenced=0D - CM_OBJECT_TOKEN ReferenceToken;=0D -} CM_ARM_OBJ_REF;=0D -=0D /** A structure that describes the Memory Affinity Structure (Type 1) in S= RAT=0D =0D ID: EArmObjMemoryAffinityInfo=0D diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator= .c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c index 78fa63ff47e5..c237f7ff9386 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c @@ -34,7 +34,7 @@ The following Configuration Manager Object(s) are used by this Generat= or:=0D - EArmObjProcHierarchyInfo (REQUIRED)=0D - EArmObjCacheInfo=0D - - EArmObjCmRef=0D + - EArchCommonObjCmRef=0D - EArmObjGicCInfo (REQUIRED)=0D */=0D =0D @@ -63,9 +63,9 @@ GET_OBJECT_LIST ( reference information from the Configuration Manager.=0D */=0D GET_OBJECT_LIST (=0D - EObjNameSpaceArm,=0D - EArmObjCmRef,=0D - CM_ARM_OBJ_REF=0D + EObjNameSpaceArchCommon,=0D + EArchCommonObjCmRef,=0D + CM_ARCH_COMMON_OBJ_REF=0D );=0D =0D /**=0D @@ -264,7 +264,7 @@ DetectCyclesInTopology ( Protocol Interface.=0D @param [in] PrivResArray Pointer to the array of private resour= ces.=0D @param [in] PrivResCount Number of private resources.=0D - @param [in] PrivResArrayToken Reference Token for the CM_ARM_OBJ_REF= =0D + @param [in] PrivResArrayToken Reference Token for the CM_ARCH_COMMON= _OBJ_REF=0D array describing node's private resour= ces.=0D =0D @retval EFI_SUCCESS Array updated successfully.=0D @@ -281,10 +281,10 @@ AddPrivateResources ( IN CONST CM_OBJECT_TOKEN PrivResArrayTok= en=0D )=0D {=0D - EFI_STATUS Status;=0D - CM_ARM_OBJ_REF *CmObjRefs;=0D - UINT32 CmObjRefCount;=0D - PPTT_NODE_INDEXER *PpttNodeFound;=0D + EFI_STATUS Status;=0D + CM_ARCH_COMMON_OBJ_REF *CmObjRefs;=0D + UINT32 CmObjRefCount;=0D + PPTT_NODE_INDEXER *PpttNodeFound;=0D =0D ASSERT (=0D (Generator !=3D NULL) &&=0D @@ -308,7 +308,7 @@ AddPrivateResources ( =0D CmObjRefCount =3D 0;=0D // Get the CM Object References=0D - Status =3D GetEArmObjCmRef (=0D + Status =3D GetEArchCommonObjCmRef (=0D CfgMgrProtocol,=0D PrivResArrayToken,=0D &CmObjRefs,=0D diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTopologyLibArm/Ss= dtCpuTopologyGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTop= ologyLibArm/SsdtCpuTopologyGenerator.c index cc6400e9e0df..994733a4e9c2 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTopologyLibArm/SsdtCpuTo= pologyGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTopologyLibArm/SsdtCpuTo= pologyGenerator.c @@ -39,7 +39,7 @@ Requirements: this Generator:=0D - EArmObjGicCInfo=0D - EArmObjProcHierarchyInfo (OPTIONAL) along with=0D - - EArmObjCmRef (OPTIONAL)=0D + - EArchCommonObjCmRef (OPTIONAL)=0D - EArmObjLpiInfo (OPTIONAL)=0D - GetEArmObjEtInfo (OPTIONAL)=0D - EArmObjPsdInfo (OPTIONAL)=0D @@ -69,9 +69,9 @@ GET_OBJECT_LIST ( reference information from the Configuration Manager.=0D */=0D GET_OBJECT_LIST (=0D - EObjNameSpaceArm,=0D - EArmObjCmRef,=0D - CM_ARM_OBJ_REF=0D + EObjNameSpaceArchCommon,=0D + EArchCommonObjCmRef,=0D + CM_ARCH_COMMON_OBJ_REF=0D );=0D =0D /**=0D @@ -120,7 +120,7 @@ GET_OBJECT_LIST ( structure of the platform. The TokenTable allows to have a mapping:=0D Index <-> CM_OBJECT_TOKEN (to CM_ARM_LPI_INFO structures).=0D =0D - There will always be less sets of Lpi states (CM_ARM_OBJ_REF)=0D + There will always be less sets of Lpi states (CM_ARCH_COMMON_OBJ_REF)=0D than the number of cpus/clusters (CM_ARM_PROC_HIERARCHY_INFO).=0D =0D @param [in] Generator The SSDT Cpu Topology generator.=0D @@ -697,7 +697,7 @@ GenerateLpiStates ( UINT32 LastIndex;=0D =0D AML_OBJECT_NODE_HANDLE LpiNode;=0D - CM_ARM_OBJ_REF *LpiRefInfo;=0D + CM_ARCH_COMMON_OBJ_REF *LpiRefInfo;=0D UINT32 LpiRefInfoCount;=0D UINT32 LpiRefIndex;=0D CM_ARM_LPI_INFO *LpiInfo;=0D @@ -727,7 +727,7 @@ GenerateLpiStates ( }=0D =0D // Fetch the LPI objects referenced by the token.=0D - Status =3D GetEArmObjCmRef (=0D + Status =3D GetEArchCommonObjCmRef (=0D CfgMgrProtocol,=0D Generator->TokenTable.Table[Index],=0D &LpiRefInfo,=0D diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTopologyLibArm/Ss= dtCpuTopologyGenerator.h b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTop= ologyLibArm/SsdtCpuTopologyGenerator.h index 0c7a0b0601ab..d6561e33da11 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTopologyLibArm/SsdtCpuTo= pologyGenerator.h +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTopologyLibArm/SsdtCpuTo= pologyGenerator.h @@ -69,8 +69,8 @@ =0D /** A structure used to handle the Lpi structures referencing.=0D =0D - A CM_ARM_PROC_HIERARCHY_INFO structure references a CM_ARM_OBJ_REF.=0D - This CM_ARM_OBJ_REF references CM_ARM_LPI_INFO structures.=0D + A CM_ARM_PROC_HIERARCHY_INFO structure references a CM_ARCH_COMMON_OBJ_R= EF.=0D + This CM_ARCH_COMMON_OBJ_REF references CM_ARM_LPI_INFO structures.=0D =0D Example:=0D (Cpu0) (Cpu1)=0D @@ -80,7 +80,7 @@ |=0D v=0D (List of references to Lpi states)=0D - CM_ARM_OBJ_REF=0D + CM_ARCH_COMMON_OBJ_REF=0D |=0D +----------------------------------------=0D | |=0D @@ -89,9 +89,9 @@ CM_ARM_LPI_INFO[0] CM_ARM_LPI_INFO[1]=0D =0D Here, Cpu0 and Cpu1 have the same Lpi states. Both CM_ARM_PROC_HIERARCHY= _INFO=0D - structures reference the same CM_ARM_OBJ_REF. An entry is created in the= =0D + structures reference the same CM_ARCH_COMMON_OBJ_REF. An entry is create= d in the=0D TokenTable such as:=0D - 0 <-> CM_ARM_OBJ_REF=0D + 0 <-> CM_ARCH_COMMON_OBJ_REF=0D =0D This will lead to the creation of this pseudo-ASL code where Cpu0 and Cp= u1=0D return the same object at \_SB.L000:=0D diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieG= enerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieG= enerator.c index 72873709aab5..dc1371c3bc5f 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerato= r.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerato= r.c @@ -42,7 +42,7 @@ Requirements:=0D The following Configuration Manager Object(s) are required by=0D this Generator:=0D - - EArmObjCmRef=0D + - EArchCommonObjCmRef=0D - EArmObjPciConfigSpaceInfo=0D - EArmObjPciAddressMapInfo=0D - EArmObjPciInterruptMapInfo=0D @@ -52,9 +52,9 @@ Requirements: reference information from the Configuration Manager.=0D */=0D GET_OBJECT_LIST (=0D - EObjNameSpaceArm,=0D - EArmObjCmRef,=0D - CM_ARM_OBJ_REF=0D + EObjNameSpaceArchCommon,=0D + EArchCommonObjCmRef,=0D + CM_ARCH_COMMON_OBJ_REF=0D );=0D =0D /** This macro expands to a function that retrieves the Pci=0D @@ -313,7 +313,7 @@ GeneratePrt ( EFI_STATUS Status;=0D INT32 Index;=0D AML_OBJECT_NODE_HANDLE PrtNode;=0D - CM_ARM_OBJ_REF *RefInfo;=0D + CM_ARCH_COMMON_OBJ_REF *RefInfo;=0D UINT32 RefCount;=0D CM_ARM_PCI_INTERRUPT_MAP_INFO *IrqMapInfo;=0D =0D @@ -324,9 +324,9 @@ GeneratePrt ( =0D PrtNode =3D NULL;=0D =0D - // Get the array of CM_ARM_OBJ_REF referencing the=0D + // Get the array of CM_ARCH_COMMON_OBJ_REF referencing the=0D // CM_ARM_PCI_INTERRUPT_MAP_INFO objects.=0D - Status =3D GetEArmObjCmRef (=0D + Status =3D GetEArchCommonObjCmRef (=0D CfgMgrProtocol,=0D PciInfo->InterruptMapToken,=0D &RefInfo,=0D @@ -458,7 +458,7 @@ GeneratePciCrs ( EFI_STATUS Status;=0D BOOLEAN Translation;=0D UINT32 Index;=0D - CM_ARM_OBJ_REF *RefInfo;=0D + CM_ARCH_COMMON_OBJ_REF *RefInfo;=0D UINT32 RefCount;=0D CM_ARM_PCI_ADDRESS_MAP_INFO *AddrMapInfo;=0D AML_OBJECT_NODE_HANDLE CrsNode;=0D @@ -505,9 +505,9 @@ GeneratePciCrs ( return Status;=0D }=0D =0D - // Get the array of CM_ARM_OBJ_REF referencing the=0D + // Get the array of CM_ARCH_COMMON_OBJ_REF referencing the=0D // CM_ARM_PCI_ADDRESS_MAP_INFO objects.=0D - Status =3D GetEArmObjCmRef (=0D + Status =3D GetEArchCommonObjCmRef (=0D CfgMgrProtocol,=0D PciInfo->AddressMapToken,=0D &RefInfo,=0D diff --git a/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTok= enFixer.c b/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectToke= nFixer.c index aef818e77f0c..d7ecd4dc1ba7 100644 --- a/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer= .c +++ b/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer= .c @@ -166,26 +166,25 @@ CM_OBJECT_TOKEN_FIXER TokenFixer[EArmObjMax] =3D { NULL, ///< 20 - SMMU Interrupt Array=0D TokenFixerNotImplemented, ///< 21 - Processor Hierarchy Info=0D TokenFixerNotImplemented, ///< 22 - Cache Info=0D - NULL, ///< 23 - CM Object Reference=0D - NULL, ///< 24 - Memory Affinity Info=0D - NULL, ///< 25 - Device Handle Acpi=0D - NULL, ///< 26 - Device Handle Pci=0D - NULL, ///< 27 - Generic Initiator Affinity=0D - NULL, ///< 28 - CMN-600 Info=0D - NULL, ///< 29 - Lpi Info=0D - NULL, ///< 30 - Pci Address Map Info=0D - NULL, ///< 31 - Pci Interrupt Map Info=0D - NULL, ///< 32 - Reserved Memory Range Node=0D - NULL, ///< 33 - Memory Range Descriptor=0D - NULL, ///< 34 - Continuous Performance Contr= ol Info=0D - NULL, ///< 35 - Pcc Subspace Type 0 Info=0D + NULL, ///< 23 - Memory Affinity Info=0D + NULL, ///< 24 - Device Handle Acpi=0D + NULL, ///< 25 - Device Handle Pci=0D + NULL, ///< 26 - Generic Initiator Affinity=0D + NULL, ///< 27 - CMN-600 Info=0D + NULL, ///< 28 - Lpi Info=0D + NULL, ///< 29 - Pci Address Map Info=0D + NULL, ///< 30 - Pci Interrupt Map Info=0D + NULL, ///< 31 - Reserved Memory Range Node=0D + NULL, ///< 32 - Memory Range Descriptor=0D + NULL, ///< 33 - Continuous Performance Contr= ol Info=0D + NULL, ///< 34 - Pcc Subspace Type 0 Info=0D + NULL, ///< 35 - Pcc Subspace Type 2 Info=0D NULL, ///< 36 - Pcc Subspace Type 2 Info=0D - NULL, ///< 37 - Pcc Subspace Type 2 Info=0D - NULL, ///< 38 - Pcc Subspace Type 3 Info=0D - NULL, ///< 39 - Pcc Subspace Type 4 Info=0D - NULL, ///< 40 - Pcc Subspace Type 5 Info=0D - NULL, ///< 41 - Embedded Trace Extension/Mod= ule Info=0D - NULL ///< 42 - P-State Dependency (PSD) Inf= o=0D + NULL, ///< 37 - Pcc Subspace Type 3 Info=0D + NULL, ///< 38 - Pcc Subspace Type 4 Info=0D + NULL, ///< 39 - Pcc Subspace Type 5 Info=0D + NULL, ///< 40 - Embedded Trace Extension/Mod= ule Info=0D + NULL ///< 41 - P-State Dependency (PSD) Inf= o=0D };=0D =0D /** CmObj token fixer.=0D diff --git a/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/DynamicPlat= Repo.c b/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/DynamicPlatRepo= .c index e4fa1233708e..08d11ac96a22 100644 --- a/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/DynamicPlatRepo.c +++ b/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/DynamicPlatRepo.c @@ -145,7 +145,7 @@ DynPlatRepoAddObject ( =0D // Check the CmObjDesc:=0D // - only Arm objects and Arch Common objects are supported for now.=0D - // - only EArmObjCmRef objects can be added as arrays.=0D + // - only EArchCommonObjCmRef objects can be added as arrays.=0D if ((CmObjDesc->Size =3D=3D 0) || (CmObjDesc->Count =3D=3D 0)) {=0D ASSERT (0);=0D return EFI_INVALID_PARAMETER;=0D @@ -155,16 +155,16 @@ DynPlatRepoAddObject ( NamespaceId =3D GET_CM_NAMESPACE_ID (CmObjDesc->ObjectId);=0D =0D if (EObjNameSpaceArm =3D=3D NamespaceId) {=0D - if ((ObjId >=3D EArmObjMax) ||=0D - ((CmObjDesc->Count > 1) && (ObjId !=3D EArmObjCmRef)))=0D - {=0D + if (ObjId >=3D EArmObjMax) {=0D ASSERT (0);=0D return EFI_INVALID_PARAMETER;=0D }=0D =0D ObjList =3D &This->ArmCmObjList[ObjId];=0D } else if (EObjNameSpaceArchCommon =3D=3D NamespaceId) {=0D - if (ObjId >=3D EArchCommonObjMax) {=0D + if ((ObjId >=3D EArchCommonObjMax) ||=0D + ((CmObjDesc->Count > 1) && (ObjId !=3D EArchCommonObjCmRef)))=0D + {=0D ASSERT (0);=0D return EFI_INVALID_PARAMETER;=0D }=0D @@ -281,11 +281,11 @@ GroupCmObjNodes ( }=0D =0D if ((CmObjDesc->Count !=3D 1) &&=0D - ((NamespaceId !=3D EObjNameSpaceArm) ||=0D - (ObjIndex !=3D EArmObjCmRef)))=0D + ((NamespaceId !=3D EObjNameSpaceArchCommon) ||=0D + (ObjIndex !=3D EArchCommonObjCmRef)))=0D {=0D // We expect each descriptor to contain an individual object.=0D - // EArmObjCmRef objects are counted as groups, so +1 as well.=0D + // EArchCommonObjCmRef objects are counted as groups, so +1 as well.= =0D ASSERT (0);=0D return EFI_INVALID_PARAMETER;=0D }=0D @@ -452,18 +452,18 @@ DynamicPlatRepoGetObject ( ObjId =3D GET_CM_OBJECT_ID (CmObjectId);=0D =0D if (NamespaceId =3D=3D EObjNameSpaceArm) {=0D - if ((ObjId >=3D EArmObjMax) ||=0D - ((ObjId =3D=3D EArmObjCmRef) &&=0D - (Token =3D=3D CM_NULL_TOKEN)))=0D - {=0D - // EArmObjCmRef object must be requested using a valid token.=0D + if (ObjId >=3D EArmObjMax) {=0D ASSERT (0);=0D return EFI_INVALID_PARAMETER;=0D }=0D =0D Desc =3D &This->ArmCmObjArray[ObjId];=0D } else if (NamespaceId =3D=3D EObjNameSpaceArchCommon) {=0D - if (ObjId >=3D EArchCommonObjMax) {=0D + if ((ObjId >=3D EArchCommonObjMax) ||=0D + ((ObjId =3D=3D EArchCommonObjCmRef) &&=0D + (Token =3D=3D CM_NULL_TOKEN)))=0D + {=0D + // EArchCommonObjCmRef object must be requested using a valid token.= =0D ASSERT (0);=0D return EFI_INVALID_PARAMETER;=0D }=0D diff --git a/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/TokenMapper= .c b/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/TokenMapper.c index 9391e935eee0..2300375f0386 100644 --- a/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/TokenMapper.c +++ b/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/TokenMapper.c @@ -66,11 +66,12 @@ TokenMapperAddObject ( // Point inside the finalized array.=0D CmObjDesc->Data =3D Data;=0D =0D - // Only EArmObjCmRef CmObj can be added as arrays (more than 1 elements)= .=0D - if ((GET_CM_NAMESPACE_ID (ObjectId) =3D=3D EObjNameSpaceArm) &&=0D - (GET_CM_OBJECT_ID (ObjectId) =3D=3D EArmObjCmRef))=0D + // Only EArchCommonObjCmRef CmObj can be added as=0D + // arrays (more than 1 elements).=0D + if ((GET_CM_NAMESPACE_ID (ObjectId) =3D=3D EObjNameSpaceArchCommon) &&=0D + (GET_CM_OBJECT_ID (ObjectId) =3D=3D EArchCommonObjCmRef))=0D {=0D - CmObjDesc->Count =3D Size / sizeof (CM_ARM_OBJ_REF);=0D + CmObjDesc->Count =3D Size / sizeof (CM_ARCH_COMMON_OBJ_REF);=0D } else {=0D CmObjDesc->Count =3D 1;=0D }=0D diff --git a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationMa= nagerObjectParser.c b/DynamicTablesPkg/Library/Common/TableHelperLib/Config= urationManagerObjectParser.c index 3205cf87c8bf..264e01cff29f 100644 --- a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerOb= jectParser.c +++ b/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerOb= jectParser.c @@ -350,9 +350,9 @@ STATIC CONST CM_OBJ_PARSER CmArmCacheInfoParser[] =3D { { "CacheId", 4, "0x%x", NULL },=0D };=0D =0D -/** A parser for EArmObjCmRef.=0D +/** A parser for EArchCommonObjCmRef.=0D */=0D -STATIC CONST CM_OBJ_PARSER CmArmObjRefParser[] =3D {=0D +STATIC CONST CM_OBJ_PARSER CmArchCommonObjRefParser[] =3D {=0D { "ReferenceToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL }=0D };=0D =0D @@ -677,6 +677,7 @@ STATIC CONST CM_OBJ_PARSER_ARRAY ArchCommonNamespaceOb= jectParser[] =3D { CM_PARSER_ADD_OBJECT (EArchCommonObjSerialDebugPortInfo, CmArchCom= monSerialPortInfoParser),=0D CM_PARSER_ADD_OBJECT (EArchCommonObjHypervisorVendorIdentity, CmArchCom= monHypervisorVendorIdentityParser),=0D CM_PARSER_ADD_OBJECT (EArchCommonObjFixedFeatureFlags, CmArchCom= monFixedFeatureFlagsParser),=0D + CM_PARSER_ADD_OBJECT (EArchCommonObjCmRef, CmArchCom= monObjRefParser),=0D CM_PARSER_ADD_OBJECT_RESERVED (EArchCommonObjMax)=0D };=0D =0D @@ -706,7 +707,6 @@ STATIC CONST CM_OBJ_PARSER_ARRAY ArmNamespaceObjectPar= ser[] =3D { CM_PARSER_ADD_OBJECT (EArmObjSmmuInterruptArray, CmArmGenericIn= terruptParser),=0D CM_PARSER_ADD_OBJECT (EArmObjProcHierarchyInfo, CmArmProcHiera= rchyInfoParser),=0D CM_PARSER_ADD_OBJECT (EArmObjCacheInfo, CmArmCacheInfo= Parser),=0D - CM_PARSER_ADD_OBJECT (EArmObjCmRef, CmArmObjRefPar= ser),=0D CM_PARSER_ADD_OBJECT (EArmObjMemoryAffinityInfo, CmArmMemoryAff= inityInfoParser),=0D CM_PARSER_ADD_OBJECT (EArmObjDeviceHandleAcpi, CmArmDeviceHan= dleAcpiParser),=0D CM_PARSER_ADD_OBJECT (EArmObjDeviceHandlePci, CmArmDeviceHan= dlePciParser),=0D diff --git a/DynamicTablesPkg/Library/FdtHwInfoParserLib/CmObjectDescUtilit= y.c b/DynamicTablesPkg/Library/FdtHwInfoParserLib/CmObjectDescUtility.c index 8be1b5b8cd88..120a98c2a9eb 100644 --- a/DynamicTablesPkg/Library/FdtHwInfoParserLib/CmObjectDescUtility.c +++ b/DynamicTablesPkg/Library/FdtHwInfoParserLib/CmObjectDescUtility.c @@ -219,11 +219,11 @@ AddMultipleCmObj ( =0D /** Add multiple CmObj to the Configuration Manager.=0D =0D - Get one token referencing a EArmObjCmRef CmObj itself referencing=0D + Get one token referencing a EArchCommonObjCmRef CmObj itself referencing= =0D the input CmObj. In the table below, RefToken is returned.=0D =0D Token referencing an Array of tokens Array of CmObj=0D - array of EArmObjCmRef referencing each from the input:=0D + array of EArchCommonObjCmRef referencing each from the in= put:=0D CmObj: CmObj from the input:=0D =0D RefToken ---> CmObjToken[0] ---> CmObj[0]=0D @@ -234,7 +234,7 @@ AddMultipleCmObj ( @param [in] CmObjDesc CmObjDesc containing multiple CmObj=0D to add.=0D @param [out] Token If success, token referencing an array=0D - of EArmObjCmRef CmObj, themselves=0D + of EArchCommonObjCmRef CmObj, themselves= =0D referencing the input CmObjs.=0D =0D @retval EFI_SUCCESS The function completed successfully.=0D @@ -286,12 +286,12 @@ AddMultipleCmObjWithCmObjRef ( goto exit_handler;=0D }=0D =0D - CmObjRef.ObjectId =3D CREATE_CM_ARM_OBJECT_ID (EArmObjCmRef);=0D + CmObjRef.ObjectId =3D CREATE_CM_ARCH_COMMON_OBJECT_ID (EArchCommonObjCmR= ef);=0D CmObjRef.Data =3D TokenTable;=0D CmObjRef.Count =3D CmObjDesc->Count;=0D CmObjRef.Size =3D TokenTableSize;=0D =0D - // Add the array of EArmObjCmRef CmObjs.=0D + // Add the array of EArchCommonObjCmRef CmObjs.=0D Status =3D FdtParserHandle->HwInfoAdd (=0D FdtParserHandle,=0D FdtParserHandle->Context,=0D diff --git a/DynamicTablesPkg/Library/FdtHwInfoParserLib/CmObjectDescUtilit= y.h b/DynamicTablesPkg/Library/FdtHwInfoParserLib/CmObjectDescUtility.h index 270e0c3528f9..14e135335f9e 100644 --- a/DynamicTablesPkg/Library/FdtHwInfoParserLib/CmObjectDescUtility.h +++ b/DynamicTablesPkg/Library/FdtHwInfoParserLib/CmObjectDescUtility.h @@ -98,11 +98,11 @@ AddMultipleCmObj ( =0D /** Add multiple CmObj to the Configuration Manager.=0D =0D - Get one token referencing a EArmObjCmRef CmObj itself referencing=0D + Get one token referencing a EArchCommonObjCmRef CmObj itself referencing= =0D the input CmObj. In the table below, RefToken is returned.=0D =0D Token referencing an Array of tokens Array of CmObj=0D - array of EArmObjCmRef referencing each from the input:=0D + array of EArchCommonObjCmRef referencing each from the in= put:=0D CmObj: CmObj from the input:=0D =0D RefToken ---> CmObjToken[0] ---> CmObj[0]=0D @@ -113,7 +113,7 @@ AddMultipleCmObj ( @param [in] CmObjDesc CmObjDesc containing multiple CmObj=0D to add.=0D @param [out] Token If success, token referencing an array=0D - of EArmObjCmRef CmObj, themselves=0D + of EArchCommonObjCmRef CmObj, themselves= =0D referencing the input CmObjs.=0D =0D @retval EFI_SUCCESS The function completed successfully.=0D diff --git a/DynamicTablesPkg/Readme.md b/DynamicTablesPkg/Readme.md index 5b9dda3e63d9..9110c754690d 100644 --- a/DynamicTablesPkg/Readme.md +++ b/DynamicTablesPkg/Readme.md @@ -463,26 +463,25 @@ The CM_OBJECT_ID type is used to identify the Configu= ration Manager | 20 | SMMU Interrupt Array | |=0D | 21 | Processor Hierarchy Info | Move to Arch Common = NS |=0D | 22 | Cache Info | Move to Arch Common = NS |=0D -| 23 | CM Object Reference | Move to Arch Common = NS |=0D -| 24 | Memory Affinity Info | Move to Arch Common = NS |=0D -| 25 | Device Handle Acpi | Move to Arch Common = NS |=0D -| 26 | Device Handle PCI | Move to Arch Common = NS |=0D -| 27 | Generic Initiator Affinity Info | Move to Arch Common = NS |=0D -| 28 | CMN 600 Info | |=0D -| 29 | Low Power Idle State Info | Move to Arch Common = NS |=0D -| 30 | PCI Address Map Info | Move to Arch Common = NS |=0D -| 31 | PCI Interrupt Map Info | Move to Arch Common = NS |=0D -| 32 | Reserved Memory Range Node | |=0D -| 33 | Memory Range Descriptor | |=0D -| 34 | Continuous Performance Control Info | Move to Arch Common = NS |=0D -| 35 | Pcc Subspace Type 0 Info | Move to Arch Common = NS |=0D -| 36 | Pcc Subspace Type 1 Info | Move to Arch Common = NS |=0D -| 37 | Pcc Subspace Type 2 Info | Move to Arch Common = NS |=0D -| 38 | Pcc Subspace Type 3 Info | Move to Arch Common = NS |=0D -| 39 | Pcc Subspace Type 4 Info | Move to Arch Common = NS |=0D -| 40 | Pcc Subspace Type 5 Info | Move to Arch Common = NS |=0D -| 41 | Embedded Trace Extension/Module Info | |=0D -| 42 | P-State Dependency (PSD) Info | Move to Arch Common = NS |=0D +| 23 | Memory Affinity Info | Move to Arch Common = NS |=0D +| 24 | Device Handle Acpi | Move to Arch Common = NS |=0D +| 25 | Device Handle PCI | Move to Arch Common = NS |=0D +| 26 | Generic Initiator Affinity Info | Move to Arch Common = NS |=0D +| 27 | CMN 600 Info | |=0D +| 28 | Low Power Idle State Info | Move to Arch Common = NS |=0D +| 29 | PCI Address Map Info | Move to Arch Common = NS |=0D +| 30 | PCI Interrupt Map Info | Move to Arch Common = NS |=0D +| 31 | Reserved Memory Range Node | |=0D +| 32 | Memory Range Descriptor | |=0D +| 33 | Continuous Performance Control Info | Move to Arch Common = NS |=0D +| 34 | Pcc Subspace Type 0 Info | Move to Arch Common = NS |=0D +| 35 | Pcc Subspace Type 1 Info | Move to Arch Common = NS |=0D +| 36 | Pcc Subspace Type 2 Info | Move to Arch Common = NS |=0D +| 37 | Pcc Subspace Type 3 Info | Move to Arch Common = NS |=0D +| 38 | Pcc Subspace Type 4 Info | Move to Arch Common = NS |=0D +| 39 | Pcc Subspace Type 5 Info | Move to Arch Common = NS |=0D +| 40 | Embedded Trace Extension/Module Info | |=0D +| 41 | P-State Dependency (PSD) Info | Move to Arch Common = NS |=0D | `*` | All other values are reserved. | |=0D =0D #### Object ID's in the Arch Common Namespace:=0D @@ -496,4 +495,5 @@ The CM_OBJECT_ID type is used to identify the Configura= tion Manager | 4 | Serial Debug Port Info | |=0D | 5 | Hypervisor Vendor Id | |=0D | 6 | Fixed feature flags for FADT | |=0D +| 7 | CM Object Reference | |=0D | `*` | All other values are reserved. | |=0D --=20 2.25.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#116976): https://edk2.groups.io/g/devel/message/116976 Mute This Topic: https://groups.io/mt/105067991/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-