ReactOS 0.4.17-dev-650-gd0e71de
ke.h
Go to the documentation of this file.
1#ifndef __NTOSKRNL_INCLUDE_INTERNAL_AMD64_KE_H
2#define __NTOSKRNL_INCLUDE_INTERNAL_AMD64_KE_H
3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8#define X86_EFLAGS_TF 0x00000100 /* Trap flag */
9#define X86_EFLAGS_IF 0x00000200 /* Interrupt Enable flag */
10#define X86_EFLAGS_IOPL 0x00003000 /* I/O Privilege Level bits */
11#define X86_EFLAGS_NT 0x00004000 /* Nested Task flag */
12#define X86_EFLAGS_RF 0x00010000 /* Resume flag */
13#define X86_EFLAGS_VM 0x00020000 /* Virtual Mode */
14#define X86_EFLAGS_ID 0x00200000 /* CPUID detection flag */
15
16#define X86_CR0_PE 0x00000001 /* enable Protected Mode */
17#define X86_CR0_NE 0x00000020 /* enable native FPU error reporting */
18#define X86_CR0_TS 0x00000008 /* enable exception on FPU instruction for task switch */
19#define X86_CR0_EM 0x00000004 /* enable FPU emulation (disable FPU) */
20#define X86_CR0_MP 0x00000002 /* enable FPU monitoring */
21#define X86_CR0_WP 0x00010000 /* enable Write Protect (copy on write) */
22#define X86_CR0_PG 0x80000000 /* enable Paging */
23
24#define X86_CR4_PAE 0x00000020 /* enable physical address extensions */
25#define X86_CR4_PGE 0x00000080 /* enable global pages */
26#define X86_CR4_OSFXSR 0x00000200 /* enable FXSAVE/FXRSTOR instructions */
27#define X86_CR4_OSXMMEXCPT 0x00000400 /* enable #XF exception */
28
29/* EDX flags */
30#define X86_FEATURE_FPU 0x00000001 /* x87 FPU is present */
31#define X86_FEATURE_VME 0x00000002 /* Virtual 8086 Extensions are present */
32#define X86_FEATURE_DBG 0x00000004 /* Debugging extensions are present */
33#define X86_FEATURE_PSE 0x00000008 /* Page Size Extension is present */
34#define X86_FEATURE_TSC 0x00000010 /* time stamp counters are present */
35#define X86_FEATURE_PAE 0x00000040 /* physical address extension is present */
36#define X86_FEATURE_CX8 0x00000100 /* CMPXCHG8B instruction present */
37#define X86_FEATURE_SYSCALL 0x00000800 /* SYSCALL/SYSRET support present */
38#define X86_FEATURE_MTRR 0x00001000 /* Memory type range registers are present */
39#define X86_FEATURE_PGE 0x00002000 /* Page Global Enable */
40#define X86_FEATURE_CMOV 0x00008000 /* "Conditional move" instruction supported */
41#define X86_FEATURE_PAT 0x00010000 /* Page Attribute Table is supported */
42#define X86_FEATURE_DS 0x00200000 /* Debug Store is present */
43#define X86_FEATURE_MMX 0x00800000 /* MMX extension present */
44#define X86_FEATURE_FXSR 0x01000000 /* FXSAVE/FXRSTOR instructions present */
45#define X86_FEATURE_SSE 0x02000000 /* SSE extension present */
46#define X86_FEATURE_SSE2 0x04000000 /* SSE2 extension present */
47#define X86_FEATURE_HT 0x10000000 /* Hyper-Threading present */
48
49/* ECX flags */
50#define X86_FEATURE_SSE3 0x00000001 /* SSE3 is supported */
51#define X86_FEATURE_MONITOR 0x00000008 /* SSE3 Monitor instructions supported */
52#define X86_FEATURE_VMX 0x00000020 /* Virtual Machine eXtensions are available */
53#define X86_FEATURE_SSSE3 0x00000200 /* Supplemental SSE3 are available */
54#define X86_FEATURE_FMA3 0x00001000 /* Fused multiple-add supported */
55#define X86_FEATURE_CX16 0x00002000 /* CMPXCHG16B instruction are available */
56#define X86_FEATURE_PCID 0x00020000 /* Process Context IDentifiers are supported */
57#define X86_FEATURE_SSE41 0x00080000 /* SSE 4.1 is supported */
58#define X86_FEATURE_SSE42 0x00100000 /* SSE 4.2 is supported */
59#define X86_FEATURE_POPCNT 0x00800000 /* POPCNT instruction is available */
60#define X86_FEATURE_XSAVE 0x04000000 /* XSAVE family are available */
61
62/* EDX extended flags */
63#define X86_FEATURE_NX 0x00100000 /* NX support present */
64
65#define X86_EXT_FEATURE_SSE3 0x00000001 /* SSE3 extension present */
66#define X86_EXT_FEATURE_3DNOW 0x40000000 /* 3DNOW! extension present */
67
68#define FRAME_EDITED 0xFFF8
69
70#define X86_MSR_GSBASE 0xC0000101
71#define X86_MSR_KERNEL_GSBASE 0xC0000102
72#define X86_MSR_EFER 0xC0000080
73#define X86_MSR_STAR 0xC0000081
74#define X86_MSR_LSTAR 0xC0000082
75#define X86_MSR_CSTAR 0xC0000083
76#define X86_MSR_SFMASK 0xC0000084
77
78#define EFER_SCE 0x0001
79#define EFER_LME 0x0100
80#define EFER_LMA 0x0400
81#define EFER_NXE 0x0800
82#define EFER_SVME 0x1000
83#define EFER_FFXSR 0x4000
84
85#define AMD64_TSS 9
86
87#define APIC_EOI_REGISTER 0xFFFFFFFFFFFE00B0ULL
88
89#ifndef __ASM__
90
92
93#include "intrin_i.h"
94
95typedef struct _KIDT_INIT
96{
102
103#include <pshpack1.h>
105{
112#include <poppack.h>
113
117extern ULONG KeI386CpuType;
118extern ULONG KeI386CpuStep;
119
120//
121// INT3 is 1 byte long
122//
123#define KD_BREAKPOINT_TYPE UCHAR
124#define KD_BREAKPOINT_SIZE sizeof(UCHAR)
125#define KD_BREAKPOINT_VALUE 0xCC
126
127//
128// One-liners for getting and setting special purpose registers in portable code
129//
133{
134 return Context->Rip;
135}
136
138VOID
140{
141 Context->Rip = ProgramCounter;
142}
143
147{
148 return Context->Rax;
149}
150
152VOID
154{
155 Context->Rax = ReturnValue;
156}
157
161{
162 return Context->Rsp;
163}
164
168{
169 return Context->Rbp;
170}
171
173VOID
175{
176 Context->Rbp = Frame;
177}
178
182{
183 return TrapFrame->Rip;
184}
185
189{
190 return (PKTRAP_FRAME)TrapFrame->TrapFrame;
191}
192
196{
197 return TrapFrame->Rsp;
198}
199
203{
204 return TrapFrame->Rbp;
205}
206
210{
211 /* Read the time stamp counter */
212 return __rdtsc();
213}
214
215//
216// Macro to get trap and exception frame from a thread stack
217//
218#define KeGetTrapFrame(Thread) \
219 ((PKTRAP_FRAME)((ULONG_PTR)((Thread)->InitialStack) - \
220 sizeof(KTRAP_FRAME)))
221
222//
223// Macro to get context switches from the PRCB
224// All architectures but x86 have it in the PRCB's KeContextSwitches
225//
226#define KeGetContextSwitches(Prcb) \
227 (Prcb->KeContextSwitches)
228
229//
230// Macro to get the second level cache size field name which differs between
231// CISC and RISC architectures, as the former has unified I/D cache
232//
233#define KiGetSecondLevelDCacheSize() ((PKIPCR)KeGetPcr())->SecondLevelCacheSize
234
235#define KeGetExceptionFrame(Thread) \
236 (PKEXCEPTION_FRAME)((ULONG_PTR)KeGetTrapFrame(Thread) - \
237 sizeof(KEXCEPTION_FRAME))
238
239//
240// Returns the Interrupt State from a Trap Frame.
241// ON = TRUE, OFF = FALSE
242//
243#define KeGetTrapFrameInterruptState(TrapFrame) \
244 BooleanFlagOn((TrapFrame)->EFlags, EFLAGS_INTERRUPT_MASK)
245
246/* Diable interrupts and return whether they were enabled before */
250{
252
253 /* Get EFLAGS and check if the interrupt bit is set */
255
256 /* Disable interrupts */
257 _disable();
258 return (Flags & EFLAGS_INTERRUPT_MASK) ? TRUE : FALSE;
259}
260
261/* Restore previous interrupt state */
263VOID
265{
266 if (WereEnabled) _enable();
267}
268
269//
270// Invalidates the TLB entry for a specified address
271//
273VOID
275{
276 /* Invalidate the TLB entry for this address */
278}
279
281VOID
283{
284 /* Flush the TLB by resetting CR3 */
286}
287
289VOID
291 IN SIZE_T FlushSize)
292{
293 //
294 // Always sweep the whole cache
295 //
297 UNREFERENCED_PARAMETER(FlushSize);
298 __wbinvd();
299}
300
302VOID
304{
305 /* Nothing to do */
306}
307
308/* Registers an interrupt handler with an IDT vector */
310VOID
313{
314 UCHAR Entry;
315 PKIDTENTRY64 Idt;
316
317 /* Get the entry from the HAL */
319
320 /* Now set the data */
321 Idt = &KeGetPcr()->IdtBase[Entry];
322 Idt->OffsetLow = (ULONG_PTR)Handler & 0xffff;
323 Idt->OffsetMiddle = ((ULONG_PTR)Handler >> 16) & 0xffff;
324 Idt->OffsetHigh = (ULONG_PTR)Handler >> 32;
326 Idt->IstIndex = 0;
327 Idt->Type = 0x0e;
328 Idt->Dpl = 0;
329 Idt->Present = 1;
330 Idt->Reserved0 = 0;
331 Idt->Reserved1 = 0;
332}
333
334/* Returns the registered interrupt handler for a given IDT vector */
336PVOID
338{
339 UCHAR Entry;
340 PKIDTENTRY64 Idt;
341
342 /* Get the entry from the HAL */
344
345 /* Get the IDT entry */
346 Idt = &KeGetPcr()->IdtBase[Entry];
347
348 /* Return the address */
349 return (PVOID)((ULONG64)Idt->OffsetHigh << 32 |
350 (ULONG64)Idt->OffsetMiddle << 16 |
351 (ULONG64)Idt->OffsetLow);
352}
353
355VOID
357{
358 /* Write 0 to the apic EOI register */
359 *((volatile ULONG*)APIC_EOI_REGISTER) = 0;
360}
361
363VOID
365 IN PKTRAP_FRAME TrapFrame)
366{
367 /* Make sure this is from the clock handler */
368 ASSERT(TrapFrame->ErrorCode == 0xc10c4);
369
370 /* Disable interrupts and end the interrupt */
371 _disable();
372 HalEndSystemInterrupt(Irql, TrapFrame);
373}
374
378{
379 /* Anything else but Ring 0 is Ring 3 */
380 return !!(TrapFrame->SegCs & MODE_MASK);
381}
382
383//
384// PERF Code
385//
387VOID
389{
392 DbgPrint("Boot took %I64u cycles!\n", BootCyclesEnd - BootCycles);
393 DbgPrint("Interrupts: %u System Calls: %u Context Switches: %u\n",
394 KeGetCurrentPrcb()->InterruptCount,
395 KeGetCurrentPrcb()->KeSystemCalls,
397}
398
399struct _KPCR;
400
426
434#if DBG
435VOID KiReportCpuFeatures(IN PKPRCB Prcb);
436#endif
437
443
444VOID
446 PKSYSTEM_ROUTINE SystemRoutine,
448 PVOID StartContext,
450#define KeArchInitThreadWithContext(Thread,SystemRoutine,StartRoutine,StartContext,Context) \
451 Ke386InitThreadWithContext(Thread,SystemRoutine,StartRoutine,StartContext,Context)
452
453#ifdef _NTOSKRNL_ /* FIXME: Move flags above to NDK instead of here */
454VOID
457 PVOID StartContext,
458 BOOLEAN UserThread,
459 KTRAP_FRAME TrapFrame);
460#endif
461
462#endif /* __ASM__ */
463
464// HACK
465extern NTKERNELAPI volatile KSYSTEM_TIME KeTickCount;
466
467// win64 uses DMA macros, this one is not defined
470NTAPI
472 IN PADAPTER_OBJECT AdapterObject,
476
480{
481 return &PsGetCurrentThread()->Tcb.TrapFrame->Rsp;
482}
483
484VOID
486 _In_ PKTRAP_FRAME TrapFrame,
488
489VOID
491 _Out_ PKTRAP_FRAME TrapFrame,
493 _In_ KPROCESSOR_MODE RequestorMode);
494
495// Exits to user mode, only restores the trap frame, zeroes the non-volatile registers
497VOID
499 _In_ PKTRAP_FRAME TrapFrame);
500
502VOID
504 _In_ PKTRAP_FRAME TrapFrame,
505 _In_ PKEXCEPTION_FRAME ExceptionFrame);
506
509 _In_ PKTRAP_FRAME TrapFrame,
510 _In_ PKEXCEPTION_FRAME ExceptionFrame);
511
512VOID
513NTAPI
516
517#ifdef __cplusplus
518} // extern "C"
519#endif
520
521#endif /* __NTOSKRNL_INCLUDE_INTERNAL_AMD64_KE_H */
522
523/* EOF */
DWORD Id
#define EFLAGS_INTERRUPT_MASK
UINT32 void void ** ReturnValue
Definition: acevents.h:216
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn UINT32 *TableIdx UINT32 ACPI_TABLE_HEADER *OutTableHeader ACPI_TABLE_HEADER **OutTable ACPI_HANDLE UINT32 ACPI_WALK_CALLBACK ACPI_WALK_CALLBACK void void **ReturnValue UINT32 ACPI_BUFFER *RetPathPtr ACPI_OBJECT_HANDLER Handler
Definition: acpixf.h:672
unsigned char BOOLEAN
Definition: actypes.h:127
LONG NTSTATUS
Definition: precomp.h:26
#define MODE_MASK
Definition: orders.h:326
_Out_ PKIRQL Irql
Definition: csq.h:179
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define DECLSPEC_NORETURN
Definition: corecrt.h:131
#define ULONG_PTR
Definition: config.h:101
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define PsGetCurrentThread()
Definition: env_spec_w32.h:81
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
Definition: fltkernel.h:2653
VOID NTAPI HalEndSystemInterrupt(IN KIRQL OldIrql, IN PKTRAP_FRAME TrapFrame)
Definition: pic.c:335
#define DbgPrint
Definition: hal.h:12
PPC_QUAL void __wbinvd(void)
Definition: intrin_ppc.h:759
PPC_QUAL unsigned long long __rdtsc(void)
Definition: intrin_ppc.h:688
__INTRIN_INLINE unsigned long __readcr3(void)
Definition: intrin_x86.h:1850
__INTRIN_INLINE uintptr_t __readeflags(void)
Definition: intrin_x86.h:1706
__INTRIN_INLINE void __invlpg(void *Address)
Definition: intrin_x86.h:2000
__INTRIN_INLINE void __writecr3(unsigned int Data)
Definition: intrin_x86.h:1826
#define ASSERT(a)
Definition: mode.c:44
unsigned __int64 ULONG64
Definition: imports.h:198
#define KGDT64_R0_CODE
Definition: ketypes.h:127
FORCEINLINE struct _KPRCB * KeGetCurrentPrcb(VOID)
Definition: ketypes.h:1197
#define HalVectorToIDTEntry
Definition: halfuncs.h:54
#define KeGetPcr()
Definition: ketypes.h:81
VOID(NTAPI * PKSYSTEM_ROUTINE)(PKSTART_ROUTINE StartRoutine, PVOID StartContext)
Definition: ketypes.h:881
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize _Pre_valid_ PVOID * BaseAddress
Definition: mmfuncs.h:408
#define _Out_
Definition: no_sal2.h:160
#define _In_
Definition: no_sal2.h:158
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:329
VOID NTAPI KiInitializeXStateConfiguration(_In_ ULONG Processor)
Initializes the extended state configuration for the current processor.
Definition: xstate.c:231
VOID KiSetTrapContext(_Out_ PKTRAP_FRAME TrapFrame, _In_ PCONTEXT Context, _In_ KPROCESSOR_MODE RequestorMode)
DECLSPEC_NORETURN VOID KiUserCallbackExit(_In_ PKTRAP_FRAME TrapFrame)
FORCEINLINE ULONG_PTR KeGetTrapFrameFrameRegister(PKTRAP_FRAME TrapFrame)
Definition: ke.h:202
VOID KiInitializeCpuFeatures(VOID)
VOID KiDebugServiceTrap(VOID)
DECLSPEC_NORETURN VOID KiSwitchToBootStack(IN ULONG_PTR InitialStack)
Definition: ke.h:925
ULONG KeI386NpxPresent
Definition: cpu.c:28
#define KeGetContextSwitches(Prcb)
Definition: ke.h:226
VOID KiOverflowTrap(VOID)
FORCEINLINE ULONG_PTR KeGetContextFrameRegister(PCONTEXT Context)
Definition: ke.h:167
ULONG KeAllocateGdtSelector(ULONG Desc[2])
VOID KiGeneralProtectionFault(VOID)
ULONG KeI386XMMIPresent
Definition: cpu.c:32
VOID Ki386SetProcessorFeatures(VOID)
FORCEINLINE VOID KeInvalidateTlbEntry(IN PVOID Address)
Definition: ke.h:274
FORCEINLINE VOID KeFlushProcessTb(VOID)
Definition: ke.h:282
FORCEINLINE VOID KeSetContextFrameRegister(PCONTEXT Context, ULONG_PTR Frame)
Definition: ke.h:174
DECLSPEC_NORETURN VOID KiExceptionExit(_In_ PKTRAP_FRAME TrapFrame, _In_ PKEXCEPTION_FRAME ExceptionFrame)
Definition: ke.h:720
FORCEINLINE ULONG64 KxQueryProcessorCycleTime(VOID)
Definition: ke.h:209
FORCEINLINE ULONG_PTR KeGetTrapFrameStackRegister(PKTRAP_FRAME TrapFrame)
Definition: ke.h:195
VOID KiGetCacheInformation(VOID)
Definition: cpu.c:334
FORCEINLINE BOOLEAN KeDisableInterrupts(VOID)
Definition: ke.h:249
VOID KiInvalidOpcodeFault(VOID)
struct _KIDT_INIT KIDT_INIT
struct _KI_INTERRUPT_DISPATCH_ENTRY * PKI_INTERRUPT_DISPATCH_ENTRY
ULONG64 KiGetFeatureBits(VOID)
Evaluates the KeFeatureFlag bits for the current CPU.
Definition: cpu.c:73
VOID KiXmmException(VOID)
VOID Ke386InitThreadWithContext(PKTHREAD Thread, PKSYSTEM_ROUTINE SystemRoutine, PKSTART_ROUTINE StartRoutine, PVOID StartContext, PCONTEXT Context)
#define APIC_EOI_REGISTER
Definition: ke.h:87
struct _KIDT_INIT * PKIDT_INIT
VOID KiNpxSegmentOverrunAbort(VOID)
FORCEINLINE VOID KiSendEOI(VOID)
Definition: ke.h:356
VOID KiInvalidTssFault(VOID)
NTHALAPI NTSTATUS NTAPI HalAllocateAdapterChannel(IN PADAPTER_OBJECT AdapterObject, IN PWAIT_CONTEXT_BLOCK Wcb, IN ULONG NumberOfMapRegisters, IN PDRIVER_CONTROL ExecutionRoutine)
Definition: dma.c:88
VOID KiGetTrapContext(_In_ PKTRAP_FRAME TrapFrame, _Out_ PCONTEXT Context)
VOID KiDebugTrapOrFault(VOID)
struct _KI_INTERRUPT_DISPATCH_ENTRY KI_INTERRUPT_DISPATCH_ENTRY
VOID KiDivideErrorFault(VOID)
VOID KiAlignmentFault(VOID)
VOID KiApcInterrupt(VOID)
Definition: trapc.c:229
VOID KiGdtPrepareForApplicationProcessorInit(ULONG Id)
VOID KeApplicationProcessorInitDispatcher(VOID)
VOID KiSegmentNotPresentFault(VOID)
VOID KiIpiInterrupt(VOID)
BOOLEAN KiProcessorFreezeHandler(_In_ PKTRAP_FRAME TrapFrame, _In_ PKEXCEPTION_FRAME ExceptionFrame)
Definition: freeze.c:43
FORCEINLINE PVOID KeQueryInterruptHandler(IN ULONG Vector)
Definition: ke.h:337
VOID KiBreakpointTrap(VOID)
VOID KeFreeGdtSelector(ULONG Entry)
FORCEINLINE VOID KeRestoreInterrupts(BOOLEAN WereEnabled)
Definition: ke.h:264
ULONG KeI386CpuType
Definition: cpu.c:25
VOID NtEarlyInitVdm(VOID)
VOID KiSetProcessorType(VOID)
Definition: cpu.c:40
VOID KiDoubleFaultAbort(VOID)
VOID KiNpxNotAvailableFault(VOID)
VOID KiBoundFault(VOID)
VOID KiStackFault(VOID)
FORCEINLINE VOID KiRundownThread(IN PKTHREAD Thread)
Definition: ke.h:303
SIZE_T KeXStateLength
Definition: stubs.c:18
NTKERNELAPI volatile KSYSTEM_TIME KeTickCount
Definition: clock.c:19
VOID KiMcheckAbort(VOID)
VOID KiRaiseAssertion(VOID)
ULONG KeI386FxsrPresent
Definition: cpu.c:33
FORCEINLINE BOOLEAN KiUserTrap(IN PKTRAP_FRAME TrapFrame)
Definition: ke.h:377
VOID KiDpcInterrupt(VOID)
VOID KeCreateApplicationProcessorIdleThread(ULONG Id)
VOID KiFloatingErrorFault(VOID)
FORCEINLINE VOID KeSweepICache(IN PVOID BaseAddress, IN SIZE_T FlushSize)
Definition: ke.h:290
VOID Ki386InitializeLdt(VOID)
FORCEINLINE VOID KeRegisterInterruptHandler(IN ULONG Vector, IN PVOID Handler)
Definition: ke.h:311
FORCEINLINE PULONG_PTR KiGetUserModeStackAddress(void)
Definition: ke.h:479
VOID KiPageFault(VOID)
VOID KiNmiInterrupt(VOID)
FORCEINLINE ULONG_PTR KeGetContextStackRegister(PCONTEXT Context)
Definition: ke.h:160
ULONG KeI386CpuStep
Definition: cpu.c:26
#define KeSetContextReturnRegister(Context, ReturnValue)
Definition: ke.h:43
#define Ki386PerfEnd()
Definition: ke.h:174
#define KiGetLinkedTrapFrame(x)
Definition: ke.h:177
#define KeSetContextPc(Context, ProgramCounter)
Definition: ke.h:34
#define KeGetContextPc(Context)
Definition: ke.h:31
#define KeGetContextReturnRegister(Context)
Definition: ke.h:40
#define KeGetTrapFramePc(TrapFrame)
Definition: ke.h:37
#define KiEndInterrupt(x, y)
Definition: ke.h:175
VOID NTAPI KiThreadStartup(VOID)
Definition: thrdini.c:63
ULONGLONG BootCyclesEnd
Definition: ke.h:157
ULONGLONG BootCycles
Definition: kiinit.c:37
#define NTHALAPI
Definition: ntoskrnl.h:40
static WCHAR Address[46]
Definition: ping.c:68
void __cdecl _disable(void)
Definition: intrin_arm.h:365
void __cdecl _enable(void)
Definition: intrin_arm.h:373
Entry
Definition: section.c:5216
_In_ PVOID Context
Definition: storport.h:2269
Definition: ke.h:96
UCHAR Dpl
Definition: ke.h:98
UCHAR IstIndex
Definition: ke.h:99
PVOID ServiceRoutine
Definition: ke.h:100
UCHAR InterruptId
Definition: ke.h:97
Definition: ke.h:105
UCHAR _Op_nop
Definition: ke.h:106
UCHAR _Vector
Definition: ke.h:108
ULONG RelativeAddress
Definition: ke.h:110
UCHAR _Op_push
Definition: ke.h:107
UCHAR _Op_jmp
Definition: ke.h:109
Definition: ke.h:294
struct _KPRCB * Prcb
Definition: ke.h:20
UINT64 Rsp
Definition: ketypes.h:491
UINT64 Rbp
Definition: ketypes.h:477
UINT64 Rip
Definition: ketypes.h:484
UINT64 TrapFrame
Definition: ketypes.h:473
uint32_t * PULONG_PTR
Definition: typedefs.h:65
unsigned char UCHAR
Definition: typedefs.h:53
#define NTAPI
Definition: typedefs.h:36
ULONG_PTR SIZE_T
Definition: typedefs.h:80
uint64_t ULONGLONG
Definition: typedefs.h:67
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
ULONG OffsetHigh
Definition: ketypes.h:579
USHORT Reserved0
Definition: ketypes.h:574
USHORT IstIndex
Definition: ketypes.h:573
USHORT OffsetMiddle
Definition: ketypes.h:578
USHORT OffsetLow
Definition: ketypes.h:571
ULONG Reserved1
Definition: ketypes.h:580
USHORT Dpl
Definition: ketypes.h:576
USHORT Present
Definition: ketypes.h:577
USHORT Selector
Definition: ketypes.h:572
USHORT Type
Definition: ketypes.h:575
#define FORCEINLINE
Definition: wdftypes.h:67
#define NTKERNELAPI
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
_Out_ PULONG NumberOfMapRegisters
Definition: halfuncs.h:209
_In_ PDEVICE_OBJECT _In_ ULONG _In_ PDRIVER_CONTROL ExecutionRoutine
Definition: iofuncs.h:1399
DRIVER_CONTROL * PDRIVER_CONTROL
Definition: iotypes.h:215
_In_ UCHAR Processor
Definition: kefuncs.h:670
KSTART_ROUTINE * PKSTART_ROUTINE
Definition: ketypes.h:567
CCHAR KPROCESSOR_MODE
Definition: ketypes.h:7
_In_ ULONG _In_opt_ POBJECT_ATTRIBUTES _In_opt_ HANDLE _Out_opt_ PCLIENT_ID _In_ PKSTART_ROUTINE StartRoutine
Definition: psfuncs.h:92