failure when loading modules with grub
Posted: Sun Nov 02, 2008 9:56 am
ok, so this is the first time i've been stuck for a while now, and with very good reason to be.
I have recently tried loading a module with grub (soon to become loading a basic file system and all that) but whenever i load a module (just one) the multiboot structure does not like it. it appears that the boot->mods_count and boot->mods_address are just filled with 0xFFFFFFFF and so i have no idea what to do next. i have an exact copy of the multiboot structure from James M's tutorial and am following his way of finding the module in memory.
my code, which involves the module, is only reading from the multiboot structure and is printing the addresses to the screen. it looks like this:
th assert returns fine but the hex values passed to puthex() seem to be corrupted. read_vfs(boot); only gives placement address the end address of the kernel and enables paging for the moment.
so what could the error be? i can post more code if you need it, but most of it is just the multiboot structure which can be found on JamesM's site.
thanks in advance!
James.
I have recently tried loading a module with grub (soon to become loading a basic file system and all that) but whenever i load a module (just one) the multiboot structure does not like it. it appears that the boot->mods_count and boot->mods_address are just filled with 0xFFFFFFFF and so i have no idea what to do next. i have an exact copy of the multiboot structure from James M's tutorial and am following his way of finding the module in memory.
my code, which involves the module, is only reading from the multiboot structure and is printing the addresses to the screen. it looks like this:
Code: Select all
ASSERT(boot->mods_count > 0);
puts("modules address = ");
puthex((*(unsigned int*)boot->mods_addr));
puts("\nmodules count = ");
puthex(*(unsigned int*)(boot->mods_count));
puts("\n\n");
read_vfs(boot);
so what could the error be? i can post more code if you need it, but most of it is just the multiboot structure which can be found on JamesM's site.
thanks in advance!
James.