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. 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 inhibits the generation of ACPI tables that require them to be allocated in memory below 4 GB, and wire it up to the allocation of performance data memory as well. (#1) Secondly, introduce a PCD under IntelFrameworkModulePkg that controls the behavior regarding allocations performed in DXE that need to be accessible from PEI, and hence may need to be in the lowest 4 GB of memory. (#2) Finally, set the PCDs for ArmVirt[Qemu]. (#3 and #4) Changes since v2: - folded suggestion and added R-b from Jiewen (#1) - update patch #2 to use a dedicated PCD rather than reusing the ACPI table version on - move setting of first PCD to AARCH64 specific section - added patch to set the second PCD for ArmVirt.dsc.inc Ard Biesheuvel (4): MdeModulePkg: AcpiTableDxe: make 4 GB table allocation limit optional IntelFrameworkModulePkg: BdsDxe: only allocate below 4 GB if needed ArmVirtPkg/ArmVirtQemu: limit ACPI support to v5.0 and higher ArmVirtPkg/ArmVirt.dsc.inc: lift 4 GB limit for PEI accessible memory ArmVirtPkg/ArmVirt.dsc.inc | 2 + ArmVirtPkg/ArmVirtQemu.dsc | 4 + IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec | 6 + IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf | 7 +- IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c | 13 +- MdeModulePkg/MdeModulePkg.dec | 11 + MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiSdt.c | 3 +- MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf | 2 + MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c | 448 ++++++++++++-------- 9 files changed, 304 insertions(+), 192 deletions(-) -- 2.5.0 _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

