On AARCH64, there is no requirement to support OSes that can only access
ACPI tables in low memory (i.e., below 4 GB), and there are reasons to
prefer allocations higher up. First of all, since DMA capable devices may
only be able to access 32-bit addressable memory, we may prefer to reserve
low memory for DMA buffers. Additionally, keeping memory reservations close
together makes it easier for the OS to map system RAM efficiently (with as
few levels of translation as possible)

So introduce a PCD that specifies which ACPI versions should be supported,
and omit 32-bit only tables and allocations below 4 GB if the PCD indicates
that we only target ACPI 2.0 or higher (#1). Set the PCD for ArmVirtQemu (#2)

Changes since v4:
- don't change the handling of the FACS table, it is loaded in low memory for
  other reasons than the address size of the ACPI table entries, and does not
  exist on arm64 anyway.
- drop BdsDxe patch for now, more discussion is needed
- implement review feedback from Star

Ard Biesheuvel (2):
  MdeModulePkg: AcpiTableDxe: make 4 GB table allocation limit optional
  ArmVirtPkg/ArmVirtQemu: limit ACPI support to v5.0 and higher

 ArmVirtPkg/ArmVirtQemu.dsc                                   |   4 +
 MdeModulePkg/MdeModulePkg.dec                                |  11 +
 MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiSdt.c           |   3 +-
 MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf    |   3 +
 MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c | 441 
++++++++++++--------
 5 files changed, 278 insertions(+), 184 deletions(-)

-- 
2.5.0

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to