This file defines the structures, constants, and macros for the entry point into the Core of PwnOS, and includes the rest of the include files for Core.
| Core.inc | This file defines the structures, constants, and macros for the entry point into the Core of PwnOS, and includes the rest of the include files for Core. |
| CALLVECTORLIST | This structure defines the layout of CallVectors, containing the addresses of all Core functions accessible from Libraries. |
| Enumerations and Constants | |
| Core Call Gate Constants | These constants define indices into CallVectors (or CALLVECTORLIST) for use by Libraries calling CoreCallGate. |
| Core Access Flag Constants | These constants define bit indices into CoreAccessFlags to lock access to certain areas of the Core. |
| Miscellaneous Constants | These constants are miscellaneous things that don’t really fit anywhere else at the moment. |
| Device Interrupts | These are the interrupt numbers chosen for all device interrupts. |
| Handle Type Constants | These constants allow distinguishing of different types of handle structures. |
This structure defines the layout of CallVectors, containing the addresses of all Core functions accessible from Libraries.
Note: When updating this, update Core Call Gate Constants
| Enumerations and Constants | |
| Core Call Gate Constants | These constants define indices into CallVectors (or CALLVECTORLIST) for use by Libraries calling CoreCallGate. |
| Core Access Flag Constants | These constants define bit indices into CoreAccessFlags to lock access to certain areas of the Core. |
| Miscellaneous Constants | These constants are miscellaneous things that don’t really fit anywhere else at the moment. |
| Device Interrupts | These are the interrupt numbers chosen for all device interrupts. |
| Handle Type Constants | These constants allow distinguishing of different types of handle structures. |
These constants define indices into CallVectors (or CALLVECTORLIST) for use by Libraries calling CoreCallGate.
Note: When updating these, update CALLVECTORLIST
0 Increment: 1
| CG_CREATE_PROCESS | CreateProcess |
| CG_DESTROY_PROCESS | DestroyProcess |
| CG_EXIT_PROCESS | ExitProcess |
| CG_GET_CURRENT_PROCESS | GetCurrentProcess |
| CG_CREATE_THREAD | CreateThread |
| CG_DESTROY_THREAD | DestroyThread |
| CG_PAUSE_THREAD | PauseThread |
| CG_RESUME_THREAD | ResumeThread |
| CG_GET_CURRENT_THREAD | GetCurrentThread |
| CG_SLEEP_THREAD | <SleepThread> |
| CG_SCHEDULE_THREAD | <ScheduleThread> |
| CG_GET_LOCK | GetLock |
| CG_RELEASE_LOCK | ReleaseLock |
| CG_ATTEMPT_GET_LOCK | AttemptGetLock |
| CG_WAIT_FOR_NOTIFY | WaitForNotify |
| CG_ATTEMPT_WAIT_FOR_NOTIFY | AttemptWaitForNotify |
| CG_NOTIFY | Notify |
| CG_NOTIFY_ALL | NotifyAll |
| CG_ALLOCATE_PAGES | AllocatePages |
| CG_FREE_PAGES | FreePages |
| CG_ALLOCATE_MEMORY | AllocateMemory |
| CG_ALLOCATE_ALIGNED_MEMORY | AllocateAlignedMemory |
| CG_FREE_MEMORY | FreeMemory |
| CG_OPEN_FILE | OpenFile |
| CG_GET_FILE_SIZE | GetFileSize |
| CG_READ_FILE | ReadFile |
| CG_WRITE_FILE | <WriteFile> |
| CG_CLOSE_FILE | CloseFile |
| CG_GET_GRAPHICS_ACCESS | <GetGraphicsAccess> |
| CG_RELEASE_GRAPHICS_ACCESS | <ReleaseGraphicsAccess> |
| NUM_CALL_GATES | the number of call gate constants |
These constants define bit indices into CoreAccessFlags to lock access to certain areas of the Core.
0 Increment: 1
| THREAD_SCHEDULER_ACCESS_BITNUM | lock for access to ThreadScheduler |
These constants are miscellaneous things that don’t really fit anywhere else at the moment.
These are the interrupt numbers chosen for all device interrupts. Exception interrupts are in PM.inc
| INT_PIT | Programmable Interval Timer |
| INT_KEYBOARD | PS/2 Keyboard |
| INT_COM2_COM4 | Serial ports |
| INT_COM1_COM3 | Serial ports |
| INT_SOUND_CARD | Sound card |
| INT_FLOPPY | Floppy drives |
| INT_PARALLEL | Parallel ports |
| INT_CMOS_CLOCK | CMOS clock |
| INT_MOUSE | PS/2 Mouse |
| INT_IDE0 | Drives on IDE0 |
| INT_IDE1 | Drives on IDE1 |
| INT_APIC_ERROR | Error in APIC operation |
| INT_APIC_SPURIOUS | Spurious interrupt; its number (in hex) ends in F because that’s required on all before Pentium 4 |
| INT_APIC_TIMER | APIC Timer completion |
| INT_HANG | Miscellaneous interrupt used during Boot |
| INT_USB | USB devices |
| INT_NETWORK | Network cards |
| N_INTERRUPTS | total number of interrupts in IDT |
These constants allow distinguishing of different types of handle structures.
0 Increment: 1
| HANDLE_TYPE_PROCESS | identifies a PROCESSSTRUCT |
| HANDLE_TYPE_THREAD | identifies a THREADSTRUCT |
| HANDLE_TYPE_FILE | identifies a <FILESTRUCT> |
This is the CALLVECTORLIST structure containing the addresses to all Core functions acessible from Libraries, indexed by Core Call Gate Constants.
CallVectors CALLVECTORLIST <>
Bits used to lock access to certain areas of the Core (e.g.
CoreAccessFlags dword 0
INTERRUPT DESCRIPTOR TABLE
IDT: INT_DESC offset IntDivError ;00 Divide Error