encapsule mbi initialization in write_multiboot_table, where it belongs. (very
authorStefan Reinauer <stepan@coresystems.de>
Tue, 26 May 2009 14:37:17 +0000 (14:37 +0000)
committerStefan Reinauer <stepan@openbios.org>
Tue, 26 May 2009 14:37:17 +0000 (14:37 +0000)
simple and trivial)

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4308 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1

src/arch/i386/boot/multiboot.c
src/arch/i386/boot/tables.c

index 1f60ab143b0bb599f791a8fd1060e123ee4d1d04..ba34a2b03cc67858b056285bdab1c431523045a1 100644 (file)
@@ -24,7 +24,7 @@
 #include <console/console.h>
 
 static struct multiboot_mmap_entry *mb_mem;
-struct multiboot_info *mbi;
+struct multiboot_info *mbi = NULL;
 
 static struct {
        u64 addr;
@@ -80,12 +80,17 @@ unsigned long write_multiboot_info(
 {
        int i;
 
+       mbi = (struct multiboot_info *)rom_table_end;
+
        memset(mbi, 0, sizeof(*mbi));
        rom_table_end += sizeof(*mbi);
 
        mbi->mmap_addr = (u32) rom_table_end;
        mb_mem = (struct multiboot_mmap_entry *)rom_table_end;
 
+       /* FIXME This code is broken, it does not know about high memory
+        * tables, nor does it reserve the coreboot table area.
+        */
        /* reserved regions */
        reserved_mem[0].addr = low_table_start;
        reserved_mem[0].len = ROUND(low_table_end - low_table_start, 4096);
index 387699507f8fe0c7a4a9bf88b8c3ab53bc457211..d057f7f0d1ce02d224fb849b9be66bd7aa79d62a 100644 (file)
@@ -154,7 +154,6 @@ struct lb_memory *write_tables(void)
 
 #if CONFIG_MULTIBOOT
        /* The Multiboot information structure */
-       mbi = (struct multiboot_info *)rom_table_end;
        rom_table_end = write_multiboot_info(
                                low_table_start, low_table_end,
                                rom_table_start, rom_table_end);