#include <descriptor.h>
Public Types | |
| enum | Type { kTYPE_RESERVED_0 = 0, kTYPE_TSS_AVAILABLE = 1, kTYPE_LDT = 2, kTYPE_TSS_BUSY = 3, kTYPE_CALL_GATE = 4, kTYPE_TASK_GATE = 5, kTYPE_INT_GATE = 6, kTYPE_TRAP_GATE = 7 } |
| The types defined for a system descriptor. More... | |
| enum | Granularity { kGRANULARITY_BYTE = 0, kGRANULARITY_4K = 1 } |
| Values indicating the granularity of the descriptor. More... | |
| enum | OperationSize { kOP_SIZE_16 = 0, kOP_SIZE_32 = 1 } |
| Values indicating the operation size of the descriptor. More... | |
Public Member Functions | |
| Type | type () const |
| Gets the type of the descriptor using a crude form of RTTI. | |
| bool | isSystemDescriptor () const |
| Returns true if this is a system descriptor, false if it's a memory (code or data) descriptor. | |
| int | privilegeLevel () const |
| Returns the privilege level (an integer ranging from 0 to 3) required to execute any code in this descriptor. | |
| u32 | base () const |
| Gets the segment base address. | |
| u32 | limit () const |
| Gets the segment size. | |
| Granularity | granularity () const |
| Gets the granularity. | |
| OperationSize | operationSize () const |
| Gets the default operation size of the desciptor. | |
| bool | isPresent () const |
| Indicates presence of the segment. | |
| int | limit () const |
Protected Attributes | |
| u16 | m_limit00_15 |
| u16 | m_base00_15 |
| u08 | m_base16_23 |
| TypeUnion | m_flags1 |
| u08 | m_segmentLimit:4 |
| u08 | m_useMe:1 |
| u08 | m_reserved:1 |
| u08 | m_operationSize:1 |
| u08 | m_granularity:1 |
| u08 | m_base24_31 |
Classes | |
| struct | CodeSegment |
| struct | DataSegment |
| struct | SystemSegment |
| union | TypeUnion |
|
|
Values indicating the granularity of the descriptor.
|
|
|
Values indicating the operation size of the descriptor.
|
|
|
The types defined for a system descriptor.
|
|
|
Gets the segment base address. The segment base address is the location of byte 0 in the memory segment described by this descriptor. The segment base address should be aligned on a 16-byte boundary.
|
|
|
Gets the granularity. Granularity is either 1 byte or 0x1000 byte chunks. |
|
|
Indicates presence of the segment.
|
|
|
Returns true if this is a system descriptor, false if it's a memory (code or data) descriptor.
|
|
|
|
|
|
Gets the segment size. If the granularity flag is true, this value indicates 4 kilobyte increments and the segment can address up to 4 GB, otherwise it measures in byte increments and the segment can address up to 1 MB.
|
|
|
Gets the default operation size of the desciptor.
|
|
|
Returns the privilege level (an integer ranging from 0 to 3) required to execute any code in this descriptor.
|
|
|
Gets the type of the descriptor using a crude form of RTTI.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.4.2