diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2013-10-13 20:41:57 +0300 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2014-01-22 20:53:00 +0100 |
commit | a7c9611712efc04c0c73a8a8621eabd5c869af89 (patch) | |
tree | 6f6aa19a68b38f8ff37d7b38da981a57a4879020 /src/mainboard/getac/p470 | |
parent | 66fd775168a46e5f7ee0c121735d3be98bbcab1c (diff) |
intel/i945 boards: Add EARLY_CBMEM_INIT
Inspired by commits ac6ea04b and 4560ca50 that enabled this feature
for lenovo/x60 and lenovo/t60 with i945 chipset.
Change-Id: Ia04f58b8c3769b5734708c6a338bb80c13c5aeba
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/3994
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@gmail.com>
Diffstat (limited to 'src/mainboard/getac/p470')
-rw-r--r-- | src/mainboard/getac/p470/Kconfig | 1 | ||||
-rw-r--r-- | src/mainboard/getac/p470/romstage.c | 8 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/mainboard/getac/p470/Kconfig b/src/mainboard/getac/p470/Kconfig index 3fdf6f74cc..db42233049 100644 --- a/src/mainboard/getac/p470/Kconfig +++ b/src/mainboard/getac/p470/Kconfig @@ -30,6 +30,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy select SUPERIO_SMSC_FDC37N972 select SUPERIO_SMSC_SIO10N268 select EC_ACPI + select EARLY_CBMEM_INIT select HAVE_ACPI_TABLES select HAVE_PIRQ_TABLE select HAVE_MP_TABLE diff --git a/src/mainboard/getac/p470/romstage.c b/src/mainboard/getac/p470/romstage.c index f4e43e5c25..87af8cadcb 100644 --- a/src/mainboard/getac/p470/romstage.c +++ b/src/mainboard/getac/p470/romstage.c @@ -26,6 +26,7 @@ #include <device/pnp_def.h> #include <cpu/x86/lapic.h> #include <lib.h> +#include <cbmem.h> #include <pc80/mc146818rtc.h> #include <console/console.h> #include <cpu/x86/bist.h> @@ -263,12 +264,11 @@ static void early_ich7_init(void) RCBA32(0x2034) = reg32; } -#include <cbmem.h> - void main(unsigned long bist) { u32 reg32; int boot_mode = 0; + int cbmem_was_initted; if (bist == 0) enable_lapic(); @@ -357,11 +357,13 @@ void main(unsigned long bist) #endif MCHBAR16(SSKPD) = 0xCAFE; + cbmem_was_initted = !cbmem_initialize(); + #if CONFIG_HAVE_ACPI_RESUME /* If there is no high memory area, we didn't boot before, so * this is not a resume. In that case we just create the cbmem toc. */ - if ((boot_mode == 2) && cbmem_reinit()) { + if ((boot_mode == 2) && cbmem_was_initted) { void *resume_backup_memory = cbmem_find(CBMEM_ID_RESUME); /* copy 1MB - 64K to high tables ram_base to prevent memory corruption |