Paul Menzel (paulepanter@users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3274
-gerrit
commit ae3e0ecfd32ff75a4cadb5f8f7b3adae32f7324f Author: Denis 'GNUtoo' Carikli GNUtoo@no-log.org Date: Sun Apr 21 19:32:02 2013 +0200
Lenovo X60: permit to compile the x60 code without SMM.
Removing or commenting `HAVE_SMI_HANDLER` from the Kconfig file – by default .config –, results in the following build error.
CC cbfs/fallback/coreboot_ram.debug build/generated/coreboot_ram.o: In function `i82801gx_lock_smm': src/southbridge/intel/i82801gx/lpc.c:350: undefined reference to `smm_lock' build/generated/coreboot_ram.o: In function `write_acpi_tables': src/mainboard/lenovo/x60/acpi_tables.c:231: undefined reference to `smm_setup_structures' build/generated/coreboot_ram.o: In function `initialize_cpus': src/cpu/x86/lapic/lapic_cpu_init.c:562: undefined reference to `smm_init' build/generated/coreboot_ram.o: In function `acpi_resume': src/arch/x86/boot/acpi.c:633: undefined reference to `smm_setup_structures' collect2: error: ld returned 1 exit status
Adding the following guards
#if CONFIG_HAVE_SMI_HANDLER […] #endif
at the appropriate places, results in a successful build.
Change-Id: I33088e89030b5ef55fd83c188beedd76f07d86cb Signed-off-by: Denis 'GNUtoo' Carikli GNUtoo@no-log.org --- src/mainboard/lenovo/x60/acpi_tables.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/mainboard/lenovo/x60/acpi_tables.c b/src/mainboard/lenovo/x60/acpi_tables.c index f6ed4ae..82d6a18 100644 --- a/src/mainboard/lenovo/x60/acpi_tables.c +++ b/src/mainboard/lenovo/x60/acpi_tables.c @@ -35,6 +35,7 @@ extern const unsigned char AmlCode[]; unsigned long acpi_create_slic(unsigned long current); #endif
+#if CONFIG_HAVE_SMI_HANDLER #include "southbridge/intel/i82801gx/nvs.h" static void acpi_create_gnvs(global_nvs_t *gnvs) { @@ -54,6 +55,7 @@ static void acpi_create_gnvs(global_nvs_t *gnvs) gnvs->did[3] = 0x80000410; gnvs->did[4] = 0x00000005; } +#endif
unsigned long acpi_fill_madt(unsigned long current) { @@ -107,7 +109,9 @@ void smm_setup_structures(void *gnvs, void *tcg, void *smi1); unsigned long write_acpi_tables(unsigned long start) { unsigned long current; +#if CONFIG_HAVE_SMI_HANDLER int i; +#endif acpi_rsdp_t *rsdp; acpi_rsdt_t *rsdt; acpi_xsdt_t *xsdt; @@ -121,8 +125,9 @@ unsigned long write_acpi_tables(unsigned long start) #endif acpi_header_t *ssdt; acpi_header_t *dsdt; +#if CONFIG_HAVE_SMI_HANDLER void *gnvs; - +#endif current = start;
/* Align ACPI tables to 16byte */ @@ -185,7 +190,7 @@ unsigned long write_acpi_tables(unsigned long start) memcpy(dsdt, &AmlCode, sizeof(acpi_header_t)); current += dsdt->length; memcpy(dsdt, &AmlCode, dsdt->length); - +#if CONFIG_HAVE_SMI_HANDLER /* Fix up global NVS region for SMI handler. The GNVS region lives * in the (high) table area. The low memory map looks like this: * @@ -237,6 +242,8 @@ unsigned long write_acpi_tables(unsigned long start) printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n", dsdt, dsdt->length);
+#endif + #if CONFIG_HAVE_ACPI_SLIC printk(BIOS_DEBUG, "ACPI: * SLIC\n"); slic = (acpi_header_t *)current;