HyperDbg Debugger
Loading...
Searching...
No Matches
Segmentation.h
Go to the documentation of this file.
1
12#pragma once
13
15// Constants //
17
23#define USE_DEFAULT_OS_GDT_AS_HOST_GDT FALSE
24
29#define HOST_GDT_DESCRIPTOR_COUNT 10 // approximately
30
35#define HOST_INTERRUPT_STACK_SIZE 4 * PAGE_SIZE
36
41#define USE_INTERRUPT_STACK_TABLE FALSE
42
44// Functions //
46
47_Success_(return)
49SegmentGetDescriptor(_In_ PUCHAR GdtBase,
52
53VOID
55 SEGMENT_DESCRIPTOR_32 * OsGdtBase,
56 UINT16 OsGdtLimit,
57 UINT16 TrSelector,
58 UINT64 HostStack,
59 SEGMENT_DESCRIPTOR_32 * AllocatedHostGdt,
60 TASK_STATE_SEGMENT_64 * AllocatedHostTss);
unsigned short UINT16
Definition BasicTypes.h:47
UCHAR BOOLEAN
Definition BasicTypes.h:39
#define VOID
Definition BasicTypes.h:33
unsigned __int64 UINT64
Definition BasicTypes.h:21
_Use_decl_annotations_ BOOLEAN SegmentGetDescriptor(PUCHAR GdtBase, UINT16 Selector, PVMX_SEGMENT_SELECTOR SegmentSelector)
Get Segment Descriptor.
Definition Segmentation.c:24
_In_ UINT16 Selector
Definition Segmentation.h:50
_In_ UINT16 _Out_ PVMX_SEGMENT_SELECTOR SegmentSelector
Definition Segmentation.h:51
VOID SegmentPrepareHostGdt(SEGMENT_DESCRIPTOR_32 *OsGdtBase, UINT16 OsGdtLimit, UINT16 TrSelector, UINT64 HostStack, SEGMENT_DESCRIPTOR_32 *AllocatedHostGdt, TASK_STATE_SEGMENT_64 *AllocatedHostTss)
Initialize the host GDT.
Definition Segmentation.c:95
_Success_(return) BOOLEAN SegmentGetDescriptor(_In_ PUCHAR GdtBase
Segment selector.
Definition DataTypes.h:436