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 67E47D811D2 for ; Thu, 21 Mar 2024 16:00:29 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=swH/YtRslnKUITOKvDMUf99skOS+SVPQwRWlPmR/+jc=; 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=1711036828; v=1; b=0Z4dcgf5cJt0HgCuy2G1q3JN5hXjRj3Qk0/MvVJPCt5zewZdozsn8cxoPIss0w6gtyTq/soT eTBfe1BPByRgt1iQyI/5Tzd6P6QvqRPxTUuE4STbzP+9sKZnVkohgeNXK9u/kPhphAib6WYodjU I3769erGLR3LWwvpaavf6+tIlK9xXnxhkPYIeJk1l2ElUF56fS85z+h1qaBPPUDcZ8Zl1K2FAD2 nYSS3qNVNRDp0909Zcr306UN9ZJQJ/O58S5hUmoXCVcttl9vDu3zXme0gmnUYzMbJie5LICOZzL gnOuG+azQqGByK2/YHfbLQUhVM9Ks5YeddiJyKyZWW5Cw== X-Received: by 127.0.0.2 with SMTP id avgkYY7687511xHk7u7H6txN; Thu, 21 Mar 2024 09:00:28 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.602.1711036827348879319 for ; Thu, 21 Mar 2024 09:00:27 -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 4FEE41063; Thu, 21 Mar 2024 09:01:01 -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 44DA03F67D; Thu, 21 Mar 2024 09:00:24 -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 05/19] DynamicTablesPkg: Move ACPI device Handle object to Arch Common Date: Thu, 21 Mar 2024 16:59:10 +0100 Message-Id: <20240321155924.707272-6-pierre.gondois@arm.com> In-Reply-To: <20240321155924.707272-1-pierre.gondois@arm.com> References: <20240321155924.707272-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 09:00:27 -0700 Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 0QUjRnkAsKeN1TZh0PcYoadhx7686176AA= 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=0Z4dcgf5; 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 the ACPI device Handle object from Arm Namespace to the Arch Common namespace. Correspondingly also update the following modules to reflect the changes introduced by the move: - SRAT generator - ConfigurationManagerObjectParser - Dynamic Plat Repo TokenFixer map. 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 | 14 ++++++ .../Include/ArmNameSpaceObjects.h | 44 +++++++------------ .../Acpi/Arm/AcpiSratLibArm/SratGenerator.c | 12 ++--- .../DynamicPlatRepoLib/CmObjectTokenFixer.c | 29 ++++++------ .../ConfigurationManagerObjectParser.c | 6 +-- DynamicTablesPkg/Readme.md | 32 +++++++------- 6 files changed, 68 insertions(+), 69 deletions(-) diff --git a/DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h b/Dynami= cTablesPkg/Include/ArchCommonNameSpaceObjects.h index 86d751bdfaaa..0b450e8f99c2 100644 --- a/DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h +++ b/DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h @@ -32,6 +32,7 @@ typedef enum ArchCommonObjectID { EArchCommonObjPciAddressMapInfo, ///< 9 - Pci Address Map = Info=0D EArchCommonObjPciInterruptMapInfo, ///< 10 - Pci Interrupt Ma= p Info=0D EArchCommonObjMemoryAffinityInfo, ///< 11 - Memory Affinity = Info=0D + EArchCommonObjDeviceHandleAcpi, ///< 12 - Device Handle Ac= pi=0D EArchCommonObjMax=0D } EARCH_COMMON_OBJECT_ID;=0D =0D @@ -242,6 +243,19 @@ typedef struct CmArchCommonMemoryAffinityInfo { UINT32 Flags;=0D } CM_ARCH_COMMON_MEMORY_AFFINITY_INFO;=0D =0D +/** A structure that describes the ACPI Device Handle (Type 0) in the=0D + Generic Initiator Affinity structure in SRAT=0D +=0D + ID: EArchCommonObjDeviceHandleAcpi=0D +*/=0D +typedef struct CmArchCommonDeviceHandleAcpi {=0D + /// Hardware ID=0D + UINT64 Hid;=0D +=0D + /// Unique Id=0D + UINT32 Uid;=0D +} CM_ARCH_COMMON_DEVICE_HANDLE_ACPI;=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 7905152114a7..64c5f2677246 100644 --- a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h +++ b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h @@ -50,22 +50,21 @@ typedef enum ArmObjectID { EArmObjSmmuInterruptArray, ///< 19 - S= MMU Interrupt Array=0D EArmObjProcHierarchyInfo, ///< 20 - P= rocessor Hierarchy Info=0D EArmObjCacheInfo, ///< 21 - C= ache Info=0D - EArmObjDeviceHandleAcpi, ///< 22 - D= evice Handle Acpi=0D - EArmObjDeviceHandlePci, ///< 23 - D= evice Handle Pci=0D - EArmObjGenericInitiatorAffinityInfo, ///< 24 - G= eneric Initiator Affinity=0D - EArmObjCmn600Info, ///< 25 - C= MN-600 Info=0D - EArmObjLpiInfo, ///< 26 - L= pi Info=0D - EArmObjRmr, ///< 27 - R= eserved Memory Range Node=0D - EArmObjMemoryRangeDescriptor, ///< 28 - M= emory Range Descriptor=0D - EArmObjCpcInfo, ///< 29 - C= ontinuous Performance Control Info=0D - EArmObjPccSubspaceType0Info, ///< 30 - P= cc Subspace Type 0 Info=0D - EArmObjPccSubspaceType1Info, ///< 31 - P= cc Subspace Type 2 Info=0D - EArmObjPccSubspaceType2Info, ///< 32 - P= cc Subspace Type 2 Info=0D - EArmObjPccSubspaceType3Info, ///< 33 - P= cc Subspace Type 3 Info=0D - EArmObjPccSubspaceType4Info, ///< 34 - P= cc Subspace Type 4 Info=0D - EArmObjPccSubspaceType5Info, ///< 35 - P= cc Subspace Type 5 Info=0D - EArmObjEtInfo, ///< 36 - E= mbedded Trace Extension/Module Info=0D - EArmObjPsdInfo, ///< 37 - P= -State Dependency (PSD) Info=0D + EArmObjDeviceHandlePci, ///< 22 - D= evice Handle Pci=0D + EArmObjGenericInitiatorAffinityInfo, ///< 23 - G= eneric Initiator Affinity=0D + EArmObjCmn600Info, ///< 24 - C= MN-600 Info=0D + EArmObjLpiInfo, ///< 25 - L= pi Info=0D + EArmObjRmr, ///< 26 - R= eserved Memory Range Node=0D + EArmObjMemoryRangeDescriptor, ///< 27 - M= emory Range Descriptor=0D + EArmObjCpcInfo, ///< 28 - C= ontinuous Performance Control Info=0D + EArmObjPccSubspaceType0Info, ///< 29 - P= cc Subspace Type 0 Info=0D + EArmObjPccSubspaceType1Info, ///< 30 - P= cc Subspace Type 2 Info=0D + EArmObjPccSubspaceType2Info, ///< 31 - P= cc Subspace Type 2 Info=0D + EArmObjPccSubspaceType3Info, ///< 32 - P= cc Subspace Type 3 Info=0D + EArmObjPccSubspaceType4Info, ///< 33 - P= cc Subspace Type 4 Info=0D + EArmObjPccSubspaceType5Info, ///< 34 - P= cc Subspace Type 5 Info=0D + EArmObjEtInfo, ///< 35 - E= mbedded Trace Extension/Module Info=0D + EArmObjPsdInfo, ///< 36 - P= -State Dependency (PSD) Info=0D EArmObjMax=0D } EARM_OBJECT_ID;=0D =0D @@ -720,19 +719,6 @@ typedef struct CmArmCacheInfo { UINT32 CacheId;=0D } CM_ARM_CACHE_INFO;=0D =0D -/** A structure that describes the ACPI Device Handle (Type 0) in the=0D - Generic Initiator Affinity structure in SRAT=0D -=0D - ID: EArmObjDeviceHandleAcpi=0D -*/=0D -typedef struct CmArmDeviceHandleAcpi {=0D - /// Hardware ID=0D - UINT64 Hid;=0D -=0D - /// Unique Id=0D - UINT32 Uid;=0D -} CM_ARM_DEVICE_HANDLE_ACPI;=0D -=0D /** A structure that describes the PCI Device Handle (Type 1) in the=0D Generic Initiator Affinity structure in SRAT=0D =0D diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSratLibArm/SratGenerator= .c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSratLibArm/SratGenerator.c index 3ba2448f2384..c65a28cd142a 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSratLibArm/SratGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSratLibArm/SratGenerator.c @@ -34,7 +34,7 @@ - EArmObjGicItsInfo (OPTIONAL)=0D - EArchCommonObjMemoryAffinityInfo (OPTIONAL)=0D - EArmObjGenericInitiatorAffinityInfo (OPTIONAL)=0D - - EArmObjDeviceHandleAcpi (OPTIONAL)=0D + - EArchCommonObjDeviceHandleAcpi (OPTIONAL)=0D - EArmObjDeviceHandlePci (OPTIONAL)=0D */=0D =0D @@ -82,9 +82,9 @@ GET_OBJECT_LIST ( information from the Configuration Manager.=0D */=0D GET_OBJECT_LIST (=0D - EObjNameSpaceArm,=0D - EArmObjDeviceHandleAcpi,=0D - CM_ARM_DEVICE_HANDLE_ACPI=0D + EObjNameSpaceArchCommon,=0D + EArchCommonObjDeviceHandleAcpi,=0D + CM_ARCH_COMMON_DEVICE_HANDLE_ACPI=0D );=0D =0D /**=0D @@ -301,7 +301,7 @@ AddGenericInitiatorAffinity ( {=0D EFI_STATUS Status;=0D EFI_ACPI_6_3_GENERIC_INITIATOR_AFFINITY_STRUCTURE *GenInitAff;=0D - CM_ARM_DEVICE_HANDLE_ACPI *DeviceHandleAcpi;=0D + CM_ARCH_COMMON_DEVICE_HANDLE_ACPI *DeviceHandleAcpi;=0D CM_ARM_DEVICE_HANDLE_PCI *DeviceHandlePci;=0D UINT32 DeviceHandleCount;=0D =0D @@ -331,7 +331,7 @@ AddGenericInitiatorAffinity ( }=0D =0D if (GenInitAffInfo->DeviceHandleType =3D=3D EFI_ACPI_6_3_ACPI_DEVICE_H= ANDLE) {=0D - Status =3D GetEArmObjDeviceHandleAcpi (=0D + Status =3D GetEArchCommonObjDeviceHandleAcpi (=0D CfgMgrProtocol,=0D GenInitAffInfo->DeviceHandleToken,=0D &DeviceHandleAcpi,=0D diff --git a/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTok= enFixer.c b/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectToke= nFixer.c index 654686a0125a..43aae423814f 100644 --- a/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer= .c +++ b/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer= .c @@ -165,22 +165,21 @@ CM_OBJECT_TOKEN_FIXER TokenFixer[EArmObjMax] =3D { NULL, ///< 19 - SMMU Interrupt Array=0D TokenFixerNotImplemented, ///< 20 - Processor Hierarchy Info=0D TokenFixerNotImplemented, ///< 21 - Cache Info=0D - NULL, ///< 22 - Device Handle Acpi=0D - NULL, ///< 23 - Device Handle Pci=0D - NULL, ///< 24 - Generic Initiator Affinity=0D - NULL, ///< 25 - CMN-600 Info=0D - NULL, ///< 26 - Lpi Info=0D - NULL, ///< 27 - Reserved Memory Range Node=0D - NULL, ///< 28 - Memory Range Descriptor=0D - NULL, ///< 29 - Continuous Performance Contr= ol Info=0D - NULL, ///< 30 - Pcc Subspace Type 0 Info=0D + NULL, ///< 22 - Device Handle Pci=0D + NULL, ///< 23 - Generic Initiator Affinity=0D + NULL, ///< 24 - CMN-600 Info=0D + NULL, ///< 25 - Lpi Info=0D + NULL, ///< 26 - Reserved Memory Range Node=0D + NULL, ///< 27 - Memory Range Descriptor=0D + NULL, ///< 28 - Continuous Performance Contr= ol Info=0D + NULL, ///< 29 - Pcc Subspace Type 0 Info=0D + NULL, ///< 30 - Pcc Subspace Type 2 Info=0D NULL, ///< 31 - Pcc Subspace Type 2 Info=0D - NULL, ///< 32 - Pcc Subspace Type 2 Info=0D - NULL, ///< 33 - Pcc Subspace Type 3 Info=0D - NULL, ///< 34 - Pcc Subspace Type 4 Info=0D - NULL, ///< 35 - Pcc Subspace Type 5 Info=0D - NULL, ///< 36 - Embedded Trace Extension/Mod= ule Info=0D - NULL ///< 37 - P-State Dependency (PSD) Inf= o=0D + NULL, ///< 32 - Pcc Subspace Type 3 Info=0D + NULL, ///< 33 - Pcc Subspace Type 4 Info=0D + NULL, ///< 34 - Pcc Subspace Type 5 Info=0D + NULL, ///< 35 - Embedded Trace Extension/Mod= ule Info=0D + NULL ///< 36 - P-State Dependency (PSD) Inf= o=0D };=0D =0D /** CmObj token fixer.=0D diff --git a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationMa= nagerObjectParser.c b/DynamicTablesPkg/Library/Common/TableHelperLib/Config= urationManagerObjectParser.c index b2fe74cd4f9b..9326ea639351 100644 --- a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerOb= jectParser.c +++ b/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerOb= jectParser.c @@ -365,9 +365,9 @@ STATIC CONST CM_OBJ_PARSER CmArchCommonMemoryAffinityI= nfoParser[] =3D { { "Flags", 4, "0x%x", NULL }=0D };=0D =0D -/** A parser for EArmObjDeviceHandleAcpi.=0D +/** A parser for EArchCommonObjDeviceHandleAcpi.=0D */=0D -STATIC CONST CM_OBJ_PARSER CmArmDeviceHandleAcpiParser[] =3D {=0D +STATIC CONST CM_OBJ_PARSER CmArchCommonDeviceHandleAcpiParser[] =3D {=0D { "Hid", 8, "0x%llx", NULL },=0D { "Uid", 4, "0x%x", NULL }=0D };=0D @@ -682,6 +682,7 @@ STATIC CONST CM_OBJ_PARSER_ARRAY ArchCommonNamespaceOb= jectParser[] =3D { CM_PARSER_ADD_OBJECT (EArchCommonObjPciAddressMapInfo, CmArchCom= monPciAddressMapInfoParser),=0D CM_PARSER_ADD_OBJECT (EArchCommonObjPciInterruptMapInfo, CmArchCom= monPciInterruptMapInfoParser),=0D CM_PARSER_ADD_OBJECT (EArchCommonObjMemoryAffinityInfo, CmArchCom= monMemoryAffinityInfoParser),=0D + CM_PARSER_ADD_OBJECT (EArchCommonObjDeviceHandleAcpi, CmArchCom= monDeviceHandleAcpiParser),=0D CM_PARSER_ADD_OBJECT_RESERVED (EArchCommonObjMax)=0D };=0D =0D @@ -710,7 +711,6 @@ STATIC CONST CM_OBJ_PARSER_ARRAY ArmNamespaceObjectPar= ser[] =3D { CM_PARSER_ADD_OBJECT (EArmObjSmmuInterruptArray, CmArchCommonGe= nericInterruptParser),=0D CM_PARSER_ADD_OBJECT (EArmObjProcHierarchyInfo, CmArmProcHiera= rchyInfoParser),=0D CM_PARSER_ADD_OBJECT (EArmObjCacheInfo, CmArmCacheInfo= Parser),=0D - CM_PARSER_ADD_OBJECT (EArmObjDeviceHandleAcpi, CmArmDeviceHan= dleAcpiParser),=0D CM_PARSER_ADD_OBJECT (EArmObjDeviceHandlePci, CmArmDeviceHan= dlePciParser),=0D CM_PARSER_ADD_OBJECT (EArmObjGenericInitiatorAffinityInfo,CmArmGenericIn= itiatorAffinityInfoParser),=0D CM_PARSER_ADD_OBJECT (EArmObjCmn600Info, CmArmCmn600Inf= oParser),=0D diff --git a/DynamicTablesPkg/Readme.md b/DynamicTablesPkg/Readme.md index 55311fd4cef5..f82c37f4afeb 100644 --- a/DynamicTablesPkg/Readme.md +++ b/DynamicTablesPkg/Readme.md @@ -462,22 +462,21 @@ The CM_OBJECT_ID type is used to identify the Configu= ration Manager | 19 | SMMU Interrupt Array | |=0D | 20 | Processor Hierarchy Info | Move to Arch Common = NS |=0D | 21 | Cache Info | Move to Arch Common = NS |=0D -| 22 | Device Handle Acpi | Move to Arch Common = NS |=0D -| 23 | Device Handle PCI | Move to Arch Common = NS |=0D -| 24 | Generic Initiator Affinity Info | Move to Arch Common = NS |=0D -| 25 | CMN 600 Info | |=0D -| 26 | Low Power Idle State Info | Move to Arch Common = NS |=0D -| 27 | Reserved Memory Range Node | |=0D -| 28 | Memory Range Descriptor | |=0D -| 29 | Continuous Performance Control Info | Move to Arch Common = NS |=0D -| 30 | Pcc Subspace Type 0 Info | Move to Arch Common = NS |=0D -| 31 | Pcc Subspace Type 1 Info | Move to Arch Common = NS |=0D -| 32 | Pcc Subspace Type 2 Info | Move to Arch Common = NS |=0D -| 33 | Pcc Subspace Type 3 Info | Move to Arch Common = NS |=0D -| 34 | Pcc Subspace Type 4 Info | Move to Arch Common = NS |=0D -| 35 | Pcc Subspace Type 5 Info | Move to Arch Common = NS |=0D -| 36 | Embedded Trace Extension/Module Info | |=0D -| 37 | P-State Dependency (PSD) Info | Move to Arch Common = NS |=0D +| 22 | Device Handle PCI | Move to Arch Common = NS |=0D +| 23 | Generic Initiator Affinity Info | Move to Arch Common = NS |=0D +| 24 | CMN 600 Info | |=0D +| 25 | Low Power Idle State Info | Move to Arch Common = NS |=0D +| 26 | Reserved Memory Range Node | |=0D +| 27 | Memory Range Descriptor | |=0D +| 28 | Continuous Performance Control Info | Move to Arch Common = NS |=0D +| 29 | Pcc Subspace Type 0 Info | Move to Arch Common = NS |=0D +| 30 | Pcc Subspace Type 1 Info | Move to Arch Common = NS |=0D +| 31 | Pcc Subspace Type 2 Info | Move to Arch Common = NS |=0D +| 32 | Pcc Subspace Type 3 Info | Move to Arch Common = NS |=0D +| 33 | Pcc Subspace Type 4 Info | Move to Arch Common = NS |=0D +| 34 | Pcc Subspace Type 5 Info | Move to Arch Common = NS |=0D +| 35 | Embedded Trace Extension/Module Info | |=0D +| 36 | 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 | 9 | PCI Address Map Info | |=0D | 10 | PCI Interrupt Map Info | |=0D | 11 | Memory Affinity Info | |=0D +| 12 | Device Handle Acpi | |=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 (#116983): https://edk2.groups.io/g/devel/message/116983 Mute This Topic: https://groups.io/mt/105068153/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-