]> git.proxmox.com Git - mirror_edk2.git/commitdiff
DynamicTablesPkg/AmlLib: Allow larger AccessSize for Pcc address space
authorPierre Gondois <pierre.gondois@arm.com>
Mon, 10 Oct 2022 09:20:56 +0000 (11:20 +0200)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Mon, 31 Oct 2022 12:32:32 +0000 (12:32 +0000)
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 <Pierre.Gondois@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceDataCodeGen.c

index 332962bed441ee03f1f31cef4e07b7d189d71ce9..4ca63ccd2396ec303f8702c7af4e62a57ba555bc 100644 (file)
@@ -1257,7 +1257,12 @@ AmlCodeGenRdRegister (
   AML_DATA_NODE                         *RdNode;\r
   EFI_ACPI_GENERIC_REGISTER_DESCRIPTOR  RdRegister;\r
 \r
-  if ((AccessSize > EFI_ACPI_6_4_QWORD)  ||\r
+  // Cf. ACPI 6.4, s14.7 Referencing the PCC address space\r
+  // The AccessSize represents the Subspace Id for the PCC address space.\r
+  if (((AddressSpace == EFI_ACPI_6_4_PLATFORM_COMMUNICATION_CHANNEL) &&\r
+       (AccessSize > 256)) ||\r
+      ((AddressSpace != EFI_ACPI_6_4_PLATFORM_COMMUNICATION_CHANNEL) &&\r
+       (AccessSize > EFI_ACPI_6_4_QWORD)) ||\r
       ((NameOpNode == NULL) && (NewRdNode == NULL)))\r
   {\r
     ASSERT (0);\r