]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
x86: Ignore memory >4GB when parsing Coreboot tables
authorDuncan Laurie <dlaurie@chromium.org>
Tue, 23 Oct 2012 18:04:42 +0000 (18:04 +0000)
committerSimon Glass <sjg@chromium.org>
Thu, 6 Dec 2012 22:30:40 +0000 (14:30 -0800)
U-boot is unable to actually use that memory and it can
cause problems with relocation if it tries to.

Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
arch/x86/cpu/coreboot/sdram.c

index 93dccb83effc2765f367347462b0a9c0e644f3f9..5d3da9977c8cbf9b643fe43158a2c568647917f3 100644 (file)
@@ -60,6 +60,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;
        }