ReactOS 0.4.16-dev-1405-gc14a14e
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_MTTR 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
207//
208// Macro to get trap and exception frame from a thread stack
209//
210#define KeGetTrapFrame(Thread) \
211 ((PKTRAP_FRAME)((ULONG_PTR)((Thread)->InitialStack) - \
212 sizeof(KTRAP_FRAME)))
213
214//
215// Macro to get context switches from the PRCB
216// All architectures but x86 have it in the PRCB's KeContextSwitches
217//
218#define KeGetContextSwitches(Prcb) \
219 (Prcb->KeContextSwitches)
220
221//
222// Macro to get the second level cache size field name which differs between
223// CISC and RISC architectures, as the former has unified I/D cache
224//
225#define KiGetSecondLevelDCacheSize() ((PKIPCR)KeGetPcr())->SecondLevelCacheSize
226
227#define KeGetExceptionFrame(Thread) \
228 (PKEXCEPTION_FRAME)((ULONG_PTR)KeGetTrapFrame(Thread) - \
229 sizeof(KEXCEPTION_FRAME))
230
231//
232// Returns the Interrupt State from a Trap Frame.
233// ON = TRUE, OFF = FALSE
234//
235#define KeGetTrapFrameInterruptState(TrapFrame) \
236 BooleanFlagOn((TrapFrame)->EFlags, EFLAGS_INTERRUPT_MASK)
237
238/* Diable interrupts and return whether they were enabled before */
242{
244
245 /* Get EFLAGS and check if the interrupt bit is set */
247
248 /* Disable interrupts */
249 _disable();
250 return (Flags & EFLAGS_INTERRUPT_MASK) ? TRUE : FALSE;
251}
252
253/* Restore previous interrupt state */
255VOID
257{
258 if (WereEnabled) _enable();
259}
260
261//
262// Invalidates the TLB entry for a specified address
263//
265VOID
267{
268 /* Invalidate the TLB entry for this address */
270}
271
273VOID
275{
276 /* Flush the TLB by resetting CR3 */
278}
279
281VOID
283 IN SIZE_T FlushSize)
284{
285 //
286 // Always sweep the whole cache
287 //
289 UNREFERENCED_PARAMETER(FlushSize);
290 __wbinvd();
291}
292
294VOID
296{
297 /* Nothing to do */
298}
299
300/* Registers an interrupt handler with an IDT vector */
302VOID
305{
306 UCHAR Entry;
307 PKIDTENTRY64 Idt;
308
309 /* Get the entry from the HAL */
311
312 /* Now set the data */
313 Idt = &KeGetPcr()->IdtBase[Entry];
314 Idt->OffsetLow = (ULONG_PTR)Handler & 0xffff;
315 Idt->OffsetMiddle = ((ULONG_PTR)Handler >> 16) & 0xffff;
316 Idt->OffsetHigh = (ULONG_PTR)Handler >> 32;
318 Idt->IstIndex = 0;
319 Idt->Type = 0x0e;
320 Idt->Dpl = 0;
321 Idt->Present = 1;
322 Idt->Reserved0 = 0;
323 Idt->Reserved1 = 0;
324}
325
326/* Returns the registered interrupt handler for a given IDT vector */
328PVOID
330{
331 UCHAR Entry;
332 PKIDTENTRY64 Idt;
333
334 /* Get the entry from the HAL */
336
337 /* Get the IDT entry */
338 Idt = &KeGetPcr()->IdtBase[Entry];
339
340 /* Return the address */
341 return (PVOID)((ULONG64)Idt->OffsetHigh << 32 |
342 (ULONG64)Idt->OffsetMiddle << 16 |
343 (ULONG64)Idt->OffsetLow);
344}
345
347VOID
349{
350 /* Write 0 to the apic EOI register */
351 *((volatile ULONG*)APIC_EOI_REGISTER) = 0;
352}
353
355VOID
357 IN PKTRAP_FRAME TrapFrame)
358{
359 /* Make sure this is from the clock handler */
360 ASSERT(TrapFrame->ErrorCode == 0xc10c4);
361
362 /* Disable interrupts and end the interrupt */
363 _disable();
364 HalEndSystemInterrupt(Irql, TrapFrame);
365}
366
370{
371 /* Anything else but Ring 0 is Ring 3 */
372 return !!(TrapFrame->SegCs & MODE_MASK);
373}
374
375//
376// PERF Code
377//
379VOID
381{
384 DbgPrint("Boot took %I64u cycles!\n", BootCyclesEnd - BootCycles);
385 DbgPrint("Interrupts: %u System Calls: %u Context Switches: %u\n",
386 KeGetCurrentPrcb()->InterruptCount,
387 KeGetCurrentPrcb()->KeSystemCalls,
389}
390
391struct _KPCR;
392
418
426#if DBG
427VOID KiReportCpuFeatures(IN PKPRCB Prcb);
428#endif
429
435
436VOID
438 PKSYSTEM_ROUTINE SystemRoutine,
440 PVOID StartContext,
442#define KeArchInitThreadWithContext(Thread,SystemRoutine,StartRoutine,StartContext,Context) \
443 Ke386InitThreadWithContext(Thread,SystemRoutine,StartRoutine,StartContext,Context)
444
445#ifdef _NTOSKRNL_ /* FIXME: Move flags above to NDK instead of here */
446VOID
449 PVOID StartContext,
450 BOOLEAN UserThread,
451 KTRAP_FRAME TrapFrame);
452#endif
453
454#endif /* __ASM__ */
455
456// HACK
457extern NTKERNELAPI volatile KSYSTEM_TIME KeTickCount;
458
459// win64 uses DMA macros, this one is not defined
462NTAPI
464 IN PADAPTER_OBJECT AdapterObject,
468
472{
473 return &PsGetCurrentThread()->Tcb.TrapFrame->Rsp;
474}
475
476VOID
478 _Out_ PKTRAP_FRAME TrapFrame,
480 _In_ KPROCESSOR_MODE RequestorMode);
481
482// Exits to user mode, only restores the trap frame, zeroes the non-volatile registers
484VOID
486 _In_ PKTRAP_FRAME TrapFrame);
487
489VOID
491 _In_ PKTRAP_FRAME TrapFrame,
492 _In_ PKEXCEPTION_FRAME ExceptionFrame);
493
496 _In_ PKTRAP_FRAME TrapFrame,
497 _In_ PKEXCEPTION_FRAME ExceptionFrame);
498
499VOID
500NTAPI
503
504#ifdef __cplusplus
505} // extern "C"
506#endif
507
508#endif /* __NTOSKRNL_INCLUDE_INTERNAL_AMD64_KE_H */
509
510/* EOF */
DWORD Id
unsigned char BOOLEAN
#define EFLAGS_INTERRUPT_MASK
Definition: SystemCall.c:11
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
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 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
void __cdecl _disable(void)
Definition: intrin_arm.h:365
void __cdecl _enable(void)
Definition: intrin_arm.h:373
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:1832
__INTRIN_INLINE uintptr_t __readeflags(void)
Definition: intrin_x86.h:1688
__INTRIN_INLINE void __invlpg(void *Address)
Definition: intrin_x86.h:1982
__INTRIN_INLINE void __writecr3(unsigned int Data)
Definition: intrin_x86.h:1808
#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:1187
#define HalVectorToIDTEntry
Definition: halfuncs.h:51
#define KeGetPcr()
Definition: ketypes.h:81
VOID(NTAPI * PKSYSTEM_ROUTINE)(PKSTART_ROUTINE StartRoutine, PVOID StartContext)
Definition: ketypes.h:862
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID * BaseAddress
Definition: mmfuncs.h:404
#define _Out_
Definition: no_sal2.h:160
#define _In_
Definition: no_sal2.h:158
#define DECLSPEC_NORETURN
Definition: ntbasedef.h:179
#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:897
ULONG KeI386NpxPresent
Definition: cpu.c:28
#define KeGetContextSwitches(Prcb)
Definition: ke.h:218
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:266
FORCEINLINE VOID KeFlushProcessTb(VOID)
Definition: ke.h:274
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:693
FORCEINLINE ULONG_PTR KeGetTrapFrameStackRegister(PKTRAP_FRAME TrapFrame)
Definition: ke.h:195
VOID KiGetCacheInformation(VOID)
Definition: cpu.c:427
FORCEINLINE BOOLEAN KeDisableInterrupts(VOID)
Definition: ke.h:241
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:166
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:348
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 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:329
VOID KiBreakpointTrap(VOID)
VOID KeFreeGdtSelector(ULONG Entry)
FORCEINLINE VOID KeRestoreInterrupts(BOOLEAN WereEnabled)
Definition: ke.h:256
ULONG KeI386CpuType
Definition: cpu.c:25
VOID NtEarlyInitVdm(VOID)
VOID KiSetProcessorType(VOID)
Definition: cpu.c:100
VOID KiDoubleFaultAbort(VOID)
VOID KiNpxNotAvailableFault(VOID)
VOID KiBoundFault(VOID)
VOID KiStackFault(VOID)
FORCEINLINE VOID KiRundownThread(IN PKTHREAD Thread)
Definition: ke.h:295
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:369
VOID KiDpcInterrupt(VOID)
VOID KeCreateApplicationProcessorIdleThread(ULONG Id)
VOID KiFloatingErrorFault(VOID)
FORCEINLINE VOID KeSweepICache(IN PVOID BaseAddress, IN SIZE_T FlushSize)
Definition: ke.h:282
VOID Ki386InitializeLdt(VOID)
FORCEINLINE VOID KeRegisterInterruptHandler(IN ULONG Vector, IN PVOID Handler)
Definition: ke.h:303
FORCEINLINE PULONG_PTR KiGetUserModeStackAddress(void)
Definition: ke.h:471
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
base of all file and directory entries
Definition: entries.h:83
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:485
UINT64 Rbp
Definition: ketypes.h:471
UINT64 Rip
Definition: ketypes.h:478
UINT64 TrapFrame
Definition: ketypes.h:467
uint32_t * PULONG_PTR
Definition: typedefs.h:65
#define NTAPI
Definition: typedefs.h:36
ULONG_PTR SIZE_T
Definition: typedefs.h:80
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
uint64_t ULONGLONG
Definition: typedefs.h:67
ULONG OffsetHigh
Definition: ketypes.h:573
USHORT Reserved0
Definition: ketypes.h:568
USHORT IstIndex
Definition: ketypes.h:567
USHORT OffsetMiddle
Definition: ketypes.h:572
USHORT OffsetLow
Definition: ketypes.h:565
ULONG Reserved1
Definition: ketypes.h:574
USHORT Dpl
Definition: ketypes.h:570
USHORT Present
Definition: ketypes.h:571
USHORT Selector
Definition: ketypes.h:566
USHORT Type
Definition: ketypes.h:569
#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:499
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:91
unsigned char UCHAR
Definition: xmlstorage.h:181