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 CB513941524 for ; Thu, 26 Oct 2023 11:06:01 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=B+Rxn+YHTG29XcpOc6hWv76ad/vEIiKRNgXF9yAd0u4=; c=relaxed/simple; d=groups.io; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Disposition; s=20140610; t=1698318360; v=1; b=s5eYqYS088r0Hqe1tDEq/o7NcsRujk1CDAULMlY85j8i4EOM1p5JC5Uc/0WwnqKzwwyWybVp 1Fyjv0x1lsDyIm1dRo22ysse/rUA4IcbP/4A8spzF5p6d237te31JydzqOOBR4M+V0uIwMEbih6 bFzhO5FoN7cYJmuzvT6GSX3k= X-Received: by 127.0.0.2 with SMTP id uAM4YY7687511xnfhB2xa4H2; Thu, 26 Oct 2023 04:06:00 -0700 X-Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by mx.groups.io with SMTP id smtpd.web10.197509.1698318359808554503 for ; Thu, 26 Oct 2023 04:06:00 -0700 X-Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39Q7QIoP004282; Thu, 26 Oct 2023 11:05:50 GMT X-Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3tyfm9gw6j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 26 Oct 2023 11:05:50 +0000 X-Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 39QB5nSZ010254 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 26 Oct 2023 11:05:49 GMT X-Received: from qc-i7.hemma.eciton.net (10.80.80.8) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.39; Thu, 26 Oct 2023 04:05:47 -0700 Date: Thu, 26 Oct 2023 12:05:43 +0100 From: "Leif Lindholm" To: CC: , Sami Mujawar , Ard Biesheuvel , Michael D Kinney , Liming Gao Subject: Re: [edk2-devel] [PATCH v2 11/11] DynamicTablesPkg: Remove check for _CPC field Message-ID: References: <20231025112540.1654844-1-pierre.gondois@arm.com> <20231025112540.1654844-12-pierre.gondois@arm.com> MIME-Version: 1.0 In-Reply-To: <20231025112540.1654844-12-pierre.gondois@arm.com> X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-ORIG-GUID: ENXZQJkgTN89YAGQbYECFFJSsTj1bODg X-Proofpoint-GUID: ENXZQJkgTN89YAGQbYECFFJSsTj1bODg 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,quic_llindhol@quicinc.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: QDFAyk1M4CtrbrVTfONkjieVx7686176AA= Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=s5eYqYS0; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=quicinc.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 On Wed, Oct 25, 2023 at 13:25:40 +0200, pierre.gondois@arm.com wrote: > From: Pierre Gondois > > When generating _CPC objects, some fields are mandatory. Mandatory by spec or mandatory by current API? If the former, could we either warn or add a Pcd to enable the more lenient behaviour? / Leif > 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; > } > > + // 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 == 0)) || > (IsNullGenericAddress (&CpcInfo->NominalPerformanceBuffer) && > @@ -3539,13 +3544,19 @@ AmlCreateCpcNode ( > (CpcInfo->LowestNonlinearPerformanceInteger == 0)) || > (IsNullGenericAddress (&CpcInfo->LowestPerformanceBuffer) && > (CpcInfo->LowestPerformanceInteger == 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 == 0)) || > + (IsNullGenericAddress (&CpcInfo->NominalPerformanceBuffer) && > + (CpcInfo->NominalPerformanceInteger == 0))) > + { > + DEBUG (( > + DEBUG_WARN, > + "Missing Reference|Delivered performance field in _CPC object\n" > + )); > } > > CpcPackage = NULL; > -- > 2.25.1 > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#110092): https://edk2.groups.io/g/devel/message/110092 Mute This Topic: https://groups.io/mt/102175822/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-