This is a simple patch which allows payloads to be placed in memory in
[coreboot.git] / src / boot / elfboot.c
index f2c5975b11f79b03f5605b999a5cef79bc5e8f32..03e9561d6128a56c36ff48e5f1f4ca7f0eb31205 100644 (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)) {
                        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");