From: Joshua Wise Date: Wed, 10 Sep 2008 18:34:50 +0000 (-0400) Subject: Add little multiboot stub X-Git-Url: http://git.joshuawise.com/netwatch.git/commitdiff_plain/56553b7318d2a1466ad07c1955d30a5744b16f12?hp=--cc Add little multiboot stub --- 56553b7318d2a1466ad07c1955d30a5744b16f12 diff --git a/grubload/multiboot.S b/grubload/multiboot.S new file mode 100644 index 0000000..bddd8fd --- /dev/null +++ b/grubload/multiboot.S @@ -0,0 +1,21 @@ +.globl _start + +_start: + jmp multiboot_entry + + .align 4 +multiboot_header: + .long 0x1badb002 /* Magic value */ + .long 0x00000001 /* Flags -- "Please align modules for me" */ + .long 0xE4524FFD /* Checksum */ + +multiboot_entry: + mov $_stack_top, %esp + pushl %ebx /* Multiboot info structure */ + pushl %eax /* Magic number */ + jmp c_start + + .align 4 +_stack: + .space 16384 +_stack_top: diff --git a/grubload/multiboot_c.c b/grubload/multiboot_c.c new file mode 100644 index 0000000..7c6a4fd --- /dev/null +++ b/grubload/multiboot_c.c @@ -0,0 +1,6 @@ +void c_start(unsigned int magic, void *wee) +{ + *(unsigned char *)0xB8000 = 'A'; + while (1) + ; +}