vmmcp: coreboot_tables: Add a reserved region from 0 -> base of memory.
authorRonald G. Minnich <rminnich@gmail.com>
Tue, 23 Jun 2015 16:31:33 +0000 (09:31 -0700)
committerRonald G. Minnich <rminnich@gmail.com>
Tue, 23 Jun 2015 16:32:13 +0000 (09:32 -0700)
Some kernels want to see a definition of the hole below real memory.

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
user/vmm/coreboot_table.c

index b6ccc4b..c7427ed 100644 (file)
@@ -302,6 +302,11 @@ void * write_coreboot_table(void *where, void *base, uint64_t len)
        head = lb_table_init(where);
        m = lb_memory(head);
        mem = (void *)(&m[1]);
+       mem->start = pack_lb64((uint64_t) 0);
+       mem->size = pack_lb64((uint64_t) base-1);
+       mem->type = LB_MEM_RESERVED;
+       m->size += sizeof(*mem);
+       mem = (void *)(&mem[1]);
        mem->start = pack_lb64((uint64_t) base);
        mem->size = pack_lb64((uint64_t) len);
        mem->type = LB_MEM_RAM;