SMBIOS: Allow skipping default SMBIOS generation

Hardware / Coreboot - Angel Pons [gmail.com] - 13 September 2021 13:54 UTC

The call to the `get_smbios_data` device operation is followed by calls to unconditional default functions, which lacks flexibility. Instead, have devices that implement `get_smbios_data` call these default functions as needed.

Most `get_smbios_data` implementations are in mainboard code, and are bound to the root device. The default functions only operate with PCI devices because of the `dev->path.type != DEVICE_PATH_PCI` checks, so calling these functions for non-PCI devices is unnecessary. QEMU also implements `get_smbios_data` but binds it to the domain device, which isn't PCI either.

Change-Id: Iefbf072b1203d04a98c9d26a30f22cfebe769eb4

6a73b2466f SMBIOS: Allow skipping default SMBIOS generation
src/arch/x86/smbios.c | 14 ++++++++++++--
src/drivers/ipmi/ipmi_kcs_ops.c | 2 ++
src/drivers/wifi/generic/smbios.c | 10 ++++++----
src/include/smbios.h | 3 +++
4 files changed, 23 insertions(+), 6 deletions(-)

Upstream: review.coreboot.org


  • Share