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 54830AC17B7 for ; Thu, 21 Mar 2024 16:01:18 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=0b8lSKI6K/UKkQNBAqpGaWorvsyoMbPYQT/R61aCiQI=; 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=1711036877; v=1; b=m+PyLQzXE96aU5T5xTrkFGjwXTxrE1m1zfOGkwurD4NzffV04w8AWXcvPxEQMyBp8uuT3Pe8 wn60bieez3OF3KA2fQW3DCT41VBYLezexUGWXxLJ9AuE/JQQruXl0CWZDcVQVoh4vDQAOucrRg7 B5txSt1EvdIBgPA6XPtrawkRqV6vhnTPiiXJiAegcgrjwcGzAEIs19Ui6p0hAGnEq5i8BwD1O9v nIbaKbn0lVOI/lWyRZfgKodinMXyVyYasVkaiVKwgfYJDJV2iAHJCDTwAl959jEKkelJgjcqnDt M3mmVJeimWkTg34SuQsxYbYm3rGtbSqztywVxLoPv+ZfA== X-Received: by 127.0.0.2 with SMTP id EU1FYY7687511x14VLyu7trd; Thu, 21 Mar 2024 09:01:17 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.612.1711036871189981785 for ; Thu, 21 Mar 2024 09:01:11 -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 2E5211063; Thu, 21 Mar 2024 09:01:45 -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 661FD3F67D; Thu, 21 Mar 2024 09:01:08 -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 18/19] DynamicTablesPkg: Move PCC Type 5 info to Arch Common Date: Thu, 21 Mar 2024 16:59:23 +0100 Message-Id: <20240321155924.707272-19-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:01:11 -0700 Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: Il897K1hAs1ekUteZtwKhJHlx7686176AA= 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=m+PyLQzX; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=arm.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io From: Sami Mujawar Move the PCC Subspace Type 5 info object from Arm Namespace to the Arch Common namespace. Correspondingly also update the following modules to reflect the changes introduced by the move: - PCCT 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 | 32 +++++++++++++++++ .../Include/ArmNameSpaceObjects.h | 36 ++----------------- .../Acpi/Arm/AcpiPcctLibArm/PcctGenerator.c | 22 ++++++------ .../Acpi/Arm/AcpiPcctLibArm/PcctGenerator.h | 4 +-- .../DynamicPlatRepoLib/CmObjectTokenFixer.c | 5 ++- .../ConfigurationManagerObjectParser.c | 6 ++-- DynamicTablesPkg/Readme.md | 6 ++-- 7 files changed, 55 insertions(+), 56 deletions(-) diff --git a/DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h b/Dynami= cTablesPkg/Include/ArchCommonNameSpaceObjects.h index d4de70af5a6c..58a137e905d9 100644 --- a/DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h +++ b/DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h @@ -44,6 +44,7 @@ typedef enum ArchCommonObjectID { EArchCommonObjPccSubspaceType2Info, ///< 21 - Pcc Subspace Typ= e 2 Info=0D EArchCommonObjPccSubspaceType3Info, ///< 22 - Pcc Subspace Typ= e 3 Info=0D EArchCommonObjPccSubspaceType4Info, ///< 23 - Pcc Subspace Typ= e 4 Info=0D + EArchCommonObjPccSubspaceType5Info, ///< 24 - Pcc Subspace Typ= e 5 Info=0D EArchCommonObjMax=0D } EARCH_COMMON_OBJECT_ID;=0D =0D @@ -610,6 +611,37 @@ typedef struct CmArchCommonPccSubspaceType3Info { */=0D typedef CM_ARCH_COMMON_PCC_SUBSPACE_TYPE3_INFO CM_ARCH_COMMON_PCC_SUBSPACE= _TYPE4_INFO;=0D =0D +/** A structure that describes a=0D + PCC Subspace of type 5 (HW-Registers).=0D +=0D + ID: EArchCommonObjPccSubspaceType5Info=0D +*/=0D +typedef struct CmArchCommonPccSubspaceType5Info {=0D + /** Generic Pcc information.=0D +=0D + The Subspace of Type0 contains information that can be re-used=0D + in other Subspace types.=0D +=0D + MaximumPeriodicAccessRate doesn't need to be populated for=0D + this structure.=0D + */=0D + PCC_SUBSPACE_GENERIC_INFO GenericPccInfo;=0D +=0D + /// Version.=0D + UINT16 Version;=0D +=0D + /// Platform Interrupt.=0D + CM_ARCH_COMMON_GENERIC_INTERRUPT PlatIrq;=0D +=0D + /// Command Complete Check Register.=0D + /// The WriteMask field is not used.=0D + PCC_MAILBOX_REGISTER_INFO CmdCompleteCheckReg;=0D +=0D + /// Error Status Register.=0D + /// The WriteMask field is not used.=0D + PCC_MAILBOX_REGISTER_INFO ErrorStatusReg;=0D +} CM_ARCH_COMMON_PCC_SUBSPACE_TYPE5_INFO;=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 7977cef07a0a..724e614bb652 100644 --- a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h +++ b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h @@ -51,9 +51,8 @@ typedef enum ArmObjectID { EArmObjCmn600Info, ///< 20 - C= MN-600 Info=0D EArmObjRmr, ///< 21 - R= eserved Memory Range Node=0D EArmObjMemoryRangeDescriptor, ///< 22 - M= emory Range Descriptor=0D - EArmObjPccSubspaceType5Info, ///< 23 - P= cc Subspace Type 5 Info=0D - EArmObjEtInfo, ///< 24 - E= mbedded Trace Extension/Module Info=0D - EArmObjPsdInfo, ///< 25 - P= -State Dependency (PSD) Info=0D + EArmObjEtInfo, ///< 23 - E= mbedded Trace Extension/Module Info=0D + EArmObjPsdInfo, ///< 24 - P= -State Dependency (PSD) Info=0D EArmObjMax=0D } EARM_OBJECT_ID;=0D =0D @@ -709,37 +708,6 @@ typedef struct CmArmRmrDescriptor { UINT64 Length;=0D } CM_ARM_MEMORY_RANGE_DESCRIPTOR;=0D =0D -/** A structure that describes a=0D - PCC Subspace of type 5 (HW-Registers).=0D -=0D - ID: EArmObjPccSubspaceType5Info=0D -*/=0D -typedef struct CmArmPccSubspaceType5Info {=0D - /** Generic Pcc information.=0D -=0D - The Subspace of Type0 contains information that can be re-used=0D - in other Subspace types.=0D -=0D - MaximumPeriodicAccessRate doesn't need to be populated for=0D - this structure.=0D - */=0D - PCC_SUBSPACE_GENERIC_INFO GenericPccInfo;=0D -=0D - /// Version.=0D - UINT16 Version;=0D -=0D - /// Platform Interrupt.=0D - CM_ARCH_COMMON_GENERIC_INTERRUPT PlatIrq;=0D -=0D - /// Command Complete Check Register.=0D - /// The WriteMask field is not used.=0D - PCC_MAILBOX_REGISTER_INFO CmdCompleteCheckReg;=0D -=0D - /// Error Status Register.=0D - /// The WriteMask field is not used.=0D - PCC_MAILBOX_REGISTER_INFO ErrorStatusReg;=0D -} CM_ARM_PCC_SUBSPACE_TYPE5_INFO;=0D -=0D /** An enum describing the Arm Embedded Trace device type.=0D */=0D typedef enum ArmEtType {=0D diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiPcctLibArm/PcctGenerator= .c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPcctLibArm/PcctGenerator.c index 0df6429b0f91..205c44405785 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiPcctLibArm/PcctGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPcctLibArm/PcctGenerator.c @@ -34,7 +34,7 @@ Requirements: - EArchCommonObjPccSubspaceType2Info=0D - EArchCommonObjPccSubspaceType3Info=0D - EArchCommonObjPccSubspaceType4Info=0D - - EArmObjPccSubspaceType5Info=0D + - EArchCommonObjPccSubspaceType5Info=0D */=0D =0D /** This macro expands to a function that retrieves the PCC=0D @@ -86,9 +86,9 @@ GET_OBJECT_LIST ( Subspace of Type 5 Information from the Configuration Manager.=0D */=0D GET_OBJECT_LIST (=0D - EObjNameSpaceArm,=0D - EArmObjPccSubspaceType5Info,=0D - CM_ARM_PCC_SUBSPACE_TYPE5_INFO=0D + EObjNameSpaceArchCommon,=0D + EArchCommonObjPccSubspaceType5Info,=0D + CM_ARCH_COMMON_PCC_SUBSPACE_TYPE5_INFO=0D );=0D =0D /** The Platform is capable of generating an interrupt=0D @@ -168,7 +168,7 @@ MappingTableFree ( =0D @param [in] MappingTable The mapping table structure.=0D @param [in] PccSubspace A pointer to=0D - CM_[ARM|ARCH_COMMON]_PCC_SUBSPACE_TYPE[X]_= INFO.=0D + CM_ARCH_COMMON_PCC_SUBSPACE_TYPE[X]_INFO.= =0D @param [in] Index Index at which PccSubspace must be added.= =0D This is the Subspace Id.=0D =0D @@ -209,7 +209,7 @@ MappingTableAdd ( =0D @param [in] MappingTable The mapping table structure.=0D @param [in] CmPccArray Pointer to an array of=0D - CM_[ARM|ARCH_COMMON]_PCC_SUBSPACE_TYPE[X]_I= NFO.=0D + CM_ARCH_COMMON_PCC_SUBSPACE_TYPE[X]_INFO.=0D @param [in] CmPccCount Count of objects in CmPccArray.=0D =0D @retval EFI_SUCCESS Success.=0D @@ -264,7 +264,7 @@ MapPccSubspaceId ( break;=0D =0D case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_5_HW_REGISTERS_COMMUNICATIONS:=0D - CmObjSize =3D sizeof (CM_ARM_PCC_SUBSPACE_TYPE5_INFO);=0D + CmObjSize =3D sizeof (CM_ARCH_COMMON_PCC_SUBSPACE_TYPE5_INFO);=0D break;=0D =0D default:=0D @@ -601,7 +601,7 @@ STATIC EFI_STATUS=0D EFIAPI=0D AddSubspaceStructType5 (=0D - IN CM_ARM_PCC_SUBSPACE_TYPE5_INFO *PccCmObj,= =0D + IN CM_ARCH_COMMON_PCC_SUBSPACE_TYPE5_INFO *PccCmObj,= =0D IN EFI_ACPI_6_4_PCCT_SUBSPACE_5_HW_REGISTERS_COMMUNICATIONS *PccAcpi=0D )=0D {=0D @@ -752,7 +752,7 @@ PopulatePcctTable ( =0D case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_5_HW_REGISTERS_COMMUNICATIONS:= =0D Status =3D AddSubspaceStructType5 (=0D - (CM_ARM_PCC_SUBSPACE_TYPE5_INFO *)CurrentPccSubspace,=0D + (CM_ARCH_COMMON_PCC_SUBSPACE_TYPE5_INFO *)CurrentPccSub= space,=0D (EFI_ACPI_6_4_PCCT_SUBSPACE_5_HW_REGISTERS_COMMUNICATIO= NS *)PccBuffer=0D );=0D =0D @@ -834,7 +834,7 @@ BuildPcctTable ( UINT32 PccType3Count;=0D CM_ARCH_COMMON_PCC_SUBSPACE_TYPE4_INFO *PccType4;=0D UINT32 PccType4Count;=0D - CM_ARM_PCC_SUBSPACE_TYPE5_INFO *PccType5;=0D + CM_ARCH_COMMON_PCC_SUBSPACE_TYPE5_INFO *PccType5;=0D UINT32 PccType5Count;=0D =0D ASSERT (This !=3D NULL);=0D @@ -920,7 +920,7 @@ BuildPcctTable ( goto error_handler;=0D }=0D =0D - Status =3D GetEArmObjPccSubspaceType5Info (=0D + Status =3D GetEArchCommonObjPccSubspaceType5Info (=0D CfgMgrProtocol,=0D CM_NULL_TOKEN,=0D &PccType5,=0D diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiPcctLibArm/PcctGenerator= .h b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPcctLibArm/PcctGenerator.h index e1bca78c2ffa..b99bf91b41b2 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiPcctLibArm/PcctGenerator.h +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPcctLibArm/PcctGenerator.h @@ -19,7 +19,7 @@ */=0D typedef struct MappingTable {=0D /// Mapping table for Subspace Ids.=0D - /// Subspace ID/Index <-> CM_[ARM|ARCH_COMMON]_PCC_SUBSPACE_TYPE[X]_INFO= pointer=0D + /// Subspace ID/Index <-> CM_ARCH_COMMON_PCC_SUBSPACE_TYPE[X]_INFO point= er=0D VOID **Table;=0D =0D /// Number of entries in the Table.=0D @@ -35,7 +35,7 @@ typedef struct AcpiPcctGenerator { // Private fields are defined from here.=0D =0D /// Table to map:=0D - /// Subspace ID/Index <-> CM_[ARM|ARCH_COMMON]_PCC_SUBSPACE_TYPE[X]_INFO= pointer=0D + /// Subspace ID/Index <-> CM_ARCH_COMMON_PCC_SUBSPACE_TYPE[X]_INFO point= er=0D MAPPING_TABLE MappingTable;=0D } ACPI_PCCT_GENERATOR;=0D =0D diff --git a/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTok= enFixer.c b/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectToke= nFixer.c index 112bef715166..05fbdadf156b 100644 --- a/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer= .c +++ b/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer= .c @@ -166,9 +166,8 @@ CM_OBJECT_TOKEN_FIXER TokenFixer[EArmObjMax] =3D { NULL, ///< 20 - CMN-600 Info=0D NULL, ///< 21 - Reserved Memory Range Node=0D NULL, ///< 22 - Memory Range Descriptor=0D - NULL, ///< 23 - Pcc Subspace Type 5 Info=0D - NULL, ///< 24 - Embedded Trace Extension/Mod= ule Info=0D - NULL ///< 25 - P-State Dependency (PSD) Inf= o=0D + NULL, ///< 23 - Embedded Trace Extension/Mod= ule Info=0D + NULL ///< 24 - 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 5f08f514faad..da7901a2c48c 100644 --- a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerOb= jectParser.c +++ b/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerOb= jectParser.c @@ -635,9 +635,9 @@ STATIC CONST CM_OBJ_PARSER CmArchCommonPccSubspaceType= 34InfoParser[] =3D { ARRAY_SIZE (CmArmMailboxRegisterInfoParser) },=0D };=0D =0D -/** A parser for EArmObjPccSubspaceType5Info.=0D +/** A parser for EArchCommonObjPccSubspaceType5Info.=0D */=0D -STATIC CONST CM_OBJ_PARSER CmArmPccSubspaceType5InfoParser[] =3D {=0D +STATIC CONST CM_OBJ_PARSER CmArchCommonPccSubspaceType5InfoParser[] =3D {= =0D { "GenericPccInfo", sizeof (PCC_SUBSPACE_GENERIC_INFO),=0D NULL, NULL, CmArchCommonPccSubspaceType0InfoParser,=0D ARRAY_SIZE (CmArchCommonPccSubspaceType0InfoParser) },=0D @@ -694,6 +694,7 @@ STATIC CONST CM_OBJ_PARSER_ARRAY ArchCommonNamespaceOb= jectParser[] =3D { CM_PARSER_ADD_OBJECT (EArchCommonObjPccSubspaceType2Info, CmArchC= ommonPccSubspaceType2InfoParser),=0D CM_PARSER_ADD_OBJECT (EArchCommonObjPccSubspaceType3Info, CmArchC= ommonPccSubspaceType34InfoParser),=0D CM_PARSER_ADD_OBJECT (EArchCommonObjPccSubspaceType4Info, CmArchC= ommonPccSubspaceType34InfoParser),=0D + CM_PARSER_ADD_OBJECT (EArchCommonObjPccSubspaceType5Info, CmArchC= ommonPccSubspaceType5InfoParser),=0D CM_PARSER_ADD_OBJECT_RESERVED (EArchCommonObjMax)=0D };=0D =0D @@ -723,7 +724,6 @@ STATIC CONST CM_OBJ_PARSER_ARRAY ArmNamespaceObjectPar= ser[] =3D { CM_PARSER_ADD_OBJECT (EArmObjCmn600Info, CmArmCmn600Info= Parser),=0D CM_PARSER_ADD_OBJECT (EArmObjRmr, CmArmRmrInfoPar= ser),=0D CM_PARSER_ADD_OBJECT (EArmObjMemoryRangeDescriptor, CmArmMemoryRang= eDescriptorInfoParser),=0D - CM_PARSER_ADD_OBJECT (EArmObjPccSubspaceType5Info, CmArmPccSubspac= eType5InfoParser),=0D CM_PARSER_ADD_OBJECT (EArmObjEtInfo, CmArmEtInfo),=0D CM_PARSER_ADD_OBJECT (EArmObjPsdInfo, CmArmPsdInfoPar= ser),=0D CM_PARSER_ADD_OBJECT_RESERVED (EArmObjMax)=0D diff --git a/DynamicTablesPkg/Readme.md b/DynamicTablesPkg/Readme.md index 1e45bcd5974e..d4c95a3c42c8 100644 --- a/DynamicTablesPkg/Readme.md +++ b/DynamicTablesPkg/Readme.md @@ -463,9 +463,8 @@ The CM_OBJECT_ID type is used to identify the Configura= tion Manager | 20 | CMN 600 Info | |=0D | 21 | Reserved Memory Range Node | |=0D | 22 | Memory Range Descriptor | |=0D -| 23 | Pcc Subspace Type 5 Info | Move to Arch Common = NS |=0D -| 24 | Embedded Trace Extension/Module Info | |=0D -| 25 | P-State Dependency (PSD) Info | Move to Arch Common = NS |=0D +| 23 | Embedded Trace Extension/Module Info | |=0D +| 24 | 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,5 +495,6 @@ The CM_OBJECT_ID type is used to identify the Configura= tion Manager | 21 | Pcc Subspace Type 2 Info | |=0D | 22 | Pcc Subspace Type 3 Info | |=0D | 23 | Pcc Subspace Type 4 Info | |=0D +| 24 | Pcc Subspace Type 5 Info | |=0D | `*` | All other values are reserved. | |=0D =0D --=20 2.25.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#116996): https://edk2.groups.io/g/devel/message/116996 Mute This Topic: https://groups.io/mt/105068176/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-