Alper Nebi Yasak has uploaded this change for review.

View Change

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>
---
M src/mainboard/emulation/qemu-i440fx/fw_cfg.c
1 file changed, 2 insertions(+), 0 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/66/80366/1
diff --git a/src/mainboard/emulation/qemu-i440fx/fw_cfg.c b/src/mainboard/emulation/qemu-i440fx/fw_cfg.c
index 3a1def3..95f8968 100644
--- a/src/mainboard/emulation/qemu-i440fx/fw_cfg.c
+++ b/src/mainboard/emulation/qemu-i440fx/fw_cfg.c
@@ -344,6 +344,7 @@
/* ---------------------------------------------------------------------- */
/* 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;
@@ -507,6 +508,7 @@
fw_cfg_smbios_init();
memcpy(uuid, type1_uuid, 16);
}
+#endif /* CONFIG(GENERATE_SMBIOS_TABLES) */

/*
* Configure DMA setup

To view, visit change 80366. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I3ff388d4574eb52686a5dda3dcbc3d64a7ce6f7b
Gerrit-Change-Number: 80366
Gerrit-PatchSet: 1
Gerrit-Owner: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Gerrit-MessageType: newchange