[PATCH v2 0/2] smbios: copy QEMU tables

Heinrich Schuchardt xypron.glpk at gmx.de
Sat Dec 23 02:03:32 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.

A test via a new SMBIOS command is supplied in

[PATCH 0/5] cmd: provide command to display SMBIOS information
https://lore.kernel.org/u-boot/20231223004429.247301-1-xypron.glpk@gmx.de/T/#t

v2:
	fix parsing of SMBIOS anchor
	enable copying on x86 and 32bit ARM/RISC-V

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

 arch/x86/lib/tables.c       |   2 +-
 drivers/misc/Kconfig        |   7 ++
 drivers/misc/Makefile       |   1 +
 drivers/misc/qfw_smbios.c   | 197 ++++++++++++++++++++++++++++++++++++
 include/smbios.h            |  26 +++++
 lib/efi_loader/efi_smbios.c |   4 +-
 6 files changed, 235 insertions(+), 2 deletions(-)
 create mode 100644 drivers/misc/qfw_smbios.c

--
2.43.0



More information about the U-Boot mailing list