Global Descriptor Table: Difference between revisions

corrected styling and removed verbose/useless formatting (e.g. ill-formed css tags that seem to have no effect due to spaces before the semicolon), I'll do the other tables later
[unchecked revision][unchecked revision]
(corrected styling and removed verbose/useless formatting (e.g. ill-formed css tags that seem to have no effect due to spaces before the semicolon), I'll do the other tables later)
Line 7:
The '''GDT''' is pointed to by the value in the '''GDTR''' register. This is loaded using the '''LGDT''' assembly instruction, whose argument is a pointer to a '''GDT Descriptor''' structure:
 
{| class="wikitable" style="border-width: 3px; width: 720px"
|+style="text-align: left;"|'''GDT DESCRIPTORDescriptor (GDTR):'''
|!style="padding: 2px; width: 461px60%; text-align: left ; border-left: 1px ; border-right: none;" |'''Offset'''<br>6379 (64-bit Modemode) / 3148 (32-bit Modemode)
|!style="padding: 2px; width: 10px6%; text-align: right; border-left: none; border-right: 1px ;" |<br>016
|!style="padding: 2px; width: 221px17%; text-align: left ; border-left: 1px ; border-right: none;" |'''Size'''<br>15
|!style="padding: 2px; width: 11px17%; text-align: right; border-left: none; border-right: 1px ;" |<br>0
|-
|style="padding: 2px; width: 461px; text-align: left ; border-left: 1px ; border-right: none;" |79'''Offset'''<br>63 (64-bit Modemode) / 4831 (32-bit Modemode)
|style="padding: 2px; width: 10px; text-align: right; border-left: none; border-right: 1px ;" |16<br>0
|style="padding: 2px; width: 221px; text-align: left ; border-left: 1px ; border-right: none;" |'''Size'''<br>15
|style="padding: 2px; width: 11px; text-align: right; border-left: none; border-right: 1px ;" |<br>0
|-
|style="padding: 2px; width: 461px; text-align: left ; border-left: 1px ; border-right: none;" |'''Offset'''<br>63 (64-bit Mode) / 31 (32-bit Mode)
|style="padding: 2px; width: 10px; text-align: right; border-left: none; border-right: 1px ;" |<br>0
|style="padding: 2px; width: 221px; text-align: left ; border-left: 1px ; border-right: none;" |'''Size'''<br>15
|style="padding: 2px; width: 11px; text-align: right; border-left: none; border-right: 1px ;" |<br>0
|}
 
* '''Size:''' The size of the table in bytes subtracted by 1. This subtraction occurs because the maximum value of '''Size''' is 65535, while the '''GDT''' can be up to 65536 bytes in length (8192 entries). Further, no '''GDT''' can have a size of 0 bytes.
* '''Offset:''' The linear address of the '''GDT''' (not the physical address, paging applies).