summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlper Nebi Yasak <alpernebiyasak@gmail.com>2024-02-06 23:09:33 +0300
committerMatt DeVillier <matt.devillier@gmail.com>2024-02-27 20:21:54 +0000
commitdd63418f81771b8686f8a14faff10fb8a593b6d2 (patch)
tree53e563ead070007a1ffad8d9cbdc90fab611a9af /src
parentafc20515541406ff7b98a51658483568754099d2 (diff)
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 <alpernebiyasak@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/80366 Reviewed-by: Martin L Roth <gaumless@gmail.com> Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/emulation/qemu-i440fx/fw_cfg.c2
1 files changed, 2 insertions, 0 deletions
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