GDT Tutorial: Difference between revisions

[unchecked revision][unchecked revision]
Content deleted Content added
m Add 'See Also' section with link to GDT article
Null descriptor clarificaiton
Line 21:
For sanity purpose, you should always have these items stored in your GDT:
 
* The null descriptor (youwhich can'tis gonever withoutreferenced it, really). ''The null descriptor entry inby the GDT table is compulsoryprocessor. Certain emulators, like bochsBochs, will complain about limit exceptions if you do not have one present. --MattSome Durgavichuse this descriptor to store a pointer to the GDT itself (mattdurgavich@yahoo.comto use with the LGDT instructions)''. The null descriptor is 8 bytes wide and the pointer is 6 bytes wide so it might just be the perfect place for this.
* A code segment descriptor (for your kernel, it should have type=0x9A)
* A data segment descriptor (you can't write to a code segment, so add this with type=0x92)