From dbdd0661a599b4da53129bb3ed866a5fd3afce7c Mon Sep 17 00:00:00 2001 From: Lee Leahy Date: Thu, 26 Feb 2015 14:33:18 -0800 Subject: 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 Original-Commit-Id: 1908079360aa065a36956d487eb93142e9c012a1 Original-Change-Id: Icac3845f7e2d1ddffa5f787a640033fba286c13e Original-Signed-off-by: Lee Leahy Original-Reviewed-on: https://chromium-review.googlesource.com/254360 Original-Reviewed-by: Aaron Durbin Original-Commit-Queue: Leroy P Leahy Original-Tested-by: Leroy P Leahy Reviewed-on: http://review.coreboot.org/9825 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/arch/x86/boot/smbios.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') 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; -- cgit v1.2.3