From 42319797a68f873b142dc26cd1f4031c9ba52fcf Mon Sep 17 00:00:00 2001 From: Myles Watson Date: Wed, 21 May 2008 22:10:38 +0000 Subject: 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 It'll be fine for testing and doesn't really break anything that did work before... Acked-by: Stefan Reinauer git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3343 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/boot/elfboot.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/boot/elfboot.c') 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"); -- cgit v1.2.3