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 C576374003C for ; Thu, 25 Jan 2024 15:22:21 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=2AFOAVxaPUvZU73qsfApNJOxTBwqt2ThPV8VWpY/MB8=; 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=DxI4OcpbdVBEkGDGEfyrhM4U2ylIe7LudVOZvE+s9h3Ad4Eys86MNrkSEM4W9lMg1bsG3pyJ 8HeQR17okd5kttoAa/QPiL8MTobd4b60IrfSqIEMGhh3T1b4HZGHmphk9k/t+9b0U60oHQD2jYh 0rxrAQxD+/RuNfl3xXMIMTnM= X-Received: by 127.0.0.2 with SMTP id UMrtYY7687511x7jom3Lyg85; 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: FCPo3lH5iTaFswaDfu6zMFFvx7686176AA= Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=DxI4Ocpb; 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: 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/ArmJ= uno.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= desire it. + # BIT0: Allow the absence of some registers in the _CPC object. + # + gEdkiiDynamicTablesPkgTokenSpaceGuid.PcdDevelopmentPlatformRelaxations= |0x0 =20 [PcdsPatchableInModule] # Console Resolution (Full HD) diff --git a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManag= erDxe/ConfigurationManager.c b/Platform/ARM/JunoPkg/ConfigurationManager/= ConfigurationManagerDxe/ConfigurationManager.c index d92a08749e87..875263f138ab 100644 --- a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/C= onfigurationManager.c +++ b/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/C= onfigurationManager.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 v= ersion. /// - if ((ArmJunoPlatformRepositoryInfo.JunoRevision =3D=3D JUNO_REVISION_R= 2)) { + /// 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_R= 2) && + (PcdGet64(PcdDevelopmentPlatformRelaxations) & BIT0)) { PopulateCpcObjects (); } =20 diff --git a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManag= erDxe/ConfigurationManagerDxe.inf b/Platform/ARM/JunoPkg/ConfigurationMan= ager/ConfigurationManagerDxe/ConfigurationManagerDxe.inf index 53060bf56531..dea475375688 100644 --- a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/C= onfigurationManagerDxe.inf +++ b/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/C= onfigurationManagerDxe.inf @@ -77,6 +77,8 @@ [FixedPcd] gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate =20 + gEdkiiDynamicTablesPkgTokenSpaceGuid.PcdDevelopmentPlatformRelaxations + [Pcd] =20 [Depex] --=20 2.25.1 -=-=-=-=-=-=-=-=-=-=-=- 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/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-