Getting grub info after following the Bare Bones tutorial
Posted: Sat May 02, 2015 4:26 am
i'm quite new to os development so i followed the bare bones tutorial and got a basic kernel that boots from grub.
it is said in the tutorial that: "it(grub) can even forward us important information such as memory maps, but we won't need that yet"
so i followed other tutorials on the web and added:
(i wrote my own terminal_writelong function which displays the number as string on the screen)
i'm currently getting these values:
magic - 0x00100810
addr - 0x007D4AC5
firstly , magic is not 0x1BADBOO2 so i think something is wrong.
secondly , if everything is correct , how do i move on getting some valueble info from grub ?
any help is deeply appreciated , thanks in advance !
it is said in the tutorial that: "it(grub) can even forward us important information such as memory maps, but we won't need that yet"
so i followed other tutorials on the web and added:
Code: Select all
void kernel_main(unsigned long magic, unsigned long addr)
{
terminal_initialize();
terminal_writelong(magic);
terminal_writelong(addr);
}
i'm currently getting these values:
magic - 0x00100810
addr - 0x007D4AC5
firstly , magic is not 0x1BADBOO2 so i think something is wrong.
secondly , if everything is correct , how do i move on getting some valueble info from grub ?
any help is deeply appreciated , thanks in advance !