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.