From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.4489.1666951454678573298 for ; Fri, 28 Oct 2022 03:04:14 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: pierre.gondois@arm.com) 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 AADD91FB; Fri, 28 Oct 2022 03:04:20 -0700 (PDT) Received: from [10.57.2.46] (unknown [10.57.2.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 774153F71A; Fri, 28 Oct 2022 03:04:13 -0700 (PDT) Message-ID: <20057f86-00bc-25c4-1862-cdedcd50051b@arm.com> Date: Fri, 28 Oct 2022 12:04:11 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH 12/14] DynamicTablesPkg/AmlLib: Allow larger AccessSize for Pcc address space To: Sami Mujawar , devel@edk2.groups.io Cc: Alexei Fedorov , "nd@arm.com" References: <20221010092058.118714-1-Pierre.Gondois@arm.com> <20221010092058.118714-13-Pierre.Gondois@arm.com> From: "PierreGondois" In-Reply-To: Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Sami, On 10/26/22 14:34, Sami Mujawar wrote: > Hi Pierre, > > There are some minor changes required marked inline as [SAMI]. > > If you agree, I will make the changes before merging. Yes indeed, thanks for spotting it and for making the modification, Regards, Pierre > > Regards, > > Sami Mujawar > > On 10/10/2022 10:20 am, Pierre.Gondois@arm.com wrote: >> From: Pierre Gondois >> >> For Pcc address space, the AccessSize field of a Register is >> used to delcare the Pcc Subspace Id. This Id can be up to 256. >> >> Cf. ACPI 6.4, s14.7 Referencing the PCC address space >> >> Signed-off-by: Pierre Gondois >> --- >> .../Library/Common/AmlLib/CodeGen/AmlResourceDataCodeGen.c | 7 ++++++- >> 1 file changed, 6 insertions(+), 1 deletion(-) >> >> diff --git a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceDataCodeGen.c b/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceDataCodeGen.c >> index 332962bed441..3901b6e47333 100644 >> --- a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceDataCodeGen.c >> +++ b/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceDataCodeGen.c >> @@ -1257,7 +1257,12 @@ AmlCodeGenRdRegister ( >> AML_DATA_NODE *RdNode; >> EFI_ACPI_GENERIC_REGISTER_DESCRIPTOR RdRegister; >> >> - if ((AccessSize > EFI_ACPI_6_4_QWORD) || >> + // Cf Cf. ACPI 6.4, s14.7 Referencing the PCC address space > [SAMI] Cf appears twice. >> + // The AccessSize represents the Subspace Id for the PCC address space. >> + if (((AddressSpace == EFI_ACPI_6_3_PLATFORM_COMMUNICATION_CHANNEL) && >> + (AccessSize > 256)) || >> + ((AddressSpace != EFI_ACPI_6_3_PLATFORM_COMMUNICATION_CHANNEL) && > [SAMI] Change EFI_ACPI_6_3_PLATFORM_COMMUNICATION_CHANNEL to > EFI_ACPI_6_4_PLATFORM_COMMUNICATION_CHANNEL. >> + (AccessSize > EFI_ACPI_6_4_QWORD)) || >> ((NameOpNode == NULL) && (NewRdNode == NULL))) >> { >> ASSERT (0);