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
This commit is contained in:
Myles Watson 2008-05-21 22:10:38 +00:00
parent 29413c76ab
commit 42319797a6
1 changed files with 4 additions and 0 deletions

View File

@ -227,6 +227,10 @@ static int valid_area(struct lb_memory *mem, unsigned long buffer,
if ((mtype == LB_MEM_RAM) && (start < mend) && (end > mstart)) { if ((mtype == LB_MEM_RAM) && (start < mend) && (end > mstart)) {
break; break;
} }
if ((mtype == LB_MEM_TABLE) && (start < mend) && (end > mstart)) {
printk_err("Payload is overwriting Coreboot tables.\n");
break;
}
} }
if (i == mem_entries) { if (i == mem_entries) {
printk_err("No matching ram area found for range:\n"); printk_err("No matching ram area found for range:\n");