[coreboot] [v2] r4308 - trunk/coreboot-v2/src/arch/i386/boot

svn at coreboot.org svn at coreboot.org
Tue May 26 16:37:17 CEST 2009


Author: stepan
Date: 2009-05-26 16:37:17 +0200 (Tue, 26 May 2009)
New Revision: 4308

Modified:
   trunk/coreboot-v2/src/arch/i386/boot/multiboot.c
   trunk/coreboot-v2/src/arch/i386/boot/tables.c
Log:
encapsule mbi initialization in write_multiboot_table, where it belongs. (very
simple and trivial)

Signed-off-by: Stefan Reinauer <stepan at coresystems.de>
Acked-by: Stefan Reinauer <stepan at coresystems.de>



Modified: trunk/coreboot-v2/src/arch/i386/boot/multiboot.c
===================================================================
--- trunk/coreboot-v2/src/arch/i386/boot/multiboot.c	2009-05-26 14:31:37 UTC (rev 4307)
+++ trunk/coreboot-v2/src/arch/i386/boot/multiboot.c	2009-05-26 14:37:17 UTC (rev 4308)
@@ -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 @@
 {
 	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);

Modified: trunk/coreboot-v2/src/arch/i386/boot/tables.c
===================================================================
--- trunk/coreboot-v2/src/arch/i386/boot/tables.c	2009-05-26 14:31:37 UTC (rev 4307)
+++ trunk/coreboot-v2/src/arch/i386/boot/tables.c	2009-05-26 14:37:17 UTC (rev 4308)
@@ -154,7 +154,6 @@
 
 #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);





More information about the coreboot mailing list