ReactOS  0.4.15-dev-3295-gaa8fc87
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 #define X86_EFLAGS_TF 0x00000100 /* Trap flag */
5 #define X86_EFLAGS_IF 0x00000200 /* Interrupt Enable flag */
6 #define X86_EFLAGS_IOPL 0x00003000 /* I/O Privilege Level bits */
7 #define X86_EFLAGS_NT 0x00004000 /* Nested Task flag */
8 #define X86_EFLAGS_RF 0x00010000 /* Resume flag */
9 #define X86_EFLAGS_VM 0x00020000 /* Virtual Mode */
10 #define X86_EFLAGS_ID 0x00200000 /* CPUID detection flag */
11 
12 #define X86_CR0_PE 0x00000001 /* enable Protected Mode */
13 #define X86_CR0_NE 0x00000020 /* enable native FPU error reporting */
14 #define X86_CR0_TS 0x00000008 /* enable exception on FPU instruction for task switch */
15 #define X86_CR0_EM 0x00000004 /* enable FPU emulation (disable FPU) */
16 #define X86_CR0_MP 0x00000002 /* enable FPU monitoring */
17 #define X86_CR0_WP 0x00010000 /* enable Write Protect (copy on write) */
18 #define X86_CR0_PG 0x80000000 /* enable Paging */
19 
20 #define X86_CR4_PAE 0x00000020 /* enable physical address extensions */
21 #define X86_CR4_PGE 0x00000080 /* enable global pages */
22 #define X86_CR4_OSFXSR 0x00000200 /* enable FXSAVE/FXRSTOR instructions */
23 #define X86_CR4_OSXMMEXCPT 0x00000400 /* enable #XF exception */
24 
25 /* EDX flags */
26 #define X86_FEATURE_FPU 0x00000001 /* x87 FPU is present */
27 #define X86_FEATURE_VME 0x00000002 /* Virtual 8086 Extensions are present */
28 #define X86_FEATURE_DBG 0x00000004 /* Debugging extensions are present */
29 #define X86_FEATURE_PSE 0x00000008 /* Page Size Extension is present */
30 #define X86_FEATURE_TSC 0x00000010 /* time stamp counters are present */
31 #define X86_FEATURE_PAE 0x00000040 /* physical address extension is present */
32 #define X86_FEATURE_CX8 0x00000100 /* CMPXCHG8B instruction present */
33 #define X86_FEATURE_SYSCALL 0x00000800 /* SYSCALL/SYSRET support present */
34 #define X86_FEATURE_MTTR 0x00001000 /* Memory type range registers are present */
35 #define X86_FEATURE_PGE 0x00002000 /* Page Global Enable */
36 #define X86_FEATURE_CMOV 0x00008000 /* "Conditional move" instruction supported */
37 #define X86_FEATURE_PAT 0x00010000 /* Page Attribute Table is supported */
38 #define X86_FEATURE_DS 0x00200000 /* Debug Store is present */
39 #define X86_FEATURE_MMX 0x00800000 /* MMX extension present */
40 #define X86_FEATURE_FXSR 0x01000000 /* FXSAVE/FXRSTOR instructions present */
41 #define X86_FEATURE_SSE 0x02000000 /* SSE extension present */
42 #define X86_FEATURE_SSE2 0x04000000 /* SSE2 extension present */
43 #define X86_FEATURE_HT 0x10000000 /* Hyper-Threading present */
44 
45 /* ECX flags */
46 #define X86_FEATURE_SSE3 0x00000001 /* SSE3 is supported */
47 #define X86_FEATURE_MONITOR 0x00000008 /* SSE3 Monitor instructions supported */
48 #define X86_FEATURE_VMX 0x00000020 /* Virtual Machine eXtensions are available */
49 #define X86_FEATURE_SSSE3 0x00000200 /* Supplemental SSE3 are available */
50 #define X86_FEATURE_FMA3 0x00001000 /* Fused multiple-add supported */
51 #define X86_FEATURE_CX16 0x00002000 /* CMPXCHG16B instruction are available */
52 #define X86_FEATURE_PCID 0x00020000 /* Process Context IDentifiers are supported */
53 #define X86_FEATURE_SSE41 0x00080000 /* SSE 4.1 is supported */
54 #define X86_FEATURE_SSE42 0x00100000 /* SSE 4.2 is supported */
55 #define X86_FEATURE_POPCNT 0x00800000 /* POPCNT instruction is available */
56 #define X86_FEATURE_XSAVE 0x04000000 /* XSAVE family are available */
57 
58 /* EDX extended flags */
59 #define X86_FEATURE_NX 0x00100000 /* NX support present */
60 
61 #define X86_EXT_FEATURE_SSE3 0x00000001 /* SSE3 extension present */
62 #define X86_EXT_FEATURE_3DNOW 0x40000000 /* 3DNOW! extension present */
63 
64 #define FRAME_EDITED 0xFFF8
65 
66 #define X86_MSR_GSBASE 0xC0000101
67 #define X86_MSR_KERNEL_GSBASE 0xC0000102
68 #define X86_MSR_EFER 0xC0000080
69 #define X86_MSR_STAR 0xC0000081
70 #define X86_MSR_LSTAR 0xC0000082
71 #define X86_MSR_CSTAR 0xC0000083
72 #define X86_MSR_SFMASK 0xC0000084
73 
74 #define EFER_SCE 0x0001
75 #define EFER_LME 0x0100
76 #define EFER_LMA 0x0400
77 #define EFER_NXE 0x0800
78 #define EFER_SVME 0x1000
79 #define EFER_FFXSR 0x4000
80 
81 #define AMD64_TSS 9
82 
83 #define APIC_EOI_REGISTER 0xFFFFFFFFFFFE00B0ULL
84 
85 #ifndef __ASM__
86 
87 #include "intrin_i.h"
88 
89 typedef struct _KIDT_INIT
90 {
96 
97 #include <pshpack1.h>
99 {
106 #include <poppack.h>
107 
108 extern ULONG KeI386NpxPresent;
109 extern ULONG KeI386XMMIPresent;
110 extern ULONG KeI386FxsrPresent;
111 extern ULONG KeI386CpuType;
112 extern ULONG KeI386CpuStep;
113 
114 //
115 // INT3 is 1 byte long
116 //
117 #define KD_BREAKPOINT_TYPE UCHAR
118 #define KD_BREAKPOINT_SIZE sizeof(UCHAR)
119 #define KD_BREAKPOINT_VALUE 0xCC
120 
121 //
122 // One-liners for getting and setting special purpose registers in portable code
123 //
125 ULONG_PTR
127 {
128  return Context->Rip;
129 }
130 
132 VOID
134 {
135  Context->Rip = ProgramCounter;
136 }
137 
139 ULONG_PTR
141 {
142  return Context->Rax;
143 }
144 
146 VOID
148 {
149  Context->Rax = ReturnValue;
150 }
151 
153 ULONG_PTR
155 {
156  return Context->Rsp;
157 }
158 
160 ULONG_PTR
162 {
163  return Context->Rbp;
164 }
165 
167 VOID
169 {
170  Context->Rbp = Frame;
171 }
172 
174 ULONG_PTR
176 {
177  return TrapFrame->Rip;
178 }
179 
183 {
184  return (PKTRAP_FRAME)TrapFrame->TrapFrame;
185 }
186 
188 ULONG_PTR
190 {
191  return TrapFrame->Rsp;
192 }
193 
195 ULONG_PTR
197 {
198  return TrapFrame->Rbp;
199 }
200 
201 //
202 // Macro to get trap and exception frame from a thread stack
203 //
204 #define KeGetTrapFrame(Thread) \
205  (PKTRAP_FRAME)((ULONG_PTR)((Thread)->InitialStack) - \
206  sizeof(KTRAP_FRAME))
207 
208 //
209 // Macro to get context switches from the PRCB
210 // All architectures but x86 have it in the PRCB's KeContextSwitches
211 //
212 #define KeGetContextSwitches(Prcb) \
213  (Prcb->KeContextSwitches)
214 
215 //
216 // Macro to get the second level cache size field name which differs between
217 // CISC and RISC architectures, as the former has unified I/D cache
218 //
219 #define KiGetSecondLevelDCacheSize() ((PKIPCR)KeGetPcr())->SecondLevelCacheSize
220 
221 #define KeGetExceptionFrame(Thread) \
222  (PKEXCEPTION_FRAME)((ULONG_PTR)KeGetTrapFrame(Thread) - \
223  sizeof(KEXCEPTION_FRAME))
224 
225 //
226 // Returns the Interrupt State from a Trap Frame.
227 // ON = TRUE, OFF = FALSE
228 //
229 #define KeGetTrapFrameInterruptState(TrapFrame) \
230  BooleanFlagOn((TrapFrame)->EFlags, EFLAGS_INTERRUPT_MASK)
231 
232 /* Diable interrupts and return whether they were enabled before */
234 BOOLEAN
236 {
238 
239  /* Get EFLAGS and check if the interrupt bit is set */
240  Flags = __readeflags();
241 
242  /* Disable interrupts */
243  _disable();
244  return (Flags & EFLAGS_INTERRUPT_MASK) ? TRUE : FALSE;
245 }
246 
247 /* Restore previous interrupt state */
249 VOID
251 {
252  if (WereEnabled) _enable();
253 }
254 
255 //
256 // Invalidates the TLB entry for a specified address
257 //
259 VOID
261 {
262  /* Invalidate the TLB entry for this address */
263  __invlpg(Address);
264 }
265 
267 VOID
269 {
270  /* Flush the TLB by resetting CR3 */
272 }
273 
275 VOID
277  IN SIZE_T FlushSize)
278 {
279  //
280  // Always sweep the whole cache
281  //
283  UNREFERENCED_PARAMETER(FlushSize);
284  __wbinvd();
285 }
286 
288 VOID
290 {
291  /* Nothing to do */
292 }
293 
294 /* Registers an interrupt handler with an IDT vector */
296 VOID
298  IN PVOID Handler)
299 {
300  UCHAR Entry;
301  PKIDTENTRY64 Idt;
302 
303  /* Get the entry from the HAL */
305 
306  /* Now set the data */
307  Idt = &KeGetPcr()->IdtBase[Entry];
308  Idt->OffsetLow = (ULONG_PTR)Handler & 0xffff;
309  Idt->OffsetMiddle = ((ULONG_PTR)Handler >> 16) & 0xffff;
310  Idt->OffsetHigh = (ULONG_PTR)Handler >> 32;
311  Idt->Selector = KGDT64_R0_CODE;
312  Idt->IstIndex = 0;
313  Idt->Type = 0x0e;
314  Idt->Dpl = 0;
315  Idt->Present = 1;
316  Idt->Reserved0 = 0;
317  Idt->Reserved1 = 0;
318 }
319 
320 /* Returns the registered interrupt handler for a given IDT vector */
322 PVOID
324 {
325  UCHAR Entry;
326  PKIDTENTRY64 Idt;
327 
328  /* Get the entry from the HAL */
330 
331  /* Get the IDT entry */
332  Idt = &KeGetPcr()->IdtBase[Entry];
333 
334  /* Return the address */
335  return (PVOID)((ULONG64)Idt->OffsetHigh << 32 |
336  (ULONG64)Idt->OffsetMiddle << 16 |
337  (ULONG64)Idt->OffsetLow);
338 }
339 
341 VOID
343 {
344  /* Write 0 to the apic EOI register */
345  *((volatile ULONG*)APIC_EOI_REGISTER) = 0;
346 }
347 
349 VOID
351  IN PKTRAP_FRAME TrapFrame)
352 {
353  /* Make sure this is from the clock handler */
354  ASSERT(TrapFrame->ErrorCode == 0xc10c4);
355  //KeLowerIrql(Irql);
356 }
357 
359 BOOLEAN
361 {
362  /* Anything else but Ring 0 is Ring 3 */
363  return !!(TrapFrame->SegCs & MODE_MASK);
364 }
365 
366 #define Ki386PerfEnd()
367 
368 struct _KPCR;
369 
370 //VOID KiInitializeTss(IN PKTSS Tss, IN UINT64 Stack);
371 
397 
405 
411 
412 VOID
414  PKSYSTEM_ROUTINE SystemRoutine,
416  PVOID StartContext,
417  PCONTEXT Context);
418 #define KeArchInitThreadWithContext(Thread,SystemRoutine,StartRoutine,StartContext,Context) \
419  Ke386InitThreadWithContext(Thread,SystemRoutine,StartRoutine,StartContext,Context)
420 
421 #ifdef _NTOSKRNL_ /* FIXME: Move flags above to NDK instead of here */
422 VOID
423 KiThreadStartup(PKSYSTEM_ROUTINE SystemRoutine,
425  PVOID StartContext,
426  BOOLEAN UserThread,
427  KTRAP_FRAME TrapFrame);
428 #endif
429 
430 #endif /* __ASM__ */
431 
432 // HACK
433 extern NTKERNELAPI volatile KSYSTEM_TIME KeTickCount;
434 
435 // win64 uses DMA macros, this one is not defined
436 NTHALAPI
437 NTSTATUS
438 NTAPI
440  IN PADAPTER_OBJECT AdapterObject,
444 
448 {
449  return &PsGetCurrentThread()->Tcb.TrapFrame->Rsp;
450 }
451 
452 VOID
454  _Out_ PKTRAP_FRAME TrapFrame,
456  _In_ KPROCESSOR_MODE RequestorMode);
457 
458 #endif /* __NTOSKRNL_INCLUDE_INTERNAL_AMD64_KE_H */
459 
460 /* EOF */
VOID KiSetTrapContext(_Out_ PKTRAP_FRAME TrapFrame, _In_ PCONTEXT Context, _In_ KPROCESSOR_MODE RequestorMode)
struct _KI_INTERRUPT_DISPATCH_ENTRY * PKI_INTERRUPT_DISPATCH_ENTRY
VOID KiSegmentNotPresentFault(VOID)
UINT64 Rbp
Definition: ketypes.h:376
VOID KeFreeGdtSelector(ULONG Entry)
#define IN
Definition: typedefs.h:39
VOID Ki386SetProcessorFeatures(VOID)
FORCEINLINE VOID KeSetContextFrameRegister(PCONTEXT Context, ULONG_PTR Frame)
Definition: ke.h:168
UCHAR IstIndex
Definition: ke.h:93
#define MODE_MASK
Definition: orders.h:326
_Out_ PULONG NumberOfMapRegisters
Definition: halfuncs.h:209
VOID KiMcheckAbort(VOID)
FORCEINLINE PKTRAP_FRAME KiGetLinkedTrapFrame(PKTRAP_FRAME TrapFrame)
Definition: ke.h:182
struct _Entry Entry
Definition: kefuncs.h:627
VOID KiPageFault(VOID)
#define PsGetCurrentThread()
Definition: env_spec_w32.h:81
VOID KiGdtPrepareForApplicationProcessorInit(ULONG Id)
DECLSPEC_NORETURN VOID KiSwitchToBootStack(IN ULONG_PTR InitialStack)
Definition: ke.h:816
struct _KIDT_INIT * PKIDT_INIT
#define _Out_
Definition: ms_sal.h:345
#define NTHALAPI
Definition: ntoskrnl.h:40
VOID KiGeneralProtectionFault(VOID)
_In_ ULONG _In_opt_ POBJECT_ATTRIBUTES _In_opt_ HANDLE _Out_opt_ PCLIENT_ID _In_ PKSTART_ROUTINE StartRoutine
Definition: psfuncs.h:87
#define TRUE
Definition: types.h:120
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
VOID KiDivideErrorFault(VOID)
void __cdecl _enable(void)
Definition: intrin_arm.h:373
LONG NTSTATUS
Definition: precomp.h:26
ULONG KiGetFeatureBits(VOID)
Definition: cpu.c:115
VOID KiInvalidOpcodeFault(VOID)
ULONG KeI386NpxPresent
Definition: cpu.c:25
ULONG KeAllocateGdtSelector(ULONG Desc[2])
UCHAR Dpl
Definition: ke.h:92
VOID KiDebugTrapOrFault(VOID)
Definition: ke.h:289
__INTRIN_INLINE unsigned long __readcr3(void)
Definition: intrin_x86.h:1819
union _KIDTENTRY64 * IdtBase
Definition: ke.h:305
FORCEINLINE PULONG_PTR KiGetUserModeStackAddress(void)
Definition: ke.h:447
_Out_ PKIRQL Irql
Definition: csq.h:179
#define DECLSPEC_NORETURN
Definition: ntbasedef.h:176
FORCEINLINE PVOID KeQueryInterruptHandler(IN ULONG Vector)
Definition: ke.h:323
ULONG KeI386FxsrPresent
Definition: cpu.c:31
USHORT Selector
Definition: ketypes.h:471
DWORD Id
uint32_t ULONG_PTR
Definition: typedefs.h:65
UCHAR KIRQL
Definition: env_spec_w32.h:591
VOID KiBoundFault(VOID)
__INTRIN_INLINE void __writecr3(unsigned int Data)
Definition: intrin_x86.h:1795
VOID(NTAPI * PKSYSTEM_ROUTINE)(PKSTART_ROUTINE StartRoutine, PVOID StartContext)
Definition: ketypes.h:667
__INTRIN_INLINE uintptr_t __readeflags(void)
Definition: intrin_x86.h:1675
UINT32 void void ** ReturnValue
Definition: acevents.h:214
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
PVOID ServiceRoutine
Definition: ke.h:94
#define FALSE
Definition: types.h:117
KSTART_ROUTINE * PKSTART_ROUTINE
Definition: ketypes.h:487
FORCEINLINE VOID KeSetContextPc(PCONTEXT Context, ULONG_PTR ProgramCounter)
Definition: ke.h:133
VOID KiApcInterrupt(VOID)
Definition: trapc.c:229
unsigned char BOOLEAN
static WCHAR Address[46]
Definition: ping.c:68
#define _In_
Definition: ms_sal.h:308
USHORT OffsetLow
Definition: ketypes.h:470
VOID KiNpxSegmentOverrunAbort(VOID)
VOID KiIpiInterrupt(VOID)
USHORT Reserved0
Definition: ketypes.h:473
#define NTKERNELAPI
FORCEINLINE BOOLEAN KeDisableInterrupts(VOID)
Definition: ke.h:235
ULONG KeI386XMMIPresent
Definition: cpu.c:30
FORCEINLINE ULONG_PTR KeGetTrapFrameStackRegister(PKTRAP_FRAME TrapFrame)
Definition: ke.h:189
VOID KiInitializeCpuFeatures(VOID)
USHORT Type
Definition: ketypes.h:474
VOID KiDoubleFaultAbort(VOID)
UCHAR _Op_push
Definition: ke.h:101
ULONG RelativeAddress
Definition: ke.h:104
FORCEINLINE VOID KeInvalidateTlbEntry(IN PVOID Address)
Definition: ke.h:260
VOID KiNmiInterrupt(VOID)
struct _KIDT_INIT KIDT_INIT
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID * BaseAddress
Definition: mmfuncs.h:404
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
#define ASSERT(a)
Definition: mode.c:44
UCHAR _Op_jmp
Definition: ke.h:103
FORCEINLINE ULONG_PTR KeGetContextStackRegister(PCONTEXT Context)
Definition: ke.h:154
ULONG KeI386CpuType
Definition: cpu.c:22
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
Definition: fltkernel.h:2652
VOID KiGetCacheInformation(VOID)
Definition: cpu.c:204
VOID KiInvalidTssFault(VOID)
USHORT Present
Definition: ketypes.h:476
CCHAR KPROCESSOR_MODE
Definition: ketypes.h:7
PPC_QUAL void __wbinvd(void)
Definition: intrin_ppc.h:759
USHORT OffsetMiddle
Definition: ketypes.h:477
#define KGDT64_R0_CODE
Definition: ketypes.h:72
UCHAR InterruptId
Definition: ke.h:91
USHORT IstIndex
Definition: ketypes.h:472
unsigned __int64 ULONG64
Definition: imports.h:198
FORCEINLINE ULONG_PTR KeGetContextPc(PCONTEXT Context)
Definition: ke.h:126
unsigned char UCHAR
Definition: xmlstorage.h:181
VOID KiNpxNotAvailableFault(VOID)
Definition: ke.h:98
ULONG KeI386CpuStep
Definition: cpu.c:23
USHORT Dpl
Definition: ketypes.h:475
#define APIC_EOI_REGISTER
Definition: ke.h:83
VOID KiDpcInterrupt(VOID)
NTKERNELAPI volatile KSYSTEM_TIME KeTickCount
Definition: clock.c:19
VOID KiStackFault(VOID)
ULONG Reserved1
Definition: ketypes.h:479
FORCEINLINE VOID KeSetContextReturnRegister(PCONTEXT Context, ULONG_PTR ReturnValue)
Definition: ke.h:147
Definition: ke.h:89
VOID KiXmmException(VOID)
FORCEINLINE BOOLEAN KiUserTrap(IN PKTRAP_FRAME TrapFrame)
Definition: ke.h:360
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn BOOLEAN Physical 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:668
VOID Ke386InitThreadWithContext(PKTHREAD Thread, PKSYSTEM_ROUTINE SystemRoutine, PKSTART_ROUTINE StartRoutine, PVOID StartContext, PCONTEXT Context)
FORCEINLINE PKPCR KeGetPcr(VOID)
Definition: ke.h:327
FORCEINLINE VOID KiSendEOI(VOID)
Definition: ke.h:342
FORCEINLINE VOID KeRegisterInterruptHandler(IN ULONG Vector, IN PVOID Handler)
Definition: ke.h:297
FORCEINLINE ULONG_PTR KeGetTrapFramePc(PKTRAP_FRAME TrapFrame)
Definition: ke.h:175
ULONG_PTR SIZE_T
Definition: typedefs.h:80
UCHAR _Op_nop
Definition: ke.h:100
FORCEINLINE ULONG_PTR KeGetContextReturnRegister(PCONTEXT Context)
Definition: ke.h:140
VOID KiAlignmentFault(VOID)
VOID KeCreateApplicationProcessorIdleThread(ULONG Id)
FORCEINLINE ULONG_PTR KeGetContextFrameRegister(PCONTEXT Context)
Definition: ke.h:161
UINT64 Rsp
Definition: ketypes.h:390
#define FORCEINLINE
Definition: wdftypes.h:67
VOID KiBreakpointTrap(VOID)
FORCEINLINE VOID KeRestoreInterrupts(BOOLEAN WereEnabled)
Definition: ke.h:250
VOID Ki386InitializeLdt(VOID)
FORCEINLINE VOID KiRundownThread(IN PKTHREAD Thread)
Definition: ke.h:289
struct _KI_INTERRUPT_DISPATCH_ENTRY KI_INTERRUPT_DISPATCH_ENTRY
UCHAR _Vector
Definition: ke.h:102
VOID KiFloatingErrorFault(VOID)
FORCEINLINE VOID KiEndInterrupt(IN KIRQL Irql, IN PKTRAP_FRAME TrapFrame)
Definition: ke.h:350
FORCEINLINE VOID KeFlushProcessTb(VOID)
Definition: ke.h:268
__INTRIN_INLINE void __invlpg(void *Address)
Definition: intrin_x86.h:1969
UINT64 Rip
Definition: ketypes.h:383
VOID NTAPI KiThreadStartup(VOID)
Definition: thrdini.c:63
_In_ PDEVICE_OBJECT _In_ ULONG _In_ PDRIVER_CONTROL ExecutionRoutine
Definition: iofuncs.h:1397
void __cdecl _disable(void)
Definition: intrin_arm.h:365
FORCEINLINE ULONG_PTR KeGetTrapFrameFrameRegister(PKTRAP_FRAME TrapFrame)
Definition: ke.h:196
unsigned int ULONG
Definition: retypes.h:1
VOID NtEarlyInitVdm(VOID)
#define ULONG_PTR
Definition: config.h:101
uint32_t * PULONG_PTR
Definition: typedefs.h:65
DRIVER_CONTROL * PDRIVER_CONTROL
Definition: iotypes.h:215
VOID KiDebugServiceTrap(VOID)
VOID KiSetProcessorType(VOID)
Definition: cpu.c:45
VOID KiOverflowTrap(VOID)
VOID KiRaiseAssertion(VOID)
VOID KeApplicationProcessorInitDispatcher(VOID)
base of all file and directory entries
Definition: entries.h:82
UINT64 TrapFrame
Definition: ketypes.h:372
ULONG OffsetHigh
Definition: ketypes.h:478
FORCEINLINE VOID KeSweepICache(IN PVOID BaseAddress, IN SIZE_T FlushSize)
Definition: ke.h:276
#define EFLAGS_INTERRUPT_MASK
Definition: ketypes.h:126
NTHALAPI NTSTATUS NTAPI HalAllocateAdapterChannel(IN PADAPTER_OBJECT AdapterObject, IN PWAIT_CONTEXT_BLOCK Wcb, IN ULONG NumberOfMapRegisters, IN PDRIVER_CONTROL ExecutionRoutine)
Definition: dma.c:88
#define HalVectorToIDTEntry
Definition: halfuncs.h:51