Denis Carikli (GNUtoo@no-log.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3022
-gerrit
commit a51859c1a4816692c66b880e2b533f3812ddccce Author: Denis 'GNUtoo' Carikli GNUtoo@no-log.org Date: Thu Apr 4 16:50:03 2013 +0200
Lenovo X60: Make it compile with CONFIG_DYNAMIC_CBMEM=y
This change was inspired by the google/link device romstage.c code.
Change-Id: I8c6fbce07b86cb8ca112d5c10cf892ef05955bbc Signed-off-by: Denis 'GNUtoo' Carikli GNUtoo@no-log.org --- src/mainboard/lenovo/x60/romstage.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/mainboard/lenovo/x60/romstage.c b/src/mainboard/lenovo/x60/romstage.c index 8d5f922..cca44cf 100644 --- a/src/mainboard/lenovo/x60/romstage.c +++ b/src/mainboard/lenovo/x60/romstage.c @@ -216,6 +216,7 @@ void main(unsigned long bist) { u32 reg32; int boot_mode = 0; + int cbmem_was_initted; const u8 spd_addrmap[2 * DIMM_SOCKETS] = { 0x50, 0x52, 0x51, 0x53 };
if (bist == 0) @@ -313,15 +314,13 @@ void main(unsigned long bist) #endif
MCHBAR16(SSKPD) = 0xCAFE; + cbmem_was_initted = !cbmem_initialize();
#if CONFIG_HAVE_ACPI_RESUME - /* Start address of high memory tables */ - unsigned long high_ram_base = get_top_of_ram() - HIGH_MEMORY_SIZE; - /* 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((u64)high_ram_base)) { + 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