Page 1 of 1

GRUB and GDT

Posted: Mon Jun 11, 2012 9:15 am
by rhughes
Hello

I am assuming that as GRUB boots you into protected mode, it has already setup a basic GDT.

Would this GDT suffice for most needs, or would I need to set another one? I can't seem to find the answer by reading the GRUB manual.

Thanks,

Richard Hughes

Re: GRUB and GDT

Posted: Mon Jun 11, 2012 10:34 am
by Combuster
I don't know about your reading skills but:
All other processor registers and flag bits are undefined. This includes, in particular

(...)

‘GDTR’
Even though the segment registers are set up as described above, the ‘GDTR’
may be invalid, so the OS image must not load any segment registers (even just
reloading the same values!) until it sets up its own ‘GDT’
.

Re: GRUB and GDT

Posted: Wed Jun 13, 2012 9:47 am
by rhughes
Thanks :)