summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorLee Leahy <leroy.p.leahy@intel.com>2015-02-26 14:33:18 -0800
committerPatrick Georgi <pgeorgi@google.com>2015-04-21 08:16:29 +0200
commitdbdd0661a599b4da53129bb3ed866a5fd3afce7c (patch)
tree4642c951393c9b38caf1f495187693588fe0efd2 /src/arch
parent54cc8badc99c2f8457868cb915522bd3386be612 (diff)
x86: Allow builds without ACPI tables
Fix build bug that is referencing vboot_data from vendorcode/google/chromeos/gnvs.c when CONFIG_HAVE_ACPI_TABLES is not set. BRANCH=none BUG=None TEST=Build and run on Glados 1. Checkout updated patches for config, skylake and glados through FspNotify1 2. Verify that mainboard/intel/glados/Kconfig does not select HAVE_ACPI_TABLES 3. emerge-glados coreboot 4. Test passes if build completes successfully Change-Id: Ida5ab8b8dafe30b11dc80dab935e3223d4c760d3 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 1908079360aa065a36956d487eb93142e9c012a1 Original-Change-Id: Icac3845f7e2d1ddffa5f787a640033fba286c13e Original-Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com> Original-Reviewed-on: https://chromium-review.googlesource.com/254360 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Original-Commit-Queue: Leroy P Leahy <leroy.p.leahy@intel.com> Original-Tested-by: Leroy P Leahy <leroy.p.leahy@intel.com> Reviewed-on: http://review.coreboot.org/9825 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/x86/boot/smbios.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/arch/x86/boot/smbios.c b/src/arch/x86/boot/smbios.c
index 8b4fd68db3..0ba793f398 100644
--- a/src/arch/x86/boot/smbios.c
+++ b/src/arch/x86/boot/smbios.c
@@ -251,11 +251,16 @@ static int smbios_write_type0(unsigned long *current, int handle)
#define SPACES \
" "
t->bios_release_date = smbios_add_string(t->eos, coreboot_dmi_date);
+#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES)
u32 version_offset = (u32)smbios_string_table_len(t->eos);
+#endif
t->bios_version = smbios_add_string(t->eos, SPACES);
+
+#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES)
/* SMBIOS offsets start at 1 rather than 0 */
vboot_data->vbt10 = (u32)t->eos + (version_offset - 1);
#endif
+#endif /* CONFIG_CHROMEOS */
t->bios_rom_size = (CONFIG_ROM_SIZE / 65535) - 1;