GRUB
- carbonBased
- Member
- Posts: 382
- Joined: Sat Nov 20, 2004 12:00 am
- Location: Wellesley, Ontario, Canada
- Contact:
Re: GRUB
This isn't defined by the multiboot standard, that i can recall, and therefore you shouldn't rely on GRUB to put your kernel in any known format.
The first thing you should do is setup your own GDT, IDT and (if required) LDT.
That being said, if I recall correctly, when I was writting my kernel entry code, GRUB put the system into a state with a GDT with two entries... one code, one data, each the full 4GB range. No LDT, and interrupts disabled (therefore probably no IDT either).
--Jeff
The first thing you should do is setup your own GDT, IDT and (if required) LDT.
That being said, if I recall correctly, when I was writting my kernel entry code, GRUB put the system into a state with a GDT with two entries... one code, one data, each the full 4GB range. No LDT, and interrupts disabled (therefore probably no IDT either).
--Jeff
-
- Member
- Posts: 134
- Joined: Sun Oct 24, 2004 11:00 pm
- Location: North Dakota, where the buffalo roam
Re: GRUB
The multiboot standard specifies that you need to set up your own GDT and IDT, but it does specify that the interrupts are disabled, and it says that the os must define an IDT before enabling them. Enterring protected mode without an IDT defined and with interrupts enabled would risk a tripple-fault.carbonBased wrote:This isn't defined by the multiboot standard, that i can recall, and therefore you shouldn't rely on GRUB to put your kernel in any known format.
My info comes from <a href="http://www.gnu.org/software/grub/manual/multiboot/">this</a> document.