RE:Just keeps rebooting
Posted: Thu Dec 19, 2002 12:00 am
Grub attempts to conform to the multiboot standard. "http://www.mcc.ac.uk/grub/multiboot_toc.html" might help with that. Grub is also capable of loading non-multiboot kernels. When it passes control to a multiboot kernel, it is in protected mode, and the segment registers are set up for a flat memory model. That might explain a few things, but I am not sure why that high an address would work. Can you tell me what commands you use to load your kernel with grub?
As for setting up your IDT, the only thing you can't do in C is set up the idtr (the register which sets the location of the IDT). However, it is one line of inline assembly. The other thing you will need is a GDT. Grub uses one to load the correct segment descriptors, but you will need one in order to load new ones.
If you want a basic reference for i386 programming, this will give you a starting place.
"http://webster.cs.ucr.edu/Page_TechDocs/Doc386/0_toc.html"
"I might really be better off not working on this thing anymore... just might not be ready for it..."
The only way to learn it to try. When I first decided I wanted to write an OS, I thought I was going to do it in QuickBASIC. hehe. That was a _very_ long time ago. Writing an OS is a surpisingly good way to learn about how computers work. Good luck.
As for setting up your IDT, the only thing you can't do in C is set up the idtr (the register which sets the location of the IDT). However, it is one line of inline assembly. The other thing you will need is a GDT. Grub uses one to load the correct segment descriptors, but you will need one in order to load new ones.
If you want a basic reference for i386 programming, this will give you a starting place.
"http://webster.cs.ucr.edu/Page_TechDocs/Doc386/0_toc.html"
"I might really be better off not working on this thing anymore... just might not be ready for it..."
The only way to learn it to try. When I first decided I wanted to write an OS, I thought I was going to do it in QuickBASIC. hehe. That was a _very_ long time ago. Writing an OS is a surpisingly good way to learn about how computers work. Good luck.