The legacy 32-bit SMBIOS entry point has little use on AARCH64 systems, since many such systems have no 32-bit addressable physical RAM, and so OSes that implement SMBIOS will have to be able to deal with the 64-bit entry point anyway. So don't expose the 32-bit entry point at all, and save some memory below 4 GB.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <[email protected]> --- Note to Laszlo: For some background, this is not just about saving a couple of KB of memory, it is about a) saving memory below 4 GB for 32-bit DMA, this is not currently an issue under virt but it may be with direct device assignment and no IOMMU, but in the general case, this is one reason we should standardize on the 64-bit versions of these structures b) the OS will map main memory in 1 GB chunks if it can, and punching a 1 page hole (e.g., for SMBIOS data) into it will result in the whole page being mapped using 2 MB and 4 KB blocks instead, and under virt, each *level* of lookup at stage 1 (the guest virtual page table) will result in a full page table walk at level 2 (the guest PA to host PA mapping), so being able to map RAM as efficiently as possible is important. ArmVirtPkg/ArmVirtQemu.dsc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc index 7c6419fbb92f..5a77cb239076 100644 --- a/ArmVirtPkg/ArmVirtQemu.dsc +++ b/ArmVirtPkg/ArmVirtQemu.dsc @@ -224,6 +224,14 @@ [PcdsDynamicDefault.common] gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosDocRev|0x0 gUefiOvmfPkgTokenSpaceGuid.PcdQemuSmbiosValidated|FALSE +[PcdsFixedAtBuild.AARCH64] + # QEMU/mach-virt provides at least version 3.0 SMBIOS entry point and tables, + # and AARCH64 OSes cannot assume the presence of the 32-bit entry point + # anyway (because many AARCH64 systems don't have 32-bit addressable physical + # RAM). Since the additional allocations below 4 GB needlessly fragment the + # memory map, expose the 64-bit entry point only. + gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosEntryPointProvideMethod|2 + ################################################################################ # # Components Section - list of all EDK II Modules needed by this Platform -- 2.5.0 _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

