]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
x86: Add multiboot header
authorGraeme Russ <graeme.russ@gmail.com>
Tue, 8 Nov 2011 02:33:19 +0000 (02:33 +0000)
committerGraeme Russ <graeme.russ@gmail.com>
Tue, 29 Nov 2011 10:08:02 +0000 (21:08 +1100)
By adding a multiboot header, U-Boot can be loaded by GRUB2. Using GRUB2 to
bootstrap U-Boot is useful for using an existing BIOS to get an initial
U-Boot port up and running before implementing the low-level reset vector
code, SDRAM init, etc. and overwriting the BIOS

Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
arch/x86/cpu/start.S

index 5adb3874b4073f83295eaf4ad7b53c8167a14294..d099fc9ba30b5303a48475c7ed0c7f889fdbe4d6 100644 (file)
@@ -129,3 +129,23 @@ die:       hlt
 blank_idt_ptr:
        .word   0               /* limit */
        .long   0               /* base */
+
+       .p2align        2       /* force 4-byte alignment */
+
+multiboot_header:
+       /* magic */
+       .long   0x1BADB002
+       /* flags */
+       .long   (1 << 16)
+       /* checksum */
+       .long   -0x1BADB002 - (1 << 16)
+       /* header addr */
+       .long   multiboot_header - _x86boot_start + CONFIG_SYS_TEXT_BASE
+       /* load addr */
+       .long   CONFIG_SYS_TEXT_BASE
+       /* load end addr */
+       .long   0
+       /* bss end addr */
+       .long   0
+       /* entry addr */
+       .long   CONFIG_SYS_TEXT_BASE