[PATCH 0/2] smbios: copy QEMU tables

Heinrich Schuchardt heinrich.schuchardt at canonical.com
Thu Dec 21 11:50:15 CET 2023


QEMU provides SMBIOS tables with detailed information. We should not try to
replicate them in U-Boot.

With this series we add code to copy the QEMU generated SMBIOS tables to
RAM. efi_smbios_register() later installs the SMBIOS table as EFI
configuration table for the OS to pick it up.

If we want to inform about U-Boot, we can add a Firmware Inventory
Information (type 45) table in future.

With 32bit ARM I did not see a correct SMBIOS table being transferred. We
need to check if our code in qfw_read_entry() is 32bit compliant.

For providing SMBIOS support in QEMU for RISC-V I have sent a patch
upstream:

[PATCH 1/1] target/riscv: SMBIOS support for RISC-V virt machine
https://lore.kernel.org/qemu-riscv/9183a3fb-b9f7-470c-b9a6-8d8cc6dce7c3@canonical.com/T/#t

Currently we have a predefined constant TABLE_SIZE = SZ_4K in
lib/efi_loader/efi_smbios.c. We should strive to refactor the code in
future to provide the length of the SMBIOS tables in global data. But
that is beyond the scope of this series.

Further we should find a matainer for drivers/misc/qfw*. It would be
plausible to add it to 'ACPI' maintenance.

Heinrich Schuchardt (2):
  smbios: SMBIOS 3.0 (64-bit) Entry Point structure
  smbios: copy QEMU tables

 drivers/misc/Kconfig        |   8 ++
 drivers/misc/Makefile       |   1 +
 drivers/misc/qfw_smbios.c   | 195 ++++++++++++++++++++++++++++++++++++
 include/smbios.h            |  26 +++++
 lib/efi_loader/efi_smbios.c |   4 +-
 5 files changed, 233 insertions(+), 1 deletion(-)
 create mode 100644 drivers/misc/qfw_smbios.c

-- 
2.40.1



More information about the U-Boot mailing list