Global Descriptor Table: Difference between revisions

Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content deleted Content added
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
changed segment descriptor table
Line 8: Line 8:


{| class="wikitable"
{| class="wikitable"
|+style="text-align: left;"|'''GDT Descriptor (GDTR):'''
|+ GDT Descriptor (GDTR)
!style="width: 60%; text-align: left; border-right: none;" |79 (64-bit mode) / 48 (32-bit mode)
!style="width: 60%; text-align: left; border-right: none;" |79 (64-bit mode) / 48 (32-bit mode)
!style="width: 6%; text-align: right; border-left: none;" |16
!style="width: 6%; text-align: right; border-left: none;" |16
!style="width: 17%; text-align: left; border-right: none;" |15
!style="width: 17%; text-align: left; border-right: none;" |15
!style="width: 17%; text-align: right; border-left: none;" |0
!style="width: 17%; text-align: right; border-left: none;" |0
|-
|-
|style="width: 461px; border-right: none;" |'''Offset'''<br>63 (64-bit mode) / 31 (32-bit mode)
|style="border-right: none;" |'''Offset'''<br>63 (64-bit mode) / 31 (32-bit mode)
|style="width: 10px; text-align: right; border-left: none;" |<br>0
|style="text-align: right; border-left: none;" |<br>0
|style="width: 221px; border-right: none;" |'''Size'''<br>15
|style="border-right: none;" |'''Size'''<br>15
|style="width: 11px; text-align: right; border-left: none;" |<br>0
|style="text-align: right; border-left: none;" |<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.
* '''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.
Line 52: Line 52:


Each entry in the table has a complex structure:
Each entry in the table has a complex structure:
{| class="wikitable" style="border-width: 3px; width: 640px;"
{| class="wikitable"
|+ Segment descriptor
|+style="text-align: left;"|'''SEGMENT DESCRIPTOR:'''
!style="width: 20%; text-align: left; border-right: none;"|63
!style="width: 5%; text-align: right; border-left: none;"|56
!style="width: 7.5%; text-align: left; border-right: none;"|55
!style="width: 5%; text-align: right; border-left: none;"|52
!style="width: 7.5%; text-align: left; border-right: none;"|51
!style="width: 5%; text-align: right; border-left: none;"|48
!style="width: 20%; text-align: left; border-right: none;"|47
!style="width: 5%; text-align: right; border-left: none;"|40
!style="width: 20%; text-align: left; border-right: none;"|39
!style="width: 5%; text-align: right; border-left: none;"|32
|-
|-
|style="padding: 2px; width: 136px; text-align: left ; border-left: 1px ; border-right: none;"|63
|style="border-right: none;"|'''Base'''<br>31
|style="padding: 2px; width: 15px; text-align: right; border-left: none; border-right: 1px ;"|56
|style="text-align: right; border-left: none;"|<br>24
|style="padding: 2px; width: 56px; text-align: left ; border-left: 1px ; border-right: none;"|55
|style="border-right: none;"|'''Flags'''<br>3
|style="padding: 2px; width: 15px; text-align: right; border-left: none; border-right: 1px ;"|52
|style="text-align: right; border-left: none;"|<br>0
|style="padding: 2px; width: 56px; text-align: left ; border-left: 1px ; border-right: none;"|51
|style="border-right: none;"|'''Limit'''<br>19
|style="padding: 2px; width: 15px; text-align: right; border-left: none; border-right: 1px ;"|48
|style="text-align: right; border-left: none;"|<br>16
|style="padding: 2px; width: 136px; text-align: left ; border-left: 1px ; border-right: none;"|47
|style="border-right: none;"|'''Access Byte'''<br>7
|style="padding: 2px; width: 15px; text-align: right; border-left: none; border-right: 1px ;"|40
|style="text-align: right; border-left: none;"|<br>0
|style="padding: 2px; width: 136px; text-align: left ; border-left: 1px ; border-right: none;"|39
|style="border-right: none;"|'''Base'''<br>23
|style="padding: 2px; width: 16px; text-align: right; border-left: none; border-right: 1px ;"|32
|style="text-align: right; border-left: none;"|<br>16
|-
|-
|style="padding: 2px; width: 136px; text-align: left ; border-left: 1px ; border-right: none;"|'''Base'''<br>31
!colspan=5 style="border-right: none;"|31
|style="padding: 2px; width: 15px; text-align: right; border-left: none; border-right: 1px ;"|<br>24
!style="text-align: right; border-left: none;"|16
|style="padding: 2px; width: 56px; text-align: left ; border-left: 1px ; border-right: none;"|'''Flags'''<br>3
!colspan=3 style="border-right: none;"|15
|style="padding: 2px; width: 15px; text-align: right; border-left: none; border-right: 1px ;"|<br>0
!style="text-align: right; border-left: none;"|0
|style="padding: 2px; width: 56px; text-align: left ; border-left: 1px ; border-right: none;"|'''Limit'''<br>19
|style="padding: 2px; width: 15px; text-align: right; border-left: none; border-right: 1px ;"|<br>16
|style="padding: 2px; width: 136px; text-align: left ; border-left: 1px ; border-right: none;"|'''Access Byte'''<br>7
|style="padding: 2px; width: 15px; text-align: right; border-left: none; border-right: 1px ;"|<br>0
|style="padding: 2px; width: 136px; text-align: left ; border-left: 1px ; border-right: none;"|'''Base'''<br>23
|style="padding: 2px; width: 16px; text-align: right; border-left: none; border-right: 1px ;"|<br>16
|}
{| class="wikitable" style="border-width: 3px; width: 640px;"
|-
|style="padding: 2px; width: 296px; border-right: none;" |31
|style="padding: 2px; width: 15px; text-align: right; border-left: none;" |16
|style="padding: 2px; width: 296px; border-right: none;" |15
|style="padding: 2px; width: 16px; text-align: right; border-left: none;" |0
|-
|-
|style="padding: 2px; width: 296px; border-right: none;" |'''Base'''<br>15
|colspan=5 style="border-right: none;"|'''Base'''<br>15
|style="padding: 2px; width: 15px; text-align: right; border-left: none;" |<br>0
|style="text-align: right; border-left: none;"|<br>0
|style="padding: 2px; width: 296px; border-right: none;" |'''Limit'''<br>15
|colspan=3 style="border-right: none;"|'''Limit'''<br>15
|style="padding: 2px; width: 16px; text-align: right; border-left: none;" |<br>0
|style="text-align: right; border-left: none;"|<br>0
|}
|}