From 2a32ec44c4aba4660ba3a46f8bf946b421545cf4 Mon Sep 17 00:00:00 2001 From: Duncan Laurie Date: Mon, 9 Jan 2012 22:41:35 -0800 Subject: CHROMIUM: x86: Ignore memory >4GB when parsing Coreboot tables U-boot is unable to actually use that memory and it can cause problems with relocation if it tries to. BUG=chrome-os-partner:6730 TEST=successfully boot on stumpy with a memory map that ends up having 6MB remapped above 4GB. Change-Id: I9ecde227bc0337145a7c0a6a929cfe0636fc2178 Signed-off-by: Duncan Laurie Reviewed-on: https://gerrit.chromium.org/gerrit/13923 Reviewed-by: Stefan Reinauer --- arch/x86/cpu/coreboot/sdram.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'arch') diff --git a/arch/x86/cpu/coreboot/sdram.c b/arch/x86/cpu/coreboot/sdram.c index dd73e0fa1b..fb6515f884 100644 --- a/arch/x86/cpu/coreboot/sdram.c +++ b/arch/x86/cpu/coreboot/sdram.c @@ -59,6 +59,10 @@ int dram_init_f(void) { struct memrange *memrange = &lib_sysinfo.memrange[i]; unsigned long long end = memrange->base + memrange->size; + /* Ignore memory over 4GB, we can't use it. */ + if (memrange->base > 0xffffffff) + continue; + if (memrange->type == CB_MEM_RAM && end > ram_size) ram_size = end; } -- cgit v1.2.3