GDT.inc

This file defines the structures, constants, and macros for the Global Descriptor Table, or GDT, and its selectors.

See Also

Authors

  • Neil G.  Dickson
Summary
GDT.incThis file defines the structures, constants, and macros for the Global Descriptor Table, or GDT, and its selectors.
Constants
GDT Selector ConstantsThese constants define segment selectors into the GDT.
Macros
TSS_DESCDefine a qword of data containing a TSS descriptor.

Constants

GDT Selector Constants

These constants define segment selectors into the GDT.

SELECTOR_CORE_CODECore code segment selector
SELECTOR_CORE_DATACore data segment selector
SELECTOR_CORE_CALL_GATECoreCallGate selector
SELECTOR_THREAD_SCHEDULER_TSSThreadSchedulerTSS selector
SELECTOR_USER_CODECode segment selector for all applications
SELECTOR_USER_DATAData segment selector for all applications
SELECTOR_BOOT_TSSBoot TSS selector (until Boot is unloaded)
SZ_STORED_GDTSize of the initial GDT

Macros

TSS_DESC

Define a qword of data containing a TSS descriptor.

Parameters

addressthe address of the TSS
privilegethe privilege level of the descriptor
GDT dq 0 ;NULL descriptor
INITIAL GLOBAL DESCRIPTOR TABLE
This file contains the bootstrap (including Master Boot Record) for PwnOS.
The Core of PwnOS (a.k.a.
Entry point into the Core from Libraries.
ThreadSchedulerTSS TSS32 <>
This is the special TSS32 of the ThreadScheduler task.
This segment contains the 1st-level bootstrap code of PwnOS