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.4409.1665393690064650152 for ; Mon, 10 Oct 2022 02:21:30 -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 090881AED; Mon, 10 Oct 2022 02:21:36 -0700 (PDT) Received: from pierre123.arm.com (unknown [10.57.34.234]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 166DA3F792; Mon, 10 Oct 2022 02:21:28 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io Cc: Sami Mujawar , Alexei Fedorov Subject: [PATCH 12/14] DynamicTablesPkg/AmlLib: Allow larger AccessSize for Pcc address space Date: Mon, 10 Oct 2022 11:20:56 +0200 Message-Id: <20221010092058.118714-13-Pierre.Gondois@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221010092058.118714-1-Pierre.Gondois@arm.com> References: <20221010092058.118714-1-Pierre.Gondois@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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/AmlResourceDa= taCodeGen.c b/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceD= ataCodeGen.c index 332962bed441..3901b6e47333 100644 --- a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceDataCodeG= en.c +++ b/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceDataCodeG= en.c @@ -1257,7 +1257,12 @@ AmlCodeGenRdRegister ( AML_DATA_NODE *RdNode; EFI_ACPI_GENERIC_REGISTER_DESCRIPTOR RdRegister; =20 - if ((AccessSize > EFI_ACPI_6_4_QWORD) || + // Cf Cf. ACPI 6.4, s14.7 Referencing the PCC address space + // The AccessSize represents the Subspace Id for the PCC address space= . + if (((AddressSpace =3D=3D EFI_ACPI_6_3_PLATFORM_COMMUNICATION_CHANNEL)= && + (AccessSize > 256)) || + ((AddressSpace !=3D EFI_ACPI_6_3_PLATFORM_COMMUNICATION_CHANNEL) &= & + (AccessSize > EFI_ACPI_6_4_QWORD)) || ((NameOpNode =3D=3D NULL) && (NewRdNode =3D=3D NULL))) { ASSERT (0); --=20 2.25.1