From dd63418f81771b8686f8a14faff10fb8a593b6d2 Mon Sep 17 00:00:00 2001 From: Alper Nebi Yasak Date: Tue, 6 Feb 2024 23:09:33 +0300 Subject: mb/qemu/fw_cfg: Fix build when not generating SMBIOS tables Parts of the QEMU firmware configuration device driver refers to SMBIOS related kconfig values. These depend on GENERATE_SMBIOS_TABLES and are undefined if it isn't enabled, causing a build error. Cover the SMBIOS-related region in this driver with an #if directive checking the necessary config option. This is mostly to help port the driver to non-x86 architectures where support for generating SMBIOS tables isn't there yet. Change-Id: I3ff388d4574eb52686a5dda3dcbc3d64a7ce6f7b Signed-off-by: Alper Nebi Yasak Reviewed-on: https://review.coreboot.org/c/coreboot/+/80366 Reviewed-by: Martin L Roth Reviewed-by: Nico Huber Tested-by: build bot (Jenkins) --- src/mainboard/emulation/qemu-i440fx/fw_cfg.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mainboard/emulation/qemu-i440fx') diff --git a/src/mainboard/emulation/qemu-i440fx/fw_cfg.c b/src/mainboard/emulation/qemu-i440fx/fw_cfg.c index 5c23988ba6..0f217ccca0 100644 --- a/src/mainboard/emulation/qemu-i440fx/fw_cfg.c +++ b/src/mainboard/emulation/qemu-i440fx/fw_cfg.c @@ -341,6 +341,7 @@ err: /* ---------------------------------------------------------------------- */ /* pick up smbios information from fw_cfg */ +#if CONFIG(GENERATE_SMBIOS_TABLES) static const char *type1_manufacturer; static const char *type1_product_name; static const char *type1_version; @@ -504,6 +505,7 @@ void smbios_system_set_uuid(u8 *uuid) fw_cfg_smbios_init(); memcpy(uuid, type1_uuid, 16); } +#endif /* CONFIG(GENERATE_SMBIOS_TABLES) */ /* * Configure DMA setup -- cgit v1.2.3