Stefan Reinauer (stefan.reinauer@coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11121
-gerrit
commit b09bead7d87e92a911ee33412452d406935755ef Author: Stefan Reinauer reinauer@chromium.org Date: Tue Aug 4 11:14:17 2015 -0700
x86: Make sure boot device is mapped below 4G
On x86-64 the current way of calculating the base address of the boot device (SPI flash) gets an unwanted sign extension, making it live somewhere at the end of 64bit address space.
Enforce rom_base to be at the upper end of the 4G address space.
Change-Id: Ia81e82094d3c51f6c10e02b4b0df2f3e1519d39e Signed-off-by: Stefan Reinauer stefan.reinauer@coreboot.org --- src/arch/x86/mmap_boot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/arch/x86/mmap_boot.c b/src/arch/x86/mmap_boot.c index 6c98954..53973f9 100644 --- a/src/arch/x86/mmap_boot.c +++ b/src/arch/x86/mmap_boot.c @@ -24,7 +24,7 @@ #include <stdlib.h>
/* The ROM is memory mapped just below 4GiB. Form a pointer for the base. */ -#define rom_base ((void *)(uintptr_t)(-(int32_t)CONFIG_ROM_SIZE)) +#define rom_base ((void *)(uintptr_t)(0x100000000ULL-CONFIG_ROM_SIZE))
static const struct mem_region_device boot_dev = MEM_REGION_DEV_INIT(rom_base, CONFIG_ROM_SIZE);