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 E39AA74003E for ; Wed, 25 Oct 2023 11:26:07 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=UXJsBauDrWjCcCwHGchBOY9F7Jc/x1+QfmvYT/8OkKo=; 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=1698233166; v=1; b=q+ZI4BDqEM9tvcPEgjIQcIDoO0YcacZbTeDDXkssMkqBIAn4wGDQKVoM4j7EAQN/HWgcc87Z RG+9PqRtULAlth1AB/C7JVIEXnAriiH906/E/YTc/MxiIxPmjgxCKcuLi8u3+3BUdMmIxea3aKm d+amKquAaiR1wb3BZAhn2ai8= X-Received: by 127.0.0.2 with SMTP id wJv4YY7687511xyCFZi5MYmI; Wed, 25 Oct 2023 04:26:06 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.170930.1698233166060262654 for ; Wed, 25 Oct 2023 04:26:06 -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 4DDAD2F4; Wed, 25 Oct 2023 04:26:47 -0700 (PDT) X-Received: from cam-smtp0.cambridge.arm.com (e126645.nice.arm.com [10.34.100.114]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id CA6573F738; Wed, 25 Oct 2023 04:26:04 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io Cc: Sami Mujawar , Leif Lindholm , Ard Biesheuvel , Michael D Kinney , Liming Gao Subject: [edk2-devel] [PATCH v2 11/11] DynamicTablesPkg: Remove check for _CPC field Date: Wed, 25 Oct 2023 13:25:40 +0200 Message-Id: <20231025112540.1654844-12-pierre.gondois@arm.com> In-Reply-To: <20231025112540.1654844-1-pierre.gondois@arm.com> References: <20231025112540.1654844-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: nHJpY8oVO5us44a1EgSLRNohx7686176AA= 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=q+ZI4BDq; 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 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 f350083b148c..423e64f12606 100644 --- a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c +++ b/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c @@ -3531,6 +3531,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) && @@ -3539,13 +3544,19 @@ AmlCreateCpcNode ( (CpcInfo->LowestNonlinearPerformanceInteger =3D=3D 0)) || (IsNullGenericAddress (&CpcInfo->LowestPerformanceBuffer) && (CpcInfo->LowestPerformanceInteger =3D=3D 0)) || - IsNullGenericAddress (&CpcInfo->DesiredPerformanceRegister) || - IsNullGenericAddress (&CpcInfo->ReferencePerformanceCounterRegiste= r) || - IsNullGenericAddress (&CpcInfo->DeliveredPerformanceCounterRegiste= r) || - 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 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#110047): https://edk2.groups.io/g/devel/message/110047 Mute This Topic: https://groups.io/mt/102175822/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-