Descriptor: Difference between revisions
Jump to navigation
Jump to search
[unchecked revision] | [unchecked revision] |
Content added Content deleted
No edit summary |
No edit summary |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
Descriptors are describing System Segments, Memory Segments and Gates. |
|||
== System Segment Descriptor == |
== System Segment Descriptor == |
||
Line 37: | Line 37: | ||
|- |
|- |
||
! P |
! P |
||
| 47 || Present|| Set this to 1 to be able to access the segment, otherwise a #NP (Segment not Present) exception is generated on access. |
|||
| 47 || Present|| defines if this Descriptor is "present" in memory. s. [[Paging]]. |
|||
|- |
|- |
||
! Limit |
! Limit |
||
Line 90: | Line 90: | ||
|- |
|- |
||
! P |
! P |
||
| 47 || Present|| Set this to 1 to be able to access the segment, otherwise a #NP (Segment not Present) exception is generated on access. |
|||
| 47 || Present|| defines if this Descriptor is "present" in memory. s. [[Paging]]. |
|||
|- |
|- |
||
! Limit |
! Limit |
||
Line 151: | Line 151: | ||
|- |
|- |
||
! P |
! P |
||
| 47 || Present || |
| 47 || Present || Set this to 1 to be able to access the segment, otherwise a #NP (Segment not Present) exception is generated on access. |
||
|- |
|- |
||
! Offset |
! Offset |
||
Line 171: | Line 171: | ||
|- |
|- |
||
! ParamCnt |
! ParamCnt |
||
| 32..35 || |
| 32..35 || uint32_t's to copy || Number of uint32_t stack arguments to copy on stack switch. |
||
|- |
|- |
||
! 0 |
! 0 |
||
Line 191: | Line 191: | ||
|- |
|- |
||
! P |
! P |
||
| 47 || Present || |
| 47 || Present || Set this to 1 to be able to access the segment, otherwise a #NP (Segment not Present) exception is generated on access. |
||
|- |
|- |
||
! Offset |
! Offset |
||
Line 200: | Line 200: | ||
[[Category:X86]] |
[[Category:X86]] |
||
[[Category:Memory Segmentation]] |
Latest revision as of 17:32, 10 July 2023
Descriptors are describing System Segments, Memory Segments and Gates.
System Segment Descriptor
Name | Bit | Full Name | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Limit | 0..15 | Limit 0..15 | Memory range. | ||||||||||||
BAddr | 16..39 | Base Address 0..23 | Linear address where the memory range begins. | ||||||||||||
Typ | 40..43 | Descriptor Type | Possible types :
| ||||||||||||
S | 44 | Storage Segment | = 0 for System Segments. | ||||||||||||
DPL | 45,46 | Descriptor Privilege Level | Specifies which privilege level a process minimum must have to use this Descriptor. | ||||||||||||
P | 47 | Present | Set this to 1 to be able to access the segment, otherwise a #NP (Segment not Present) exception is generated on access. | ||||||||||||
Limit | 48..51 | Limit 16..19 | high part of the Limit. | ||||||||||||
AVL | 52 | . | |||||||||||||
0 | 53 | . | |||||||||||||
- | 54 | . | |||||||||||||
G | 55 | . | |||||||||||||
BAddr | 56..63 | Base Address 24..31 | Higher part of the Base Address. |
Memory Segment Descriptor
Name | Bit | Full Name | Description |
---|---|---|---|
Limit | 0..15 | Limit 0..15 | Memory range. |
BAddr | 16..39 | Base Address 0..23 | Linear address where the memory range begins. |
A | 40 | ||
WR | 41 | ||
CE | 42 | ||
EX | 43 | ||
S | 44 | Storage Segment | = 1 for Memory Segments. |
DPL | 45,46 | Descriptor Privilege Level | Specifies which privilege level a process minimum must have to use this Descriptor. |
P | 47 | Present | Set this to 1 to be able to access the segment, otherwise a #NP (Segment not Present) exception is generated on access. |
Limit | 48..51 | Limit 16..19 | high part of the Limit. |
AVL | 52 | . | |
0 | 53 | . | |
B | 54 | . | |
G | 55 | . | |
BAddr | 56..63 | Base Address 24..31 | Higher part of the Base Address. |
Interrupt Gate Descriptor
Name | Bit | Full Name | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Offset | 0..15 | Offset 0..15 | Lower part of the offset address (also known as pointer). | ||||||||||
Selector | 16..31 | Selector | Selector that specifies the segment of the function to call. | ||||||||||
Reserved | 32..35 | ||||||||||||
0 | 36..39 | - | Have to be 0. | ||||||||||
Type | 40..43 | Gate Type | Possible interrupt gate types :
| ||||||||||
S | 44 | Storage Segment | = 0 for gates. | ||||||||||
DPL | 45,46 | Descriptor Privilege Level | Gate call protection. Specifies which privilege level the calling process minimum should have. | ||||||||||
P | 47 | Present | Set this to 1 to be able to access the segment, otherwise a #NP (Segment not Present) exception is generated on access. | ||||||||||
Offset | 48..63 | Offset 16..31 | Higher part of the offset. |
Call Gate Descriptor
Name | Bit | Full Name | Description | ||||
---|---|---|---|---|---|---|---|
Offset | 0..15 | Offset 0..15 | Lower part of the offset address (also known as pointer). | ||||
Selector | 16..31 | Selector | Selector that specifies the code segment of the function to call. | ||||
ParamCnt | 32..35 | uint32_t's to copy | Number of uint32_t stack arguments to copy on stack switch. | ||||
0 | 36..39 | - | Have to be 0. | ||||
Type | 40..43 | Gate Type | Possible call gate types :
| ||||
S | 44 | Storage Segment | = 0 for gates. | ||||
DPL | 45,46 | Descriptor Privilege Level | Gate call protection. Specifies which privilege level the calling process minimum should have. | ||||
P | 47 | Present | Set this to 1 to be able to access the segment, otherwise a #NP (Segment not Present) exception is generated on access. | ||||
Offset | 48..63 | Offset 16..31 | Higher part of the offset. |