Global Descriptor Table: Difference between revisions

→‎Structure: Added Link to Expand Down article, and fixed the offset/limit confusion.
[unchecked revision][unchecked revision]
mNo edit summary
(→‎Structure: Added Link to Expand Down article, and fixed the offset/limit confusion.)
Line 24:
* '''Ex:''' Executable bit. If '''1''' code in this segment can be executed, ie. a code selector. If '''0''' it is a data selector.
* '''DC:''' Direction bit/Conforming bit.
** Direction bit for data selectors: Tells the direction. '''0''' the segment grows up. '''1''' the segment [[Expand_Down|grows down]], ie. the <tt>offset</tt> has to be greater than the <tt>baselimit</tt>.
** Conforming bit for code selectors:
*** If '''1''' code in this segment can be executed from an equal or lower privilege level. For example, code in ring 3 can far-jump to ''conforming'' code in a ring 2 segment. The <tt>privl</tt>-bits represent the highest privilege level that is allowed to execute the segment. For example, code in ring 0 cannot far-jump to a conforming code segment with <tt>privl==0x2</tt>, while code in ring 2 and 3 can. Note that the privilege level remains the same, ie. a far-jump form ring 3 to a <tt>privl==2</tt>-segment remains in ring 3 after the jump.
Anonymous user