diff options
author | Pierre Gondois <pierre.gondois@arm.com> | 2022-10-10 11:20:56 +0200 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2022-10-31 12:32:32 +0000 |
commit | 1729fb8a824c2c63a98e50793810579712113aca (patch) | |
tree | 9d64968b8ef9d60075dc451314a2ffd87b9b3808 | |
parent | 8405b1480f9a60e14343fa6c006adb546fc6c7a2 (diff) | |
download | edk2-1729fb8a824c2c63a98e50793810579712113aca.zip edk2-1729fb8a824c2c63a98e50793810579712113aca.tar.gz edk2-1729fb8a824c2c63a98e50793810579712113aca.tar.bz2 |
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>
-rw-r--r-- | DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceDataCodeGen.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceDataCodeGen.c b/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceDataCodeGen.c index 332962b..4ca63cc 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. 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)))
{
ASSERT (0);
|