From nobody Tue Feb 10 19:49:39 2026 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+104126+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+104126+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1683292671; cv=none; d=zohomail.com; s=zohoarc; b=YbkNi5UVJmYpjxsWyyYBtXkZnXzDGAGT2RUBsTd4DYA4dL0Y62Yr/N037uY0MGvs2rNENh6ftm+WTLOE09x1tmwQTbHthEMORVxFupmJmxO8qbSMWj964OJbMdWqloWZbKodOmnuvVExJh/ztFSPzeNX9XtSoy6R5xpeiUH0ufI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1683292671; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=PMD4RQ4x/tWulWlSMpREJSDqMVumSvlrainpki3cF5U=; b=DU375skjAYTBQ63b6ncofPis6+Khyx4oPYCkNaovj2KtEM91ZIV61cAqaw5AiSXmXBGtLc+TcFOnNHSZycot66FG6Yuyt6oAGcYy+aAUmc9PjFm+rxJ0kONh8+Hl8Z7L0CBpH2gOVVA4c25MEFhHPbo+hf2T8PvqjXN+sZcNqr4= 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+104126+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 1683292671531840.7480722288659; Fri, 5 May 2023 06:17:51 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id VwhsYY1788612xyappP8VqjI; Fri, 05 May 2023 06:17:51 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.26933.1683292670376578457 for ; Fri, 05 May 2023 06:17:50 -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 6B1141FB; Fri, 5 May 2023 06:18:34 -0700 (PDT) X-Received: from e126645.arm.com (e126645.nice.arm.com [10.34.100.110]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id EED273F64C; Fri, 5 May 2023 06:17:48 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Leif Lindholm , Sami Mujawar , Michael D Kinney , Liming Gao , Zhiguang Liu Subject: [edk2-devel] [PATCH v1 11/11] DynamicTablesPkg: Remove check for _CPC field Date: Fri, 5 May 2023 15:17:21 +0200 Message-Id: <20230505131721.1310590-12-pierre.gondois@arm.com> In-Reply-To: <20230505131721.1310590-1-pierre.gondois@arm.com> References: <20230505131721.1310590-1-pierre.gondois@arm.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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 X-Gm-Message-State: vnz2pOXTk0esh5iVzYBrsicfx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1683292671; bh=cfDRLapn45bURQ0Ceyoba9ndjpHNlV9F6oTWKiKGKNA=; h=Cc:Date:From:Reply-To:Subject:To; b=TJOLX+j3tOP9q4tGbsWpPAJNfv5YMwji8Eg17FYgWgtHgEzlLgdS6entkw3eOWqV0Fd gVgsmlc5wG74dXWyiUm/Ppx67eBjOLocz36fjJcW0aXWKWbUYiJvJYocZvW13vcZDu+me 3Ynd7jC2GI0VB1V/7eM0BM9aBFcdHtabQ84= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1683292673487100047 Content-Type: text/plain; charset="utf-8" From: Pierre Gondois When generating _CPC objects, some fields are mandatory. Some fields cannot be supported by a the Juno platform, which is used to test the _CPC generation. Therefore, don't prevent from generating _CPC objects if the fields below are missing, and let the OS handle the missing information. _CPC fields that are exempted from checks: - PerformanceLimitedRegister - ReferencePerformanceCounterRegister - DeliveredPerformanceCounterRegister Signed-off-by: Pierre Gondois --- .../Common/AmlLib/CodeGen/AmlCodeGen.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c b/= DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c index a82edab35647..c585784b095b 100644 --- a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c +++ b/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c @@ -3091,6 +3091,11 @@ AmlCreateCpcNode ( return EFI_INVALID_PARAMETER; } =20 + // The following fields are theoretically mandatory, but not supported + // by some platforms. Don't check them: + // - PerformanceLimitedRegister + // - ReferencePerformanceCounterRegister + // - DeliveredPerformanceCounterRegister if ((IsNullGenericAddress (&CpcInfo->HighestPerformanceBuffer) && (CpcInfo->HighestPerformanceInteger =3D=3D 0)) || (IsNullGenericAddress (&CpcInfo->NominalPerformanceBuffer) && @@ -3099,13 +3104,19 @@ AmlCreateCpcNode ( (CpcInfo->LowestNonlinearPerformanceInteger =3D=3D 0)) || (IsNullGenericAddress (&CpcInfo->LowestPerformanceBuffer) && (CpcInfo->LowestPerformanceInteger =3D=3D 0)) || - IsNullGenericAddress (&CpcInfo->DesiredPerformanceRegister) || - IsNullGenericAddress (&CpcInfo->ReferencePerformanceCounterRegister)= || - IsNullGenericAddress (&CpcInfo->DeliveredPerformanceCounterRegister)= || - IsNullGenericAddress (&CpcInfo->PerformanceLimitedRegister)) + IsNullGenericAddress (&CpcInfo->DesiredPerformanceRegister)) { ASSERT (0); return EFI_INVALID_PARAMETER; + } else if ((IsNullGenericAddress (&CpcInfo->HighestPerformanceBuffer) && + (CpcInfo->HighestPerformanceInteger =3D=3D 0)) || + (IsNullGenericAddress (&CpcInfo->NominalPerformanceBuffer) && + (CpcInfo->NominalPerformanceInteger =3D=3D 0))) + { + DEBUG (( + DEBUG_WARN, + "Missing Reference|Delivered performance field in _CPC object\n" + )); } =20 CpcPackage =3D NULL; --=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 (#104126): https://edk2.groups.io/g/devel/message/104126 Mute This Topic: https://groups.io/mt/98705066/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-