diff options
author | Myles Watson <mylesgw@gmail.com> | 2008-05-21 22:10:38 +0000 |
---|---|---|
committer | Myles Watson <mylesgw@gmail.com> | 2008-05-21 22:10:38 +0000 |
commit | 42319797a68f873b142dc26cd1f4031c9ba52fcf (patch) | |
tree | db58b74cd11c9e61bd4e12b70443cc90323671b8 /src | |
parent | 29413c76ab0e46b21d90c9f1a4e966669233d5a4 (diff) | |
download | coreboot-42319797a68f873b142dc26cd1f4031c9ba52fcf.tar.xz |
This is a simple patch which allows payloads to be placed in memory in
the range of 0xf0000-0x100000, where the Coreboot tables live in v2.
As long as the payload doesn't need the tables, it seems harmless, so
why not just print a warning?
This allows v2 to load "legacybios" without having to have a separate loader.
Signed-off-by: Myles Watson <mylesgw@gmail.com>
It'll be fine for testing and doesn't really break anything that did
work before...
Acked-by: Stefan Reinauer <stepan@coresystems.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3343 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src')
-rw-r--r-- | src/boot/elfboot.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/boot/elfboot.c b/src/boot/elfboot.c index f2c5975b11..03e9561d61 100644 --- a/src/boot/elfboot.c +++ b/src/boot/elfboot.c @@ -227,6 +227,10 @@ static int valid_area(struct lb_memory *mem, unsigned long buffer, if ((mtype == LB_MEM_RAM) && (start < mend) && (end > mstart)) { break; } + if ((mtype == LB_MEM_TABLE) && (start < mend) && (end > mstart)) { + printk_err("Payload is overwriting Coreboot tables.\n"); + break; + } } if (i == mem_entries) { printk_err("No matching ram area found for range:\n"); |