Module x86::shared::segmentation
[−]
[src]
Structs
CodeAccess |
Code segment types. All are executable. |
DataAccess |
Data segment types. All are readable. |
Flags | |
SegmentDescriptor |
Entry for GDT or LDT. Provides size and location of a segment. |
SegmentSelector |
Enums
Type |
Umbrella Segment Type. |
Constants
CODE_CONFORMING |
Segment is callable from segment with fewer privileges. |
CODE_READ |
Segment is readable |
DATA_EXPAND_DOWN |
Segment grows down, for stack |
DATA_WRITE |
Segment is writable |
FLAGS_AVL |
Available for use by system software. |
FLAGS_DB |
Default operation size (0 = 16-bit segment, 1 = 32-bit segment). |
FLAGS_G |
Granularity (0 = limit in bytes, 1 = limt in 4 KiB Pages). |
FLAGS_L |
64-bit code segment (IA-32e mode only). |
RPL_0 |
Requestor Privilege Level |
RPL_1 | |
RPL_2 | |
RPL_3 | |
TI_GDT |
Table Indicator (TI) 0 means GDT is used. |
TI_LDT |
Table Indicator (TI) 1 means LDT is used. |
Functions
cs |
Returns the current value of the code segment register. |
load_ds |
Reload data segment register. |
load_es |
Reload es segment register. |
load_fs |
Reload fs segment register. |
load_gs |
Reload gs segment register. |
load_ss |
Reload stack segment register. |
set_cs |
Reload code segment register. Note this is special since we can not directly move to %cs. Instead we push the new segment selector and return value on the stack and use lretq to reload cs and continue at 1:. |