DynamicTablesPkg/AmlLib: Allow larger AccessSize for Pcc address space

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>
This commit is contained in:
Pierre Gondois 2022-10-10 11:20:56 +02:00 committed by mergify[bot]
parent 8405b1480f
commit 1729fb8a82
1 changed files with 6 additions and 1 deletions

View File

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