8#define DISPATCH_LEVEL 2
14#define PROFILE_LEVEL 15
17#define KI_USER_SHARED_DATA 0xFFFFF78000000000ULL
18#define SharedUserData ((KUSER_SHARED_DATA * const)KI_USER_SHARED_DATA)
19#define SharedInterruptTime (KI_USER_SHARED_DATA + 0x8)
20#define SharedSystemTime (KI_USER_SHARED_DATA + 0x14)
21#define SharedTickCount (KI_USER_SHARED_DATA + 0x320)
23#define PAGE_SIZE 0x1000
26#define EFLAG_SIGN 0x8000
27#define EFLAG_ZERO 0x4000
28#define EFLAG_SELECT (EFLAG_SIGN | EFLAG_ZERO)
37#define KeQueryInterruptTime() \
38 (*(volatile ULONG64*)SharedInterruptTime)
40#define KeQuerySystemTime(CurrentCount) \
41 *(ULONG64*)(CurrentCount) = *(volatile ULONG64*)SharedSystemTime
43#define KeQueryTickCount(CurrentCount) \
44 *(ULONG64*)(CurrentCount) = *(volatile ULONG64*)SharedTickCount
46#define KeGetDcacheFillSize() 1L
48#define YieldProcessor _mm_pause
49#define MemoryBarrier __faststorefence
50#define FastFence __faststorefence
51#define LoadFence _mm_lfence
52#define MemoryFence _mm_mfence
53#define StoreFence _mm_sfence
54#define LFENCE_ACQUIRE() LoadFence()
66#define KeMemoryBarrierWithoutFence() _ReadWriteBarrier()
74 return (
KIRQL)__readcr8();
102#define KeRaiseIrql(a,b) *(b) = KfRaiseIrql(a)
130 return (
struct _KTHREAD *)__readgsqword(0x188);
159#if (NTDDI_VERSION >= NTDDI_WIN7)
164 return __readgsdword(0x1a4);
174#define KeFlushIoBuffers(_Mdl, _ReadOperation, _DmaOperation)
177#define DbgRaiseAssertionFailure __int2c
182#define PAUSE_PROCESSOR YieldProcessor();
184#define KERNEL_STACK_SIZE 0x6000
185#define KERNEL_LARGE_STACK_SIZE 0x12000
186#define KERNEL_LARGE_STACK_COMMIT KERNEL_STACK_SIZE
188#define KERNEL_MCA_EXCEPTION_STACK_SIZE 0x2000
190#define EXCEPTION_READ_FAULT 0
191#define EXCEPTION_WRITE_FAULT 1
192#define EXCEPTION_EXECUTE_FAULT 8
194#if !defined(RC_INVOKED)
196#define CONTEXT_AMD64 0x100000
198#define CONTEXT_CONTROL (CONTEXT_AMD64 | 0x1L)
199#define CONTEXT_INTEGER (CONTEXT_AMD64 | 0x2L)
200#define CONTEXT_SEGMENTS (CONTEXT_AMD64 | 0x4L)
201#define CONTEXT_FLOATING_POINT (CONTEXT_AMD64 | 0x8L)
202#define CONTEXT_DEBUG_REGISTERS (CONTEXT_AMD64 | 0x10L)
204#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_FLOATING_POINT)
205#define CONTEXT_ALL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS | CONTEXT_FLOATING_POINT | CONTEXT_DEBUG_REGISTERS)
207#define CONTEXT_XSTATE (CONTEXT_AMD64 | 0x40L)
209#define CONTEXT_EXCEPTION_ACTIVE 0x8000000
210#define CONTEXT_SERVICE_ACTIVE 0x10000000
211#define CONTEXT_EXCEPTION_REQUEST 0x40000000
212#define CONTEXT_EXCEPTION_REPORTING 0x80000000
216#define INITIAL_MXCSR 0x1f80
217#define INITIAL_FPCSR 0x027f
281 M128A VectorRegister[26];
290#define PCR_MINOR_VERSION 1
291#define PCR_MAJOR_VERSION 1
336#if (NTDDI_VERSION >= NTDDI_WIN7)
337_CRT_DEPRECATE_TEXT(
"KeGetCurrentProcessorNumber is deprecated. Use KeGetCurrentProcessorNumberEx or KeGetCurrentProcessorIndex instead.")
343 return __readgsbyte(0x184);
#define _CRT_DEPRECATE_TEXT(_Text)
#define _Kernel_float_restored_
#define _Kernel_requires_resource_held_(kind)
#define _Kernel_requires_resource_not_held_(kind)
#define _IRQL_requires_max_(irql)
#define _Kernel_releases_resource_(kind)
#define _IRQL_raises_(irql)
#define _Kernel_acquires_resource_(kind)
#define _Kernel_float_saved_
#define KeLowerIrql(oldIrql)
#define KeGetCurrentIrql()
IN OUT PLONG IN OUT PLONG Addend IN OUT PLONG IN LONG IN OUT PLONG IN LONG Increment KeRaiseIrqlToDpcLevel
KIRQL FASTCALL KfRaiseIrql(IN KIRQL NewIrql)
#define KeGetCurrentThread
#define KeSaveFloatingPointState(x)
#define KeRestoreFloatingPointState(x)
#define _At_(target, annos)
#define _Must_inspect_result_
#define _Post_satisfies_(cond)
#define DECLSPEC_ALIGN(x)
#define UNREFERENCED_PARAMETER(P)
#define _ANONYMOUS_STRUCT
XSAVE_FORMAT XMM_SAVE_AREA32
FORCEINLINE ULONG KeGetCurrentProcessorNumber(VOID)
XSAVE_FORMAT * PXMM_SAVE_AREA32
FORCEINLINE ULONG KeGetCurrentProcessorIndex(VOID)
FORCEINLINE KIRQL KeRaiseIrqlToSynchLevel(VOID)
$if(_WDMDDK_) typedef struct _KFLOATING_SAVE
FORCEINLINE VOID KeMemoryBarrier(VOID)
$endif(_WDMDDK_) $if(_NTDDK_) typedef struct _NEON128
_Requires_lock_held_ SpinLock _Releases_lock_ SpinLock _In_ _IRQL_restores_ KIRQL NewIrql
struct _KPRCB * CurrentPrcb
union _KIDTENTRY64 * IdtBase
UCHAR SecondLevelCacheAssociativity
ULONG SecondLevelCacheSize
union _KGDTENTRY64 * GdtBase
PKSPIN_LOCK_QUEUE LockArray
#define FIELD_OFFSET(t, f)
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql