GDT Tutorial: Difference between revisions

+ rating (please adjust when necessary)
[unchecked revision][unchecked revision]
(+ rating (please adjust when necessary))
Line 1:
{{Rating|1}}
In the [[:Category:x86|Intel Architecture]], and more precisely in [[protected mode]], most of the [[memory management]] and [[interruptInterrupt serviceService routinesRoutines]] are controlled through tables of descriptors. Each descriptor stores information about a single object (e.g. a service routine, a task, a chunk of code or data, whatever) the CPU might need at some time. If you try, for instance, to load a new value into a [[Segment|segment register]], the CPU needs to perform safety and access control checks to see whether you're actually entitled to access that specific memory area. Once the checks are performed, useful values (such as the lowest and highest addresses) are cached in invisible registers of the CPU.
 
Intel defined 3 types of tables: the Interrupt Descriptor Table (which supplants the [[IVT]]), the Global Descriptor Table ([[GDT]]) and the Local Descriptor Table. Each table is defined as a (size, [[linear address]]) to the CPU through the <tt>LIDT</tt>, <tt>LGDT</tt>, <tt>LLDT</tt> instructions respectively. In most cases, the OS simply tells where those tables are once at boot time, and then simply goes writing/reading the tables through a pointer.
Anonymous user