Page 1 of 1

load GDT?

Posted: Thu Jun 24, 2004 8:04 am
by Moron
This is probably a stupid question but anyways...when Im setting the GDT and GDTD by using "lgdt", is the information in the GDT "loaded" and saved at some special location? Or is it just a pointer that?s being saved? Cause if the GDT isnt loaded and moved to some other place, I cant just "overwrite" the boot-loader code since the GDT table is there?

Re:load GDT?

Posted: Thu Jun 24, 2004 8:31 am
by Pype.Clicker
the base and limit of GDT is loaded into the GDTR (an internal register) and thus shouldn't be needed later. However, the GDT itself may be required later (when loading segment selectors) and thus should be placed to a "safe" memory area.