From nobody Mon Sep 16 19:25:49 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-