X-Git-Url: http://git.joshuawise.com/netwatch.git/blobdiff_plain/56553b7318d2a1466ad07c1955d30a5744b16f12..9b8c947be2d07e7c5006a92127e58b6022718cbd:/grubload/multiboot_c.c diff --git a/grubload/multiboot_c.c b/grubload/multiboot_c.c index 7c6a4fd..c87b675 100644 --- a/grubload/multiboot_c.c +++ b/grubload/multiboot_c.c @@ -1,6 +1,46 @@ -void c_start(unsigned int magic, void *wee) +#include "console.h" + +struct mb_info { - *(unsigned char *)0xB8000 = 'A'; + unsigned long flags; + unsigned long mem_lower, mem_upper; + unsigned long boot_dev; + char *cmdline; + unsigned long mod_cnt; + struct mod_info *mods; +}; + +struct mod_info +{ + void *mod_start; + void *mod_end; + char *mod_string; + void *reserved; +}; + +void c_start(unsigned int magic, struct mb_info *wee) +{ + unsigned short *grubptr = 0x7CFE; + int i; + + puts("Magic is: "); + puthex(magic); + puts("\nMultiboot header is: "); + puthex(wee); + puts("\n"); + show_cursor(); + + puts("Grubptr is: "); + puthex(*grubptr); + puts("\n"); + + for (i = 0; i < wee->mod_cnt; i++) + { + puts("Module:\n"); + puts(" Start: "); puthex(wee->mods[i].mod_start); puts("\n"); + puts(" Size: "); puthex(wee->mods[i].mod_end - wee->mods[i].mod_start); puts("\n"); + puts(" Name: "); puts(wee->mods[i].mod_string); puts("\n"); + } while (1) ; }