From nobody Sat May 11 15:44:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+114423+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+114423+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1706196136; cv=none; d=zohomail.com; s=zohoarc; b=BvTlK2vyXyhLNcOjmrs8+YJ3IQJtNo/pLLlH2N5VRxS1Bshk3HlgnTOcvkFuZntAk9TvfISxH4JCSv1ikKEJS94DgzhM0878okeQcFhmmIgrFDcccvrySI0m7IYgpWm9c6djRkzCFMSSJrnqcglP2CFCc8jSZ5Jvm+MrdPwFlKA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1706196136; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=6wnHZ9+QN+ElRTcPjbeRYBE2dJ4jMnrG89TJu/qNnmc=; b=Rj3XNLlm6ng6aFVx2ZHVxmHnvECRcigvhVDPCYbl+twcyhzsA4qHwNcBIryUqvgU9u9uTTmxxx62ngaPY0fXPNTBbyPlc0ZD0f5k2mUE/IJ+PPrf3ZbsOEb2y1nk3EroM9oFpRfh2y5CdorMRHykkgTIxz81xWOoqsQcmXaiBvg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+114423+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1706196136263207.4897793635024; Thu, 25 Jan 2024 07:22:16 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=21cVCEUCCvKt+Wx2CtjAIzujEapXkq/mX1vd4/S7qRI=; 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:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1706196136; v=1; b=VlxINKEEakTRnDIMiQxVsDPBXArxpkJTTgwt5heQgYdbnwgkZl8ipYQD9WyYct43OQmZonAk sFWzf2TwEkEGgXAnfaiJ920dNHsmoSs30i7wEeS3xQiEOhiB6XG2cfgPYzgeGxqMU6NX9hYWGlc A2WEt1hRaJFrP/63koqE6fzI= X-Received: by 127.0.0.2 with SMTP id hixcYY1788612x2bqdqlibso; Thu, 25 Jan 2024 07:22:16 -0800 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.20380.1706196135328178393 for ; Thu, 25 Jan 2024 07:22:15 -0800 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 71688FEC; Thu, 25 Jan 2024 07:22:59 -0800 (PST) X-Received: from e126645.arm.com (unknown [10.57.47.22]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 04C883F5A1; Thu, 25 Jan 2024 07:22:13 -0800 (PST) From: "PierreGondois" To: devel@edk2.groups.io Cc: Sami Mujawar , Thomas Abraham , Pierre Gondois Subject: [edk2-devel] [PATCH v5 1/4] Platform/ARM: Juno: Fix typo Date: Thu, 25 Jan 2024 16:21:40 +0100 Message-Id: <20240125152143.624231-2-Pierre.Gondois@arm.com> In-Reply-To: <20240125152143.624231-1-Pierre.Gondois@arm.com> References: <20240125152143.624231-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 Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 3ntwrfDJPhWLHss2j6cZW05rx1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1706196137211100007 Content-Type: text/plain; charset="utf-8" From: Pierre Gondois Fix a typo. Reviewed-by: Sami Mujawar Signed-off-by: Pierre Gondois --- .../ConfigurationManagerDxe/ConfigurationManager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManager= Dxe/ConfigurationManager.c b/Platform/ARM/JunoPkg/ConfigurationManager/Conf= igurationManagerDxe/ConfigurationManager.c index 91f035480dcf..2fdb15cc4caf 100644 --- a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/Con= figurationManager.c +++ b/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/Con= figurationManager.c @@ -993,7 +993,7 @@ GetGicCInfo ( return EFI_NOT_FOUND; } =20 -/** Return Lpi State Infor. +/** Return Lpi State Info. =20 @param [in] This Pointer to the Configuration Manager Pro= tocol. @param [in] CmObjectId The Object ID of the CM object requested --=20 2.25.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#114423): https://edk2.groups.io/g/devel/message/114423 Mute This Topic: https://groups.io/mt/103955617/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sat May 11 15:44:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+114424+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+114424+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1706196137; cv=none; d=zohomail.com; s=zohoarc; b=KSJ7+sKRwihx96nY62mlYhZsG9idMT3h1Lu2W3/g+Nt0HcWX2hwsbBoKBXxvyLDb158usK91gLx7ulQz7g4FK9TNbLS/YMPtqMSaTJ7QqccZ/5o13YOcxGmZWvrO2O+p9Mlxj1XRjha3XIwTeRe+ASypHu3PUn/YK8jgXdOPm1g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1706196137; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=0a2UWDvwntHpGW3A+duHBllEkPNUxfYs/KbferoEBfA=; b=nBRs65JeI1ytNAn9w2jdVOjSqoupZz5kNdHxq2u8oCBaqWhxmgfzGhpVQ1qWecukwY9ZQoBK1sWIsIDFXaP+GRN2rzhsK/hkKXY42iPgFT9yc5YE85RVM/QZQNvQloqKF+4RuQKM9wMF4CfgbyzZCMAmoxKgEZV8z+GG/9MQ6U0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+114424+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 170619613791645.62682126926791; Thu, 25 Jan 2024 07:22:17 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=GZV4VpjcWpZB+nW5ozocQBhgKIev/uRcvBc84MRTUB0=; 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:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1706196137; v=1; b=WppL+NA/Ycj7jKrpg/6P2uDWw9S/KKIe6clgRyRWM5kgicR1KmUVvSpYzqv5Qh9Fq/AQFca2 628nJUGIUFVM5uo18NR12qaBTEYeCos1y4n1JMbX2p6WiCRBDt6H7/T9h3AvvzYnAiRwo9ma9Qi /7o9Pw0Qxol0dBZFg4DoRoYM= X-Received: by 127.0.0.2 with SMTP id OlTDYY1788612x66vXn7ZiHA; Thu, 25 Jan 2024 07:22:17 -0800 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.20384.1706196136906317646 for ; Thu, 25 Jan 2024 07:22:17 -0800 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 1DCC41FB; Thu, 25 Jan 2024 07:23:01 -0800 (PST) X-Received: from e126645.arm.com (unknown [10.57.47.22]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 651B83F5A1; Thu, 25 Jan 2024 07:22:15 -0800 (PST) From: "PierreGondois" To: devel@edk2.groups.io Cc: Sami Mujawar , Thomas Abraham , Pierre Gondois Subject: [edk2-devel] [PATCH v5 2/4] Platform/ARM: Juno: Generate _PSD objects Date: Thu, 25 Jan 2024 16:21:41 +0100 Message-Id: <20240125152143.624231-3-Pierre.Gondois@arm.com> In-Reply-To: <20240125152143.624231-1-Pierre.Gondois@arm.com> References: <20240125152143.624231-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 Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: uRv5SGbYtAzlhlp4PTTYQYRTx1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1706196139239100011 Content-Type: text/plain; charset="utf-8" From: Pierre Gondois The SsdtCpuTopologyGenerator can generate _PSD objects. Add _PSD information and handling to the Configuration Manager to generate them. Reviewed-by: Sami Mujawar Signed-off-by: Pierre Gondois --- .../ConfigurationManager.c | 98 +++++++++++++++++-- .../ConfigurationManager.h | 24 ++++- 2 files changed, 113 insertions(+), 9 deletions(-) diff --git a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManager= Dxe/ConfigurationManager.c b/Platform/ARM/JunoPkg/ConfigurationManager/Conf= igurationManagerDxe/ConfigurationManager.c index 2fdb15cc4caf..15292f810a28 100644 --- a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/Con= figurationManager.c +++ b/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/Con= figurationManager.c @@ -129,12 +129,12 @@ EDKII_PLATFORM_REPOSITORY_INFO ArmJunoPlatformReposit= oryInfo =3D { GIC_ENTRY (CPUInterfaceNumber, Mpidr, PmuIrq, VGicIrq, EnergyEfficien= cy) */ { - GICC_ENTRY (0, GET_MPID (0, 0), 34, 25, 1), - GICC_ENTRY (1, GET_MPID (0, 1), 38, 25, 1), - GICC_ENTRY (2, GET_MPID (1, 0), 50, 25, 0), - GICC_ENTRY (3, GET_MPID (1, 1), 54, 25, 0), - GICC_ENTRY (4, GET_MPID (1, 2), 58, 25, 0), - GICC_ENTRY (5, GET_MPID (1, 3), 62, 25, 0) + GICC_ENTRY (0, GET_MPID (0, 0), 34, 25, 1, REFERENCE_TOKEN (PsdInfo[PS= D_BIG_DOMAIN_ID])), + GICC_ENTRY (1, GET_MPID (0, 1), 38, 25, 1, REFERENCE_TOKEN (PsdInfo[PS= D_BIG_DOMAIN_ID])), + GICC_ENTRY (2, GET_MPID (1, 0), 50, 25, 0, REFERENCE_TOKEN (PsdInfo[PS= D_LITTLE_DOMAIN_ID])), + GICC_ENTRY (3, GET_MPID (1, 1), 54, 25, 0, REFERENCE_TOKEN (PsdInfo[PS= D_LITTLE_DOMAIN_ID])), + GICC_ENTRY (4, GET_MPID (1, 2), 58, 25, 0, REFERENCE_TOKEN (PsdInfo[PS= D_LITTLE_DOMAIN_ID])), + GICC_ENTRY (5, GET_MPID (1, 3), 62, 25, 0, REFERENCE_TOKEN (PsdInfo[PS= D_LITTLE_DOMAIN_ID])), }, =20 // GIC Distributor Info @@ -733,7 +733,29 @@ EDKII_PLATFORM_REPOSITORY_INFO ArmJunoPlatformReposito= ryInfo =3D { { { REFERENCE_TOKEN (LpiInfo[1]) }, { REFERENCE_TOKEN (LpiInfo[2]) }, - } + }, + { // Power domains + { // 0: big cores + // Revision + EFI_ACPI_6_5_AML_PSD_REVISION, + // Domain + PSD_BIG_DOMAIN_ID, + // CoordType + ACPI_AML_COORD_TYPE_SW_ANY, + // NumProc + 2, + }, + { // 1: little cores + // Revision + EFI_ACPI_6_5_AML_PSD_REVISION, + // Domain + PSD_LITTLE_DOMAIN_ID, + // CoordType + ACPI_AML_COORD_TYPE_SW_ANY, + // NumProc + 4, + }, + }, }; =20 /** A helper function for returning the Configuration Manager Objects. @@ -1141,6 +1163,55 @@ GetPciInterruptMapInfo ( return EFI_NOT_FOUND; } =20 +/** Return Psd Info. + + @param [in] This Pointer to the Configuration Manager Pro= tocol. + @param [in] CmObjectId The Object ID of the CM object requested + @param [in] SearchToken A unique token for identifying the reque= sted + CM_ARM_PCI_INTERRUPT_MAP_INFO object. + @param [in, out] CmObject Pointer to the Configuration Manager Obj= ect + descriptor describing the requested Obje= ct. + + @retval EFI_SUCCESS Success. + @retval EFI_INVALID_PARAMETER A parameter is invalid. + @retval EFI_NOT_FOUND The required object information is not f= ound. +**/ +EFI_STATUS +EFIAPI +GetPsdInfo ( + IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST This, + IN CONST CM_OBJECT_ID CmObjectId, + IN CONST CM_OBJECT_TOKEN SearchToken, + IN OUT CM_OBJ_DESCRIPTOR * CONST CmObject + ) +{ + EDKII_PLATFORM_REPOSITORY_INFO * PlatformRepo; + UINT32 TotalObjCount; + UINT32 ObjIndex; + + if ((This =3D=3D NULL) || (CmObject =3D=3D NULL)) { + ASSERT (This !=3D NULL); + ASSERT (CmObject !=3D NULL); + return EFI_INVALID_PARAMETER; + } + + PlatformRepo =3D This->PlatRepoInfo; + + TotalObjCount =3D ARRAY_SIZE (PlatformRepo->PsdInfo); + + for (ObjIndex =3D 0; ObjIndex < TotalObjCount; ObjIndex++) { + if (SearchToken =3D=3D (CM_OBJECT_TOKEN)&PlatformRepo->PsdInfo[ObjInde= x]) { + CmObject->ObjectId =3D CmObjectId; + CmObject->Size =3D sizeof (PlatformRepo->PsdInfo[ObjIndex]); + CmObject->Data =3D (VOID*)&PlatformRepo->PsdInfo[ObjIndex]; + CmObject->Count =3D 1; + return EFI_SUCCESS; + } + } + + return EFI_SUCCESS; +} + /** Return a list of Configuration Manager object references pointed to by= the given input token. =20 @@ -1549,6 +1620,19 @@ GetArmNameSpaceObject ( ); break; =20 + case EArmObjPsdInfo: + Status =3D HandleCmObjectRefByToken ( + This, + CmObjectId, + PlatformRepo->PsdInfo, + sizeof (PlatformRepo->PsdInfo), + ARRAY_SIZE (PlatformRepo->PsdInfo), + Token, + GetPsdInfo, + CmObject + ); + break; + default: { Status =3D EFI_NOT_FOUND; DEBUG (( diff --git a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManager= Dxe/ConfigurationManager.h b/Platform/ARM/JunoPkg/ConfigurationManager/Conf= igurationManagerDxe/ConfigurationManager.h index 5b5e62427f2b..e58e9cbecb23 100644 --- a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/Con= figurationManager.h +++ b/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/Con= figurationManager.h @@ -41,7 +41,8 @@ extern CHAR8 ssdtpci_aml_code[]; Mpidr, \ PmuIrq, \ VGicIrq, \ - EnergyEfficiency \ + EnergyEfficiency, \ + PsdToken \ ) { \ CPUInterfaceNumber, /* UINT32 CPUInterfaceNumber */ \ CPUInterfaceNumber, /* UINT32 AcpiProcessorUid */ \ @@ -57,7 +58,15 @@ extern CHAR8 ssdtpci_aml_code[]; VGicIrq, /* UINT32 VGICMaintenanceInterrupt */ \ 0, /* UINT64 GICRBaseAddress */ \ Mpidr, /* UINT64 MPIDR */ \ - EnergyEfficiency /* UINT8 ProcessorPowerEfficiencyClass*/ \ + EnergyEfficiency, /* UINT8 ProcessorPowerEfficiencyClass*/ \ + 0, /* UINT16 SpeOverflowInterrupt */ \ + 0, /* UINT32 ProximityDomain */ \ + 0, /* UINT32 ClockDomain */ \ + 0, /* UINT32 AffinityFlags */ \ + CM_NULL_TOKEN, /* CM_OBJECT_TOKEN CpcToken */ \ + 0, /* UINT16 TrbeInterrupt */ \ + CM_NULL_TOKEN, /* CM_OBJECT_TOKEN EtToken */ \ + PsdToken, /* CM_OBJECT_TOKEN PsdToken */ \ } =20 /** A helper macro for populating the Processor Hierarchy Node flags @@ -196,6 +205,14 @@ typedef EFI_STATUS (*CM_OBJECT_HANDLER_PROC) ( #define LPI_STATE_COUNT (CORES_LPI_STATE_COUNT + = \ CLUSTERS_LPI_STATE_COUNT) =20 +/** Psd domains: + - 0: big cores + - 1: little cores +*/ +#define PSD_BIG_DOMAIN_ID 0 +#define PSD_LITTLE_DOMAIN_ID 1 +#define PSD_DOMAIN_COUNT 2 + /** A structure describing the platform configuration manager repository information */ @@ -283,6 +300,9 @@ typedef struct PlatformRepositoryInfo { // Cores Low Power Idle state references (LPI) CM_ARM_OBJ_REF CoresLpiRef[CORES_LPI_STATE_COUNT]; =20 + // Power domains + CM_ARM_PSD_INFO PsdInfo[PSD_DOMAIN_COUNT]; + /// Juno Board Revision UINT32 JunoRevision; } EDKII_PLATFORM_REPOSITORY_INFO; --=20 2.25.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#114424): https://edk2.groups.io/g/devel/message/114424 Mute This Topic: https://groups.io/mt/103955618/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sat May 11 15:44:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+114425+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+114425+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1706196139; cv=none; d=zohomail.com; s=zohoarc; b=WpKs530mdRVIB4d1XesBUWDThn0Ds9nE0nhMwnW0yvuPxKZA2gFbDmOyFJ3KClkXdTFi1xtznllx0V4cQFiI054ldvgC/gC+qPOMPyg9q07oqj+W0kbLxgneJKBA28JeuSXj6AeHp8BA5fgfBDLeOnh4CZdaH0QDOpgX8RwHY5s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1706196139; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=Jf7pSPcq+EQNMGtZdio+yTHa/DyzZp7hUinBsk0HZK0=; b=VcNTRQ00GifIf3rVb8VcxHeEA9WSlxDrwSKg9W/yy2+1G5kCFT/PElYdc+J4g54XMM+/1iNdKmW4irnvPLIdGW2Z9wGFOyiH1c7X68/UANKZhb8dmaO1dRGL8MINggkOobLisTUEAyyhuicULduQcjmBoyGqNCmipJPKcZOQbzE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+114425+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1706196139389881.4495751096707; Thu, 25 Jan 2024 07:22:19 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=br/taeJHEaXKsvrgSvAWrAF8o7doV3/WucbLkSbYP5Y=; 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:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1706196139; v=1; b=YNKkmk2HtKNMXTL3EyMzBL0yVbmGc0P1c0mfSEHYnPx9TsMG0wGJxNBVQbBbE4UzEmStqxNq VWLgkf/WN+0TGrt69G0JEwrBYM0DrVO84VmNlBi+D78dd93kA6waz0C3GRyH0BzDAX/2kmNts5X qdKAd0ugtjPNAivEaOhfy9H4= X-Received: by 127.0.0.2 with SMTP id uAQlYY1788612xx0nRmreVDy; Thu, 25 Jan 2024 07:22:19 -0800 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.20387.1706196138458826454 for ; Thu, 25 Jan 2024 07:22:18 -0800 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 9BC031FB; Thu, 25 Jan 2024 07:23:02 -0800 (PST) X-Received: from e126645.arm.com (unknown [10.57.47.22]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 0CBC93F5A1; Thu, 25 Jan 2024 07:22:16 -0800 (PST) From: "PierreGondois" To: devel@edk2.groups.io Cc: Sami Mujawar , Thomas Abraham , Pierre Gondois Subject: [edk2-devel] [PATCH v5 3/4] Platform/ARM: Juno: Generate _CPC objects for JunoR2 Date: Thu, 25 Jan 2024 16:21:42 +0100 Message-Id: <20240125152143.624231-4-Pierre.Gondois@arm.com> In-Reply-To: <20240125152143.624231-1-Pierre.Gondois@arm.com> References: <20240125152143.624231-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 Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: eEWebT8DATsqHXeiuHB2RA1ax1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1706196141359100016 Content-Type: text/plain; charset="utf-8" From: Pierre Gondois The SsdtCpuTopologyGenerator can generate _CPC objects. This is done by querying the SCP for the relevant performance state information through SCMI. CM_ARM_CPC_INFO are then populated and used to generate _CPC objects in the Ssdt Cpu topology. Use the DynamicTablesScmiInfoLib and add the handling to generate _CPC information. Note that using _CPC is only possible if SCP is correctly tuned to advertise performance levels on an abstract and unified scale. A basic check is done to prevent the _CPC generation otherwise. Perf level values used for testing: - little CPUs OPPs: [181, 322, 383] * 1000 - big CPUs OPPs: [512, 833, 1024] * 1000 Signed-off-by: Pierre Gondois --- .../ConfigurationManager.c | 242 +++++++++++++++++- .../ConfigurationManager.h | 7 + .../ConfigurationManagerDxe.inf | 1 + 3 files changed, 247 insertions(+), 3 deletions(-) diff --git a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManager= Dxe/ConfigurationManager.c b/Platform/ARM/JunoPkg/ConfigurationManager/Conf= igurationManagerDxe/ConfigurationManager.c index 15292f810a28..d92a08749e87 100644 --- a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/Con= figurationManager.c +++ b/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/Con= figurationManager.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -901,6 +902,172 @@ HandleCmObjectSearchPlatformRepo ( return Status; } =20 +/** Clear Cpc information. + + If populating _CPC information fails, remove GicC tokens pointing + to Cpc CmObj to avoid creating corrupted _CPC objects. + + @param [in] PlatformRepo Platfom Info repository. + + @retval EFI_SUCCESS Success. +**/ +STATIC +EFI_STATUS +EFIAPI +ClearCpcInfo ( + EDKII_PLATFORM_REPOSITORY_INFO *PlatformRepo + ) +{ + CM_ARM_GICC_INFO *GicCInfo; + + GicCInfo =3D (CM_ARM_GICC_INFO*)&PlatformRepo->GicCInfo; + + GicCInfo[0].CpcToken =3D CM_NULL_TOKEN; + GicCInfo[1].CpcToken =3D CM_NULL_TOKEN; + GicCInfo[2].CpcToken =3D CM_NULL_TOKEN; + GicCInfo[3].CpcToken =3D CM_NULL_TOKEN; + GicCInfo[4].CpcToken =3D CM_NULL_TOKEN; + GicCInfo[5].CpcToken =3D CM_NULL_TOKEN; + + return EFI_SUCCESS; +} + +/** Use the SCMI protocol to populate CPC objects dynamically. + + @param [in] PlatformRepo Platfom Info repository. + @param [in] DomainId Id of the DVFS domain to probe. + + @retval EFI_SUCCESS Success. + @retval EFI_INVALID_PARAMETER A parameter is invalid. + @retval EFI_UNSUPPORTED Not supported. + @retval !(EFI_SUCCESS) An error occured. +**/ +STATIC +EFI_STATUS +EFIAPI +PopulateCpcInfo ( + EDKII_PLATFORM_REPOSITORY_INFO *PlatformRepo, + IN UINT32 DomainId + ) +{ + EFI_STATUS Status; + CM_ARM_GICC_INFO *GicCInfo; + AML_CPC_INFO *CpcInfo; + + if ((PlatformRepo =3D=3D NULL) || + ((DomainId !=3D PSD_BIG_DOMAIN_ID) && + (DomainId !=3D PSD_LITTLE_DOMAIN_ID))) { + Status =3D EFI_INVALID_PARAMETER; + ASSERT_EFI_ERROR (Status); + return Status; + } + + CpcInfo =3D &PlatformRepo->CpcInfo[DomainId]; + GicCInfo =3D (CM_ARM_GICC_INFO*)&PlatformRepo->GicCInfo; + + Status =3D DynamicTablesScmiInfoGetFastChannel ( + PlatformRepo->PsdInfo[DomainId].Domain, + CpcInfo + ); + if (EFI_ERROR (Status)) { + return Status; + } + + /* CPPC must advertise performances on a 'continuous, abstract, unit-less + performance scale', i.e. CPU performances on an asymmetric platform + nust be represented on a unified scale. + CPU performance values are obtained from SCP through SCMI and adverti= sed + to the OS via the _CPC objects. SCP currently maps performance reques= ts + to frequency requests. + Thus, SCP must be modified to advertise (and correctly handle) + performance values on a unified scale. + + Check that SCP is using a unified scale by checking that the advertis= ed + lowest/nominal frequencies are not the default ones. + */ + if (((DomainId =3D=3D PSD_BIG_DOMAIN_ID) && + (CpcInfo->LowestPerformanceInteger =3D=3D 600000000) && + (CpcInfo->NominalPerformanceInteger =3D=3D 1000000000)) || + ((DomainId =3D=3D PSD_LITTLE_DOMAIN_ID) && + (CpcInfo->LowestPerformanceInteger =3D=3D 450000000) && + (CpcInfo->NominalPerformanceInteger =3D=3D 800000000))) { + return EFI_UNSUPPORTED; + } + + // Juno R2's lowest/nominal frequencies. + // Nominal frequency !=3D Highest frequency. + if (DomainId =3D=3D PSD_BIG_DOMAIN_ID) { + CpcInfo->LowestFrequencyInteger =3D 600; + CpcInfo->NominalFrequencyInteger =3D 1000; + } else { + CpcInfo->LowestFrequencyInteger =3D 450; + CpcInfo->NominalFrequencyInteger =3D 800; + } + + // The mapping Psd -> CPUs is available here. + if (DomainId =3D=3D PSD_BIG_DOMAIN_ID) { + GicCInfo[0].CpcToken =3D (CM_OBJECT_TOKEN)CpcInfo; + GicCInfo[1].CpcToken =3D (CM_OBJECT_TOKEN)CpcInfo; + } else { + GicCInfo[2].CpcToken =3D (CM_OBJECT_TOKEN)CpcInfo; + GicCInfo[3].CpcToken =3D (CM_OBJECT_TOKEN)CpcInfo; + GicCInfo[4].CpcToken =3D (CM_OBJECT_TOKEN)CpcInfo; + GicCInfo[5].CpcToken =3D (CM_OBJECT_TOKEN)CpcInfo; + } + + /* + Arm advises to use FFH to the following registers which uses AMU count= ers: + - ReferencePerformanceCounterRegister + - DeliveredPerformanceCounterRegister + Cf. Arm Functional Fixed Hardware Specification + s3.2 Performance management and Collaborative Processor Performance Co= ntrol + + AMU is not supported by the Juno, so clear these registers. + */ + CpcInfo->ReferencePerformanceCounterRegister.AddressSpaceId =3D EFI_ACPI= _6_5_SYSTEM_MEMORY; + CpcInfo->ReferencePerformanceCounterRegister.RegisterBitWidth =3D 0; + CpcInfo->ReferencePerformanceCounterRegister.RegisterBitOffset =3D 0; + CpcInfo->ReferencePerformanceCounterRegister.AccessSize =3D 0; + CpcInfo->ReferencePerformanceCounterRegister.Address =3D 0; + + CpcInfo->DeliveredPerformanceCounterRegister.AddressSpaceId =3D EFI_ACPI= _6_5_SYSTEM_MEMORY; + CpcInfo->DeliveredPerformanceCounterRegister.RegisterBitWidth =3D 0; + CpcInfo->DeliveredPerformanceCounterRegister.RegisterBitOffset =3D 0; + CpcInfo->DeliveredPerformanceCounterRegister.AccessSize =3D 0; + CpcInfo->DeliveredPerformanceCounterRegister.Address =3D 0; + + return Status; +} + +/** Iterate over the PSD Domains and try to populate the Cpc objects. +**/ +VOID +EFIAPI +PopulateCpcObjects ( + VOID + ) +{ + EFI_STATUS Status; + UINT32 Index; + BOOLEAN CpcFailed; + + CpcFailed =3D FALSE; + for (Index =3D 0; Index < PSD_DOMAIN_COUNT; Index++) { + Status =3D PopulateCpcInfo (&ArmJunoPlatformRepositoryInfo, Index); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_WARN, "WARN: Could not populate _CPC.\n")); + CpcFailed =3D TRUE; + break; + } + } + + if (CpcFailed) { + // _CPC information is not mandatory and SCP might not support some + // SCMI requests. Failing should not prevent from booting. + ClearCpcInfo (&ArmJunoPlatformRepositoryInfo); + } +} + /** Initialize the platform configuration repository. =20 @param [in] This Pointer to the Configuration Manager Protocol. @@ -920,6 +1087,14 @@ InitializePlatformRepository ( =20 GetJunoRevision (PlatformRepo->JunoRevision); DEBUG ((DEBUG_INFO, "Juno Rev =3D 0x%x\n", PlatformRepo->JunoRevision)); + + /// + /// _CPC was only tested on Juno R2, so only enable support for this ver= sion. + /// + if ((ArmJunoPlatformRepositoryInfo.JunoRevision =3D=3D JUNO_REVISION_R2)= ) { + PopulateCpcObjects (); + } + return EFI_SUCCESS; } =20 @@ -1212,6 +1387,55 @@ GetPsdInfo ( return EFI_SUCCESS; } =20 +/** Return Cpc Info. + + @param [in] This Pointer to the Configuration Manager Pro= tocol. + @param [in] CmObjectId The Object ID of the CM object requested + @param [in] SearchToken A unique token for identifying the reque= sted + CM_ARM_PCI_INTERRUPT_MAP_INFO object. + @param [in, out] CmObject Pointer to the Configuration Manager Obj= ect + descriptor describing the requested Obje= ct. + + @retval EFI_SUCCESS Success. + @retval EFI_INVALID_PARAMETER A parameter is invalid. + @retval EFI_NOT_FOUND The required object information is not f= ound. +**/ +EFI_STATUS +EFIAPI +GetCpcInfo ( + IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST This, + IN CONST CM_OBJECT_ID CmObjectId, + IN CONST CM_OBJECT_TOKEN SearchToken, + IN OUT CM_OBJ_DESCRIPTOR * CONST CmObject + ) +{ + EDKII_PLATFORM_REPOSITORY_INFO * PlatformRepo; + UINT32 TotalObjCount; + UINT32 ObjIndex; + + if ((This =3D=3D NULL) || (CmObject =3D=3D NULL)) { + ASSERT (This !=3D NULL); + ASSERT (CmObject !=3D NULL); + return EFI_INVALID_PARAMETER; + } + + PlatformRepo =3D This->PlatRepoInfo; + + TotalObjCount =3D ARRAY_SIZE (PlatformRepo->CpcInfo); + + for (ObjIndex =3D 0; ObjIndex < TotalObjCount; ObjIndex++) { + if (SearchToken =3D=3D (CM_OBJECT_TOKEN)&PlatformRepo->CpcInfo[ObjInde= x]) { + CmObject->ObjectId =3D CmObjectId; + CmObject->Size =3D sizeof (PlatformRepo->CpcInfo[ObjIndex]); + CmObject->Data =3D (VOID*)&PlatformRepo->CpcInfo[ObjIndex]; + CmObject->Count =3D 1; + return EFI_SUCCESS; + } + } + + return EFI_SUCCESS; +} + /** Return a list of Configuration Manager object references pointed to by= the given input token. =20 @@ -1633,6 +1857,19 @@ GetArmNameSpaceObject ( ); break; =20 + case EArmObjCpcInfo: + Status =3D HandleCmObjectRefByToken ( + This, + CmObjectId, + PlatformRepo->CpcInfo, + sizeof (PlatformRepo->CpcInfo), + ARRAY_SIZE (PlatformRepo->CpcInfo), + Token, + GetCpcInfo, + CmObject + ); + break; + default: { Status =3D EFI_NOT_FOUND; DEBUG (( @@ -1821,7 +2058,7 @@ ConfigurationManagerDxeInitialize ( " Status =3D %r\n", Status )); - goto error_handler; + return Status; } =20 Status =3D InitializePlatformRepository ( @@ -1836,6 +2073,5 @@ ConfigurationManagerDxeInitialize ( )); } =20 -error_handler: - return Status; + return EFI_SUCCESS; } diff --git a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManager= Dxe/ConfigurationManager.h b/Platform/ARM/JunoPkg/ConfigurationManager/Conf= igurationManagerDxe/ConfigurationManager.h index e58e9cbecb23..78452295a180 100644 --- a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/Con= figurationManager.h +++ b/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/Con= figurationManager.h @@ -303,6 +303,13 @@ typedef struct PlatformRepositoryInfo { // Power domains CM_ARM_PSD_INFO PsdInfo[PSD_DOMAIN_COUNT]; =20 + // + // Dynamically populated fields from here. + // + + // Cpc info (1 for each PSD domain) + CM_ARM_CPC_INFO CpcInfo[PSD_DOMAIN_COUNT]; + /// Juno Board Revision UINT32 JunoRevision; } EDKII_PLATFORM_REPOSITORY_INFO; diff --git a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManager= Dxe/ConfigurationManagerDxe.inf b/Platform/ARM/JunoPkg/ConfigurationManager= /ConfigurationManagerDxe/ConfigurationManagerDxe.inf index 91bffe8d5d82..53060bf56531 100644 --- a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/Con= figurationManagerDxe.inf +++ b/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/Con= figurationManagerDxe.inf @@ -35,6 +35,7 @@ [Packages] =20 [LibraryClasses] ArmPlatformLib + DynamicTablesScmiInfoLib PrintLib UefiBootServicesTableLib UefiDriverEntryPoint --=20 2.25.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#114425): https://edk2.groups.io/g/devel/message/114425 Mute This Topic: https://groups.io/mt/103955622/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sat May 11 15:44:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+114426+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+114426+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1706196140; cv=none; d=zohomail.com; s=zohoarc; b=GtrVZedL7l0tjDzsraf7wnpX+JuNULq4DIUKuSOB9lc/vZCglWWtdMZhNsjGrIhWVGidoL2zZX1gunoSkb/tHdfCzllcAf7yWOzQPtbbq+CMS+Ul9KP0eNC57sIi8q5QHQIGj7b4LuFLLiRWvsChmAkL3MCP3j63SvCBelpw6gI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1706196140; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=8ppFalnjeXIkbxWRVO5cHA+Pr2miWVxfCK3t+6RbEeI=; b=kuJV449PH56aREwlAHw0ATELm4+yjXdnVW3I572Ikq3+9P+T5gejj2nsDcLhxglC5yiGNUik8U7TA6c3MPLPocf9mnolw5PRRe6LPbsBs2UQ1OlBuuQkwde5YHvWaoFlDN7YAcPWwYUP0MzGlyv/bA+q2ga7y5djoP4g2JP3q9s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+114426+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1706196140823163.0050297745854; Thu, 25 Jan 2024 07:22:20 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=/XaCu2GOrZdUvm+WjYLR65J5mvin4yzRjIFFQUBw1d8=; 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:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1706196140; v=1; b=kpx1ox34H+vmc1ljXfDephM8CHNHg+mXPjt1Fep15YFG3qmdsBARnEIivQEUMfuXoDnnmZ5C ywuJ3yNdbhfZf6d62lOOMb3NMhOjVd2lovLJ7JyoerzSv01f4+lLHBicaOSe721tsQEHpiDFgw4 r1+EyPA2fqjkVT8hhmbne4ek= X-Received: by 127.0.0.2 with SMTP id l7ebYY1788612xgyGAjy3lK2; Thu, 25 Jan 2024 07:22:20 -0800 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.20416.1706196139848592575 for ; Thu, 25 Jan 2024 07:22:19 -0800 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 06C7D1FB; Thu, 25 Jan 2024 07:23:04 -0800 (PST) X-Received: from e126645.arm.com (unknown [10.57.47.22]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 6C5A03F5A1; Thu, 25 Jan 2024 07:22:18 -0800 (PST) From: "PierreGondois" To: devel@edk2.groups.io Cc: Sami Mujawar , Thomas Abraham , Pierre Gondois Subject: [edk2-devel] [PATCH v5 4/4] Platform/ARM: Juno: Use Pcd for _CPC generation Date: Thu, 25 Jan 2024 16:21:43 +0100 Message-Id: <20240125152143.624231-5-Pierre.Gondois@arm.com> In-Reply-To: <20240125152143.624231-1-Pierre.Gondois@arm.com> References: <20240125152143.624231-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 Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: bX1YAKPb9jkViuxVWMam4olDx1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1706196141332100015 Content-Type: text/plain; charset="utf-8" From: Pierre Gondois Make use of the newly added PcdDevelopmentPlatformRelaxations to decide to try generating _CPC information. Signed-off-by: Pierre Gondois --- Platform/ARM/JunoPkg/ArmJuno.dsc | 5 +++++ .../ConfigurationManagerDxe/ConfigurationManager.c | 11 ++++++++++- .../ConfigurationManagerDxe.inf | 2 ++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/Platform/ARM/JunoPkg/ArmJuno.dsc b/Platform/ARM/JunoPkg/ArmJun= o.dsc index 1ea0aba2655f..76f85e4c0c04 100644 --- a/Platform/ARM/JunoPkg/ArmJuno.dsc +++ b/Platform/ARM/JunoPkg/ArmJuno.dsc @@ -202,6 +202,11 @@ [PcdsFixedAtBuild.common] # ACPI Table Version # gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiExposedTableVersions|0x20 + # + # Allow some relaxation on some specific points for the platforms that d= esire it. + # BIT0: Allow the absence of some registers in the _CPC object. + # + gEdkiiDynamicTablesPkgTokenSpaceGuid.PcdDevelopmentPlatformRelaxations|0= x0 =20 [PcdsPatchableInModule] # Console Resolution (Full HD) diff --git a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManager= Dxe/ConfigurationManager.c b/Platform/ARM/JunoPkg/ConfigurationManager/Conf= igurationManagerDxe/ConfigurationManager.c index d92a08749e87..875263f138ab 100644 --- a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/Con= figurationManager.c +++ b/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/Con= figurationManager.c @@ -1089,9 +1089,18 @@ InitializePlatformRepository ( DEBUG ((DEBUG_INFO, "Juno Rev =3D 0x%x\n", PlatformRepo->JunoRevision)); =20 /// + /// 1. /// _CPC was only tested on Juno R2, so only enable support for this ver= sion. /// - if ((ArmJunoPlatformRepositoryInfo.JunoRevision =3D=3D JUNO_REVISION_R2)= ) { + /// 2. + /// Some _CPC registers cannot be populated for the Juno: + /// - PerformanceLimitedRegister + /// - ReferencePerformanceCounterRegister + /// - DeliveredPerformanceCounterRegister + /// Only build _CPC objects if relaxation regarding these registers + /// is allowed. + if ((ArmJunoPlatformRepositoryInfo.JunoRevision =3D=3D JUNO_REVISION_R2)= && + (PcdGet64(PcdDevelopmentPlatformRelaxations) & BIT0)) { PopulateCpcObjects (); } =20 diff --git a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManager= Dxe/ConfigurationManagerDxe.inf b/Platform/ARM/JunoPkg/ConfigurationManager= /ConfigurationManagerDxe/ConfigurationManagerDxe.inf index 53060bf56531..dea475375688 100644 --- a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/Con= figurationManagerDxe.inf +++ b/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/Con= figurationManagerDxe.inf @@ -77,6 +77,8 @@ [FixedPcd] gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate =20 + gEdkiiDynamicTablesPkgTokenSpaceGuid.PcdDevelopmentPlatformRelaxations + [Pcd] =20 [Depex] --=20 2.25.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#114426): https://edk2.groups.io/g/devel/message/114426 Mute This Topic: https://groups.io/mt/103955623/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-