ReactOS 0.4.16-dev-122-g325d74c
ksarm.template.h
Go to the documentation of this file.
1
2RAW(""),
3RAW("#include <kxarm.h>"),
4RAW(""),
5
6HEADER("CPSR Values"),
16
17CONSTANT(CPSRF_N), // 0x80000000
18CONSTANT(CPSRF_Z), // 0x40000000
19CONSTANT(CPSRF_C), // 0x20000000
20CONSTANT(CPSRF_V), // 0x10000000
21CONSTANT(CPSRF_Q), // 0x8000000
22CONSTANT(CPSR_IT_MASK), // 0x600fc00
23
24CONSTANT(FPSCRF_N), // 0x80000000
25CONSTANT(FPSCRF_Z), // 0x40000000
26CONSTANT(FPSCRF_C), // 0x20000000
27CONSTANT(FPSCRF_V), // 0x10000000
28CONSTANT(FPSCRF_QC), // 0x8000000
29
30CONSTANT(FPSCRM_AHP), // 0x4000000
31CONSTANT(FPSCRM_DN), // 0x2000000
32CONSTANT(FPSCRM_FZ), // 0x1000000
39
52
56
63
73
80
81HEADER("DebugService Control Types"),
82//CONSTANT(BREAKPOINT_HW_SYNCH_WATCH), // 0x6
83//CONSTANT(BREAKPOINT_HW_ASYNCH_WATCH), // 0x7
84//CONSTANT(BREAKPOINT_HW_BREAK), // 0x8
85
86// Handle table entry definition (FIXME: since win10, portable?)
87#if (NTDDI_VERSION >= NTDDI_WIN10)
88HEADER("Handle table entry definition"),
89#define EXHANDLE_TABLE_ENTRY_LOCK 0x1
90#define EXHANDLE_REFERENCE_SHIFT 0x1b
91#define EXHANDLE_REF_ACQUIRE_LOCK 0xffffffff
92#define EXHANDLE_REPLENISH_REFS 0x8
93#define EXHANDLE_CACHED_REFS 0x1f
94#endif
95
96HEADER("Other constants"),
98//CONSTANT(PTE_TOP),
99//CONSTANT(TRANSITION_ASID),
101//CONSTANT(KI_EXCEPTION_HARDWARE_ERROR), // 0x10000005
102
103HEADER("CONTEXT Offsets"),
104OFFSET(CxContextFlags, CONTEXT, ContextFlags), // 0x0
105OFFSET(CxR0, CONTEXT, R0), // 0x4
106OFFSET(CxR1, CONTEXT, R1), // 0x8
107OFFSET(CxR2, CONTEXT, R2), // 0xc
108OFFSET(CxR3, CONTEXT, R3), // 0x10
109OFFSET(CxR4, CONTEXT, R4), // 0x14
110OFFSET(CxR5, CONTEXT, R5), // 0x18
111OFFSET(CxR6, CONTEXT, R6), // 0x1c
112OFFSET(CxR7, CONTEXT, R7), // 0x20
113OFFSET(CxR8, CONTEXT, R8), // 0x24
114OFFSET(CxR9, CONTEXT, R9), // 0x28
115OFFSET(CxR10, CONTEXT, R10), // 0x2c
116OFFSET(CxR11, CONTEXT, R11), // 0x30
117OFFSET(CxR12, CONTEXT, R12), // 0x34
118OFFSET(CxSp, CONTEXT, Sp), // 0x38
119OFFSET(CxLr, CONTEXT, Lr), // 0x3c
120OFFSET(CxPc, CONTEXT, Pc), // 0x40
121OFFSET(CxCpsr, CONTEXT, Cpsr), // 0x44
122OFFSET(CxFpscr, CONTEXT, Fpscr), // 0x48
123OFFSET(CxQ, CONTEXT, Q), // 0x50
124OFFSET(CxD, CONTEXT, D), // 0x50
125OFFSET(CxS, CONTEXT, S), // 0x50
126OFFSET(CxD8, CONTEXT, D[8]), // 0x90
127OFFSET(CxBvr, CONTEXT, Bvr), // 0x150
128OFFSET(CxBcr, CONTEXT, Bcr), // 0x170
129OFFSET(CxWvr, CONTEXT, Wvr), // 0x190
130OFFSET(CxWcr, CONTEXT, Wcr), // 0x194
132//CONSTANT(CONTEXT_ALIGN, __alignof(CONTEXT)),
133
134HEADER("_JUMP_BUFFER offsets"),
135OFFSET(JbFrame, _JUMP_BUFFER, Frame), // 0x0
136OFFSET(JbR4, _JUMP_BUFFER, R4), // 0x4
137OFFSET(JbR5, _JUMP_BUFFER, R5), // 0x8
138OFFSET(JbR6, _JUMP_BUFFER, R6), // 0xc
139OFFSET(JbR7, _JUMP_BUFFER, R7), // 0x10
140OFFSET(JbR8, _JUMP_BUFFER, R8), // 0x14
141OFFSET(JbR9, _JUMP_BUFFER, R9), // 0x18
142OFFSET(JbR10, _JUMP_BUFFER, R10), // 0x1c
143OFFSET(JbR11, _JUMP_BUFFER, R11), // 0x20
144OFFSET(JbSp, _JUMP_BUFFER, Sp), // 0x24
145OFFSET(JbPc, _JUMP_BUFFER, Pc), // 0x28
146OFFSET(JbFpscr, _JUMP_BUFFER, Fpscr), // 0x2c
147OFFSET(JbD, _JUMP_BUFFER, D), // 0x30
148
149HEADER("DISPATCHER_CONTEXT offsets"),
150OFFSET(DcControlPc, DISPATCHER_CONTEXT, ControlPc), // 0x0
151OFFSET(DcImageBase, DISPATCHER_CONTEXT, ImageBase), // 0x4
152OFFSET(DcFunctionEntry, DISPATCHER_CONTEXT, FunctionEntry), // 0x8
153OFFSET(DcEstablisherFrame, DISPATCHER_CONTEXT, EstablisherFrame), // 0xc
154OFFSET(DcTargetPc, DISPATCHER_CONTEXT, TargetPc), // 0x10
155OFFSET(DcContextRecord, DISPATCHER_CONTEXT, ContextRecord), // 0x14
156OFFSET(DcLanguageHandler, DISPATCHER_CONTEXT, LanguageHandler), // 0x18
157OFFSET(DcHandlerData, DISPATCHER_CONTEXT, HandlerData), // 0x1c
158OFFSET(DcHistoryTable, DISPATCHER_CONTEXT, HistoryTable), // 0x20
159OFFSET(DcScopeIndex, DISPATCHER_CONTEXT, ScopeIndex), // 0x24
160OFFSET(DcControlPcIsUnwound, DISPATCHER_CONTEXT, ControlPcIsUnwound), // 0x28
161OFFSET(DcNonVolatileRegisters, DISPATCHER_CONTEXT, NonVolatileRegisters), // 0x2c
162OFFSET(DcReserved, DISPATCHER_CONTEXT, Reserved), // 0x30
163
164HEADER("Trap Frame offsets"),
165OFFSET(TrArg3, KTRAP_FRAME, Arg3), // 0x0
166OFFSET(TrFaultStatus, KTRAP_FRAME, FaultStatus), // 0x4
167OFFSET(TrFaultAddress, KTRAP_FRAME, FaultAddress), // 0x8
168OFFSET(TrTrapFrame, KTRAP_FRAME, TrapFrame), // 0x8
169OFFSET(TrReserved, KTRAP_FRAME, Reserved), // 0xc
170OFFSET(TrExceptionActive, KTRAP_FRAME, ExceptionActive), // 0x10
171OFFSET(TrPreviousMode, KTRAP_FRAME, PreviousMode), // 0x13
172OFFSET(TrDebugRegistersValid, KTRAP_FRAME, DebugRegistersValid), // 0x12
173OFFSET(TrBvr, KTRAP_FRAME, Bvr), // 0x18
174OFFSET(TrBcr, KTRAP_FRAME, Bcr), // 0x38
175OFFSET(TrWvr, KTRAP_FRAME, Wvr), // 0x58
176OFFSET(TrWcr, KTRAP_FRAME, Wcr), // 0x5c
177OFFSET(TrVfpState, KTRAP_FRAME, VfpState), // 0x14
178OFFSET(TrR0, KTRAP_FRAME, R0), // 0x60
179OFFSET(TrR1, KTRAP_FRAME, R1), // 0x64
180OFFSET(TrR2, KTRAP_FRAME, R2), // 0x68
181OFFSET(TrR3, KTRAP_FRAME, R3), // 0x6c
182OFFSET(TrR12, KTRAP_FRAME, R12), // 0x70
183OFFSET(TrSp, KTRAP_FRAME, Sp), // 0x74
184OFFSET(TrLr, KTRAP_FRAME, Lr), // 0x78
185OFFSET(TrR11, KTRAP_FRAME, R11), // 0x7c
186OFFSET(TrPc, KTRAP_FRAME, Pc), // 0x80
187OFFSET(TrCpsr, KTRAP_FRAME, Cpsr), // 0x84
189
190HEADER("KEXCEPTION_FRAME offsets"),
191OFFSET(ExParam5, KEXCEPTION_FRAME, Param5), // 0x0
192OFFSET(ExTrapFrame, KEXCEPTION_FRAME, TrapFrame), // 0x4
193OFFSET(ExR4, KEXCEPTION_FRAME, R4), // 0x14
194OFFSET(ExR5, KEXCEPTION_FRAME, R5), // 0x18
195OFFSET(ExR6, KEXCEPTION_FRAME, R6), // 0x1c
196OFFSET(ExR7, KEXCEPTION_FRAME, R7), // 0x20
197OFFSET(ExR8, KEXCEPTION_FRAME, R8), // 0x24
198OFFSET(ExR9, KEXCEPTION_FRAME, R9), // 0x28
199OFFSET(ExR10, KEXCEPTION_FRAME, R10), // 0x2c
200OFFSET(ExR11, KEXCEPTION_FRAME, R11), // 0x30
201OFFSET(ExReturn, KEXCEPTION_FRAME, Return), // 0x34
202SIZE(KEXCEPTION_FRAME_LENGTH, KEXCEPTION_FRAME), // 0x38
203
204HEADER("KSPECIAL_REGISTERS offsets"),
205OFFSET(KsCp15_Cr13_UsrRW, KSPECIAL_REGISTERS, Cp15_Cr13_UsrRW), // 0x1c
206OFFSET(KsCp15_Cr13_UsrRO, KSPECIAL_REGISTERS, Cp15_Cr13_UsrRO), // 0x20
207OFFSET(KsCp15_Cr13_SvcRW, KSPECIAL_REGISTERS, Cp15_Cr13_SvcRW), // 0x24
208OFFSET(KsKernelBvr, KSPECIAL_REGISTERS, KernelBvr), // 0x28
209OFFSET(KsKernelBcr, KSPECIAL_REGISTERS, KernelBcr), // 0x48
210OFFSET(KsKernelWcr, KSPECIAL_REGISTERS, KernelWcr), // 0x6c
211OFFSET(KsFpexc, KSPECIAL_REGISTERS, Fpexc), // 0x70
212OFFSET(KsFpinst, KSPECIAL_REGISTERS, Fpinst), // 0x74
213OFFSET(KsFpinst2, KSPECIAL_REGISTERS, Fpinst2), // 0x78
214OFFSET(KsUserSp, KSPECIAL_REGISTERS, UserSp), // 0x7c
215OFFSET(KsUserLr, KSPECIAL_REGISTERS, UserLr), // 0x80
216OFFSET(KsAbortSp, KSPECIAL_REGISTERS, AbortSp), // 0x84
217OFFSET(KsAbortLr, KSPECIAL_REGISTERS, AbortLr), // 0x88
218OFFSET(KsAbortSpsr, KSPECIAL_REGISTERS, AbortSpsr), // 0x8c
219OFFSET(KsUdfSp, KSPECIAL_REGISTERS, UdfSp), // 0x90
220OFFSET(KsUdfLr, KSPECIAL_REGISTERS, UdfLr), // 0x94
221OFFSET(KsUdfSpsr, KSPECIAL_REGISTERS, UdfSpsr), // 0x98
222OFFSET(KsIrqSp, KSPECIAL_REGISTERS, IrqSp), // 0x9c
223OFFSET(KsIrqLr, KSPECIAL_REGISTERS, IrqLr), // 0xa0
224OFFSET(KsIrqSpsr, KSPECIAL_REGISTERS, IrqSpsr), // 0xa4
225
226HEADER("KPROCESSOR_STATE offsets"),
227OFFSET(PsSpecialRegisters, KPROCESSOR_STATE, SpecialRegisters), // 0x0
228OFFSET(PsUsrRW, KPROCESSOR_STATE, SpecialRegisters.Cp15_Cr13_UsrRW), // 0x1c
229OFFSET(PsUsrRO, KPROCESSOR_STATE, SpecialRegisters.Cp15_Cr13_UsrRO), // 0x20
230OFFSET(PsSvcRW, KPROCESSOR_STATE, SpecialRegisters.Cp15_Cr13_SvcRW), // 0x24
231OFFSET(PsArchState, KPROCESSOR_STATE, ArchState), // 0xa8
232OFFSET(PsCpuid, KPROCESSOR_STATE, ArchState.Cp15_Cr0_CpuId), // 0xa8
233OFFSET(PsControl, KPROCESSOR_STATE, ArchState.Cp15_Cr1_Control), // 0xac
234OFFSET(PsAuxControl, KPROCESSOR_STATE, ArchState.Cp15_Cr1_AuxControl), // 0xb0
235OFFSET(PsCpacr, KPROCESSOR_STATE, ArchState.Cp15_Cr1_Cpacr), // 0xb4
236OFFSET(PsTtbControl, KPROCESSOR_STATE, ArchState.Cp15_Cr2_TtbControl), // 0xb8
237OFFSET(PsTtb0, KPROCESSOR_STATE, ArchState.Cp15_Cr2_Ttb0), // 0xbc
238OFFSET(PsTtb1, KPROCESSOR_STATE, ArchState.Cp15_Cr2_Ttb1), // 0xc0
239OFFSET(PsDacr, KPROCESSOR_STATE, ArchState.Cp15_Cr3_Dacr), // 0xc4
240OFFSET(PsPrimaryMemoryRemap, KPROCESSOR_STATE, ArchState.Cp15_Cr10_PrimaryMemoryRemap), // 0x1ec
241OFFSET(PsNormalMemoryRemap, KPROCESSOR_STATE, ArchState.Cp15_Cr10_NormalMemoryRemap), // 0x1f0
242OFFSET(PsVBARns, KPROCESSOR_STATE, ArchState.Cp15_Cr12_VBARns), // 0x1f4
243OFFSET(PsAsid, KPROCESSOR_STATE, ArchState.Cp15_Cr13_ContextId), // 0x1f8
244OFFSET(PsContextId, KPROCESSOR_STATE, ArchState.Cp15_Cr13_ContextId), // 0x1f8
245OFFSET(PsContextFrame, KPROCESSOR_STATE, ContextFrame), // 0x200
246SIZE(ProcessorStateLength, KPROCESSOR_STATE), // 0x3a0
247
248HEADER("KARM_ARCH_STATE offsets"),
249OFFSET(AaCp15_Cr0_CpuId, KARM_ARCH_STATE, Cp15_Cr0_CpuId), // 0x0
250OFFSET(AaCp15_Cr1_Control, KARM_ARCH_STATE, Cp15_Cr1_Control), // 0x4
251OFFSET(AaCp15_Cr1_AuxControl, KARM_ARCH_STATE, Cp15_Cr1_AuxControl), // 0x8
252OFFSET(AaCp15_Cr1_Cpacr, KARM_ARCH_STATE, Cp15_Cr1_Cpacr), // 0xc
253OFFSET(AaCp15_Cr2_TtbControl, KARM_ARCH_STATE, Cp15_Cr2_TtbControl), // 0x10
254OFFSET(AaCp15_Cr2_Ttb0, KARM_ARCH_STATE, Cp15_Cr2_Ttb0), // 0x14
255OFFSET(AaCp15_Cr2_Ttb1, KARM_ARCH_STATE, Cp15_Cr2_Ttb1), // 0x18
256OFFSET(AaCp15_Cr3_Dacr, KARM_ARCH_STATE, Cp15_Cr3_Dacr), // 0x1c
257OFFSET(AaCp15_Cr5_Dfsr, KARM_ARCH_STATE, Cp15_Cr5_Dfsr), // 0x20
258OFFSET(AaCp15_Cr5_Ifsr, KARM_ARCH_STATE, Cp15_Cr5_Ifsr), // 0x24
259OFFSET(AaCp15_Cr6_Dfar, KARM_ARCH_STATE, Cp15_Cr6_Dfar), // 0x28
260OFFSET(AaCp15_Cr6_Ifar, KARM_ARCH_STATE, Cp15_Cr6_Ifar), // 0x2c
261OFFSET(AaCp15_Cr9_PmControl, KARM_ARCH_STATE, Cp15_Cr9_PmControl), // 0x30
262OFFSET(AaCp15_Cr9_PmCountEnableSet, KARM_ARCH_STATE, Cp15_Cr9_PmCountEnableSet), // 0x34
263OFFSET(AaCp15_Cr9_PmCycleCounter, KARM_ARCH_STATE, Cp15_Cr9_PmCycleCounter), // 0x38
264OFFSET(AaCp15_Cr9_PmEventCounter, KARM_ARCH_STATE, Cp15_Cr9_PmEventCounter), // 0x3c
265OFFSET(AaCp15_Cr9_PmEventType, KARM_ARCH_STATE, Cp15_Cr9_PmEventType), // 0xb8
266OFFSET(AaCp15_Cr9_PmInterruptSelect, KARM_ARCH_STATE, Cp15_Cr9_PmInterruptSelect), // 0x134
267OFFSET(AaCp15_Cr9_PmOverflowStatus, KARM_ARCH_STATE, Cp15_Cr9_PmOverflowStatus), // 0x138
268OFFSET(AaCp15_Cr9_PmSelect, KARM_ARCH_STATE, Cp15_Cr9_PmSelect), // 0x13c
269OFFSET(AaCp15_Cr9_PmUserEnable, KARM_ARCH_STATE, Cp15_Cr9_PmUserEnable), // 0x140
270OFFSET(AaCp15_Cr10_PrimaryMemoryRemap, KARM_ARCH_STATE, Cp15_Cr10_PrimaryMemoryRemap), // 0x144
271OFFSET(AaCp15_Cr10_NormalMemoryRemap, KARM_ARCH_STATE, Cp15_Cr10_NormalMemoryRemap), // 0x148
272OFFSET(AaCp15_Cr12_VBARns, KARM_ARCH_STATE, Cp15_Cr12_VBARns), // 0x14c
273OFFSET(AaCp15_Cr13_ContextId, KARM_ARCH_STATE, Cp15_Cr13_ContextId), // 0x150
274
275HEADER("KSTART_FRAME offsets"),
276OFFSET(SfR0, KSTART_FRAME, R0), // 0x0
277OFFSET(SfR1, KSTART_FRAME, R1), // 0x4
278OFFSET(SfR2, KSTART_FRAME, R2), // 0x8
279OFFSET(SfReturn, KSTART_FRAME, Return), // 0xc
280SIZE(KSTART_FRAME_LENGTH, KSTART_FRAME), // 0x10
281
282HEADER("KSWITCH_FRAME offsets"),
283OFFSET(SwApcBypass, KSWITCH_FRAME, ApcBypass), // 0x0
284OFFSET(SwR11, KSWITCH_FRAME, R11), // 0x8
285OFFSET(SwReturn, KSWITCH_FRAME, Return), // 0xc
286SIZE(KSWITCH_FRAME_LENGTH, KSWITCH_FRAME), // 0x10
287
288HEADER("MACHINE_FRAME offsets"),
289OFFSET(MfSp, MACHINE_FRAME, Sp), // 0x0
290OFFSET(MfPc, MACHINE_FRAME, Pc), // 0x4
291SIZE(MachineFrameLength, MACHINE_FRAME), // 0x8
292
293HEADER("KARM_VFP_STATE offsets"),
294OFFSET(VsLink, KARM_VFP_STATE, Link), // 0x0
295OFFSET(VsFpscr, KARM_VFP_STATE, Fpscr), // 0x4
296OFFSET(VsVfpD, KARM_VFP_STATE, VfpD), // 0x10
297OFFSET(VsVfpD8, KARM_VFP_STATE, VfpD[8]), // 0x50
298SIZE(VFP_STATE_LENGTH, KARM_VFP_STATE), // 0x110
299
300HEADER("KARM_MINI_STACK offsets"),
301OFFSET(MsPc, KARM_MINI_STACK, Pc), // 0x0
302OFFSET(MsCpsr, KARM_MINI_STACK, Cpsr), // 0x4
303OFFSET(MsR4, KARM_MINI_STACK, R4), // 0x8
304OFFSET(MsR5, KARM_MINI_STACK, R5), // 0xc
305OFFSET(MsR6, KARM_MINI_STACK, R6), // 0x10
306OFFSET(MsR7, KARM_MINI_STACK, R7), // 0x14
307OFFSET(MsReserved, KARM_MINI_STACK, Reserved), // 0x18
308SIZE(MiniStackLength, KARM_MINI_STACK), // 0x20
309
310HEADER("KPCR offsets"),
311OFFSET(PcSelf, KIPCR, Self), // 0xc
312OFFSET(PcCurrentPrcb, KIPCR, CurrentPrcb), // 0x10
313OFFSET(PcLockArray, KIPCR, LockArray), // 0x14
314OFFSET(PcTeb, KIPCR, Used_Self), // 0x18
315OFFSET(PcStallScaleFactor, KIPCR, StallScaleFactor), // 0x30
316OFFSET(PcHalReserved, KIPCR, HalReserved), // 0x84
317OFFSET(PcPrcb, KIPCR, Prcb), // 0x580
318OFFSET(PcIdleHalt, KIPCR, Prcb.IdleHalt), // 0x582
319OFFSET(PcCurrentThread, KIPCR, Prcb.CurrentThread), // 0x584
320OFFSET(PcNextThread, KIPCR, Prcb.NextThread), // 0x588
321OFFSET(PcIdleThread, KIPCR, Prcb.IdleThread), // 0x58c
322OFFSET(PcNestingLevel, KIPCR, Prcb.NestingLevel), // 0x590
323OFFSET(PcNumber, KIPCR, Prcb.Number), // 0x594
324OFFSET(PcPrcbLock, KIPCR, Prcb.PrcbLock), // 0x598
325OFFSET(PcGroupSetMember, KIPCR, Prcb.GroupSetMember), // 0x998
326OFFSET(PcFeatureBits, KIPCR, Prcb.FeatureBits), // 0xa8c
327OFFSET(PcDeferredReadyListHead, KIPCR, Prcb.DeferredReadyListHead), // 0xb84
328OFFSET(PcSystemCalls, KIPCR, Prcb.KeSystemCalls), // 0xbb0
329OFFSET(PcSpBase, KIPCR, Prcb.SpBase), // 0xc44
330OFFSET(PcDpcRoutineActive, KIPCR, Prcb.DpcRoutineActive), // 0xc5a
331OFFSET(PcInterruptCount, KIPCR, Prcb.InterruptCount), // 0xe80
332OFFSET(PcSkipTick, KIPCR, Prcb.SkipTick), // 0xe98
333OFFSET(PcDebuggerSavedIRQL, KIPCR, Prcb.DebuggerSavedIRQL), // 0xe99
334OFFSET(PcStartCycles, KIPCR, Prcb.StartCycles), // 0xec8
335OFFSET(PcCycleCounterHigh, KIPCR, Prcb.CycleCounterHigh), // 0xed8
336SIZE(ProcessorControlRegisterLength, KIPCR), // 0x5b80
337
338HEADER("KPRCB offsets"),
339OFFSET(PbIdleHalt, KPRCB, IdleHalt), // 0x2
340OFFSET(PbCurrentThread, KPRCB, CurrentThread), // 0x4
341OFFSET(PbNextThread, KPRCB, NextThread), // 0x8
342OFFSET(PbIdleThread, KPRCB, IdleThread), // 0xc
343OFFSET(PbNestingLevel, KPRCB, NestingLevel), // 0x10
344OFFSET(PbNumber, KPRCB, Number), // 0x14
345OFFSET(PbPrcbLock, KPRCB, PrcbLock), // 0x18
346OFFSET(PbPriorityState, KPRCB, PriorityState), // 0x1c
347OFFSET(PbProcessorState, KPRCB, ProcessorState), // 0x20
348OFFSET(PbHalReserved, KPRCB, HalReserved), // 0x3d0
349OFFSET(PbMinorVersion, KPRCB, MinorVersion), // 0x40c
350OFFSET(PbMajorVersion, KPRCB, MajorVersion), // 0x40e
351OFFSET(PbBuildType, KPRCB, BuildType), // 0x410
352OFFSET(PbCoresPerPhysicalProcessor, KPRCB, CoresPerPhysicalProcessor), // 0x412
353OFFSET(PbLogicalProcessorsPerCore, KPRCB, LogicalProcessorsPerCore), // 0x413
354OFFSET(PbGroup, KPRCB, Group), // 0x41c
355OFFSET(PbGroupIndex, KPRCB, GroupIndex), // 0x41d
356OFFSET(PbLockQueue, KPRCB, LockQueue), // 0x480
357OFFSET(PbProcessorVendorString, KPRCB, ProcessorVendorString), // 0x508
358OFFSET(PbFeatureBits, KPRCB, FeatureBits), // 0x50c
359OFFSET(PbPPLookasideList, KPRCB, PPLookasideList), // 0x580
360OFFSET(PbPacketBarrier, KPRCB, PacketBarrier), // 0x600
361OFFSET(PbDeferredReadyListHead, KPRCB, DeferredReadyListHead), // 0x604
362OFFSET(PbSystemCalls, KPRCB, KeSystemCalls), // 0x630
363OFFSET(PbContextSwitches, KPRCB, KeContextSwitches), // 0x634
364OFFSET(PbFastReadNoWait, KPRCB, CcFastReadNoWait), // 0x638
365OFFSET(PbFastReadWait, KPRCB, CcFastReadWait), // 0x63c
366OFFSET(PbFastReadNotPossible, KPRCB, CcFastReadNotPossible), // 0x640
367OFFSET(PbCopyReadNoWait, KPRCB, CcCopyReadNoWait), // 0x644
368OFFSET(PbCopyReadWait, KPRCB, CcCopyReadWait), // 0x648
369OFFSET(PbCopyReadNoWaitMiss, KPRCB, CcCopyReadNoWaitMiss), // 0x64c
370OFFSET(PbLookasideIrpFloat, KPRCB, LookasideIrpFloat), // 0x650
371OFFSET(PbReadOperationCount, KPRCB, IoReadOperationCount), // 0x654
372OFFSET(PbWriteOperationCount, KPRCB, IoWriteOperationCount), // 0x658
373OFFSET(PbOtherOperationCount, KPRCB, IoOtherOperationCount), // 0x65c
374OFFSET(PbReadTransferCount, KPRCB, IoReadTransferCount), // 0x660
375OFFSET(PbWriteTransferCount, KPRCB, IoWriteTransferCount), // 0x668
376OFFSET(PbOtherTransferCount, KPRCB, IoOtherTransferCount), // 0x670
377OFFSET(PbMailbox, KPRCB, Mailbox), // 0x680
378OFFSET(PbIpiFrozen, KPRCB, IpiFrozen), // 0x688
379#if (NTDDI_VERSION >= NTDDI_LONGHORN)
380OFFSET(PbDpcList, KPRCB, DpcData[0].DpcList), // 0x690
381#else
382OFFSET(PbDpcListHead, KPRCB, DpcData[0].DpcListHead), // 0x690
383#endif
384OFFSET(PbDpcLock, KPRCB, DpcData[0].DpcLock), // 0x698
385OFFSET(PbDpcCount, KPRCB, DpcData[0].DpcCount), // 0x6a0
386OFFSET(PbDpcStack, KPRCB, DpcStack), // 0x6c0
387OFFSET(PbSpBase, KPRCB, SpBase), // 0x6c4
388OFFSET(PbMaximumDpcQueueDepth, KPRCB, MaximumDpcQueueDepth), // 0x6c8
389OFFSET(PbDpcRequestRate, KPRCB, DpcRequestRate), // 0x6cc
390OFFSET(PbMinimumDpcRate, KPRCB, MinimumDpcRate), // 0x6d0
391OFFSET(PbDpcLastCount, KPRCB, DpcLastCount), // 0x6d4
392OFFSET(PbQuantumEnd, KPRCB, QuantumEnd), // 0x6d9
393OFFSET(PbDpcRoutineActive, KPRCB, DpcRoutineActive), // 0x6da
394OFFSET(PbIdleSchedule, KPRCB, IdleSchedule), // 0x6db
395#if (NTDDI_VERSION >= NTDDI_WIN8)
396OFFSET(PbDpcRequestSummary, KPRCB, DpcRequestSummary), // 0x6dc
397OFFSET(PbNormalDpcState, KPRCB, NormalDpcState), // 0x6dc
398OFFSET(PbDpcGate, KPRCB, DpcGate), // 0x700
399#else
400OFFSET(PbDpcSetEventRequest, KPRCB, DpcSetEventRequest), // 0x700
401OFFSET(PbDpcEvent, KPRCB, DpcEvent), // 0x700
402#endif
403OFFSET(PbKeSpinLockOrdering, KPRCB, KeSpinLockOrdering), // 0x744
404OFFSET(PbWaitListHead, KPRCB, WaitListHead), // 0x780
405OFFSET(PbDispatcherReadyListHead, KPRCB, DispatcherReadyListHead), // 0x800
406OFFSET(PbInterruptCount, KPRCB, InterruptCount), // 0x900
407OFFSET(PbKernelTime, KPRCB, KernelTime), // 0x904
408OFFSET(PbUserTime, KPRCB, UserTime), // 0x908
409OFFSET(PbDpcTime, KPRCB, DpcTime), // 0x90c
410OFFSET(PbInterruptTime, KPRCB, InterruptTime), // 0x910
411OFFSET(PbAdjustDpcThreshold, KPRCB, AdjustDpcThreshold), // 0x914
412OFFSET(PbExceptionDispatchCount, KPRCB, KeExceptionDispatchCount), // 0x934
413OFFSET(PbParentNode, KPRCB, ParentNode), // 0x938
414OFFSET(PbStartCycles, KPRCB, StartCycles), // 0x948
415OFFSET(PbCycleCounterHigh, KPRCB, CycleCounterHigh), // 0x958
416#if (NTDDI_VERSION >= NTDDI_WIN8)
417OFFSET(PbEntropyCount, KPRCB, EntropyTimingState.EntropyCount), // 0x960
418OFFSET(PbEntropyBuffer, KPRCB, EntropyTimingState.Buffer), // 0x964
419#endif /* (NTDDI_VERSION >= NTDDI_WIN8) */
420OFFSET(PbPageColor, KPRCB, PageColor), // 0xa8c
421OFFSET(PbNodeColor, KPRCB, NodeColor), // 0xa90
422OFFSET(PbNodeShiftedColor, KPRCB, NodeShiftedColor), // 0xa94
423OFFSET(PbSecondaryColorMask, KPRCB, SecondaryColorMask), // 0xa98
424OFFSET(PbCycleTime, KPRCB, CycleTime), // 0xaa0
425OFFSET(PbCcFastMdlReadNoWait, KPRCB, CcFastMdlReadNoWait), // 0xb00
426OFFSET(PbPowerState, KPRCB, PowerState), // 0xb80
427OFFSET(PbAlignmentFixupCount, KPRCB, KeAlignmentFixupCount), // 0xd14
428OFFSET(PbSpinLockAcquireCount, KPRCB, SynchCounters.SpinLockAcquireCount), // 0xe80
429OFFSET(PbFiqMiniStack, KPRCB, FiqMiniStack), // 0xf50
430OFFSET(PbIrqMiniStack, KPRCB, IrqMiniStack), // 0xf70
431OFFSET(PbUdfMiniStack, KPRCB, UdfMiniStack), // 0xf90
432OFFSET(PbAbtMiniStack, KPRCB, AbtMiniStack), // 0xfb0
433OFFSET(PbPanicMiniStack, KPRCB, PanicMiniStack), // 0xfd0
434OFFSET(PbPanicStackBase, KPRCB, PanicStackBase), // 0xff0
435OFFSET(PbPPNPagedLookasideList, KPRCB, PPNPagedLookasideList), // 0x3200
436OFFSET(PbPPPagedLookasideList, KPRCB, PPPagedLookasideList), // 0x3b00
437//OFFSET(PbRequestMailbox, KPRCB, RequestMailbox), // 0x4600
438
439HEADER("UCALLOUT_FRAME offsets (yes, Cu/Ck is confusing...)"),
442OFFSET(CkApiNumber, UCALLOUT_FRAME, ApiNumber),
443OFFSET(CkPc, UCALLOUT_FRAME, MachineFrame.Pc),
444OFFSET(CkSp, UCALLOUT_FRAME, MachineFrame.Sp),
445SIZE(CalloutFrameLength, UCALLOUT_FRAME),
446
447HEADER("KCALLOUT_FRAME offsets (yes, Cu/Ck is confusing...)"),
448OFFSET(CuTrapFrame, KCALLOUT_FRAME, TrapFrame),
450OFFSET(CuOutputLength, KCALLOUT_FRAME, OutputLength),
451
452// Processor Idle Times Offset Definitions
453//#define PiStartTime 0x0
454//#define PiEndTime 0x8
455
456//#define DBGDSCR_MON_EN_BIT 0x8000
457//#define KF_VFP_32REG 0x10
458//#define KI_SPINLOCK_ORDER_PRCB_LOCK 0x40
459//#define THREAD_FLAGS_CYCLE_PROFILING 0x1
460//#define THREAD_FLAGS_CYCLE_PROFILING_LOCK_BIT 0x10
461//#define THREAD_FLAGS_CYCLE_PROFILING_LOCK 0x10000
462//#define THREAD_FLAGS_COUNTER_PROFILING 0x2
463//#define THREAD_FLAGS_COUNTER_PROFILING_LOCK_BIT 0x11
464//#define THREAD_FLAGS_COUNTER_PROFILING_LOCK 0x20000
465//#define THREAD_FLAGS_GROUP_SCHEDULING 0x4
466//#define THREAD_FLAGS_AFFINITY_SET 0x8
467//#define THREAD_FLAGS_ACCOUNTING_CSWITCH 0x6
468//#define THREAD_FLAGS_ACCOUNTING_ANY 0xe
469//#define KTHREAD_AUTO_ALIGNMENT_BIT 0x0
470//#define KTHREAD_GUI_THREAD_MASK 0x40
471//#define KTHREAD_SYSTEM_THREAD_BIT 0xb
472//#define KTHREAD_QUEUE_DEFER_PREEMPTION_BIT 0xa
473//#define DEBUG_ACTIVE_DBG 0x1
474//#define DEBUG_ACTIVE_DBG_INSTRUMENTED 0x3
475//#define DEBUG_ACTIVE_INSTRUMENTED 0x2
476//CONSTANT(DEBUG_ACTIVE_MINIMAL_THREAD),
477
478//#define ARM_VFP_MANAGEMENT 0x1
479//#define ARM_VFP_ENABLE_STATISTICS 0x0
480//#define ARM_VFP_ALWAYSON 0x0
481//#define ARM_VFP_LAZY_ONEWAY 0x1
482//#define ARM_VFP_LAZY_WITH_DEMOTION 0x2
483#define TRAP_TYPE_INTERRUPT 0x1
484#define TRAP_TYPE_SYSCALL 0x2
485#define TRAP_TYPE_UNDEFINED 0x3
486#define TRAP_TYPE_DATA_ABORT 0x4
487#define TRAP_TYPE_PREFETCH_ABORT 0x5
488#define TRAP_TYPE_RESET 0x6
489#define TRAP_TYPE_FIQ 0x7
490#define THUMB_BREAKPOINT 0xdefe
491#define THUMB_DEBUG_SERVICE 0xdefd
492#define THUMB_ASSERT 0xdefc
493#define THUMB_FASTFAIL 0xdefb
494#define THUMB_READ_CYCLES 0xdefa
495#define THUMB_DIVIDE_BY_0 0xdef9
496#define ARM_EXCEPTION_VECTOR 0xffff0000 // obsolete in win10
497#define KI_DPC_INTERRUPT_FLAGS 0x2f // amd64 as well
498#define KI_EXCEPTION_HARDWARE_ERROR 0x10000005
499#define KTRAP_FRAME_ARGUMENTS 0x38
500#define ARM_RED_ZONE_BYTES 0x8
502#define FAST_FAIL_DEPRECATED_SERVICE_INVOKED 0x1b // since win10
503
504#define CP14_DBGBCR_MISMATCH_BIT 0x400000
505#define CP14_DBGBCR_ENABLE_BIT 0x1
506
507#define CP15_CPACR_D32DIS 0x80000000
508#define CP15_CPACR_ASEDIS 0x40000000
509#define CP15_CPACR_VFP_MASK 0xf00000
510#define CPVFP_FPEXC_EX 0x80000000
511#define CPVFP_FPEXC_EN 0x40000000
512#define CPVFP_FPEXC_DEX 0x20000000
513#define CPVFP_FPEXC_FP2V 0x10000000
514
515#define CP15_CR0_HARVARD_CACHE 0x1000000
516#define CP15_xFSR_FS_HIGH 0x400
517#define CP15_xFSR_FS_LOW 0xf
518#define CP15_DFSR_WnR 0x800
519
520#define CP15_SCTLR_I 0x1000
521#define CP15_SCTLR_C 0x4
522#define CP15_SCTLR_M 0x1
523#define CP15_SCTLR_Z 0x800
524#define CP15_SCTLR_TR 0x10000000 // obsolete in win10
525#define CP15_THREAD_RESERVED_MASK 0x3f
526
527// Processor Start Block Offset Definitions
528#define PsbSelfMap 0x0
529#define PsbTiledTtb0 0x4
530#define ProcessorStartBlockLength 0x8
531
532// Processor Parked Page Offset Definitions
533#define PppArchitecturalStateVirtualAddress 0x10
534#define PppArchitecturalState 0x18
535#define PppDcacheFlushSavedRegisters 0x3b8 // obsolete in win10
536#define ProcessorParkedPageLength 0x1000
537
538#define TlThread 0x0
539#define TlCpuNumber 0x4
540#define TlTrapType 0x5
541#define TlPadding 0x6
542#define TlR0 0x8
543#define TlR1 0xc
544#define TlR2 0x10
545#define TlR3 0x14
546#define TlR12 0x18
547#define TlSp 0x1c
548#define TlLr 0x20
549#define TlR11 0x24
550#define TlPc 0x28
551#define TlCpsr 0x2c
552
553// DPC stack
554#define DpSp 0x8
555#define DpPc 0xc
556
557// also amd64
558#define KEXCEPTION_ACTIVE_INTERRUPT_FRAME 0x0
559#define KEXCEPTION_ACTIVE_EXCEPTION_FRAME 0x1
560#define KEXCEPTION_ACTIVE_SERVICE_FRAME 0x2
561
static volatile LONG DpcCount
Definition: KeDpc.c:15
@ R12
Definition: amd64_sup.c:13
@ R9
Definition: amd64_sup.c:13
@ R8
Definition: amd64_sup.c:13
@ R11
Definition: amd64_sup.c:13
@ R10
Definition: amd64_sup.c:13
#define D(d)
Definition: builtin.c:4557
Definition: bufpool.h:45
#define SIZE
Definition: consume.c:5
#define PAGE_SHIFT
Definition: env_spec_w32.h:45
ULONG MajorVersion
Definition: ros_glue.cpp:4
ULONG MinorVersion
Definition: ros_glue.cpp:5
#define HEADER(x)
Definition: genincdata.c:50
#define RAW(x)
Definition: genincdata.c:42
#define CONSTANT(name)
Definition: genincdata.c:43
ULONG IoWriteOperationCount
Definition: iomgr.c:41
LARGE_INTEGER IoReadTransferCount
Definition: iomgr.c:40
LARGE_INTEGER IoWriteTransferCount
Definition: iomgr.c:42
ULONG IoOtherOperationCount
Definition: iomgr.c:43
LARGE_INTEGER IoOtherTransferCount
Definition: iomgr.c:44
ULONG IoReadOperationCount
Definition: iomgr.c:39
ULONG Sp
Definition: kdb_expr.c:99
#define KTRAP_FRAME_LENGTH
Definition: asm.h:126
#define SWFS_ALIGN_FAULT
Definition: ketypes.h:237
#define CPSRM_USER
Definition: ketypes.h:186
#define CP14_DBGDSCR_MOE_BP
Definition: ketypes.h:246
#define SWFS_PAGE_FAULT
Definition: ketypes.h:236
#define FPSCRM_RMODE_RN
Definition: ketypes.h:213
#define FPSCRF_N
Definition: ketypes.h:203
#define CPSRM_INT
Definition: ketypes.h:188
#define CPSRM_MASK
Definition: ketypes.h:193
#define FPSCRM_DN
Definition: ketypes.h:210
#define FPSCR_IXE
Definition: ketypes.h:220
#define SWFS_EXECUTE
Definition: ketypes.h:240
#define FPSCRF_QC
Definition: ketypes.h:207
#define FPSCRM_DEPRECATED
Definition: ketypes.h:217
#define FPSCR_OFE
Definition: ketypes.h:222
#define CP14_DBGDSCR_MOE_EXTERNAL
Definition: ketypes.h:249
#define FPSCRF_V
Definition: ketypes.h:206
#define CPSRM_UDF
Definition: ketypes.h:191
#define FPSCR_IDC
Definition: ketypes.h:225
#define CP14_DBGDSCR_MOE_WPASYNC
Definition: ketypes.h:247
#define CP15_PMCR_DP
Definition: ketypes.h:253
#define CPSR_IT_MASK
Definition: ketypes.h:201
#define CP14_DBGDSCR_MOE_VECTOR
Definition: ketypes.h:250
#define CPSRF_Z
Definition: ketypes.h:197
#define FPSCRM_RMODE_RM
Definition: ketypes.h:215
#define SWFS_HWERR_FAULT
Definition: ketypes.h:238
#define FPSCR_DZC
Definition: ketypes.h:229
#define CP15_PMCR_CNT_RST
Definition: ketypes.h:257
#define CPSRC_ABORT
Definition: ketypes.h:233
#define CPSRF_V
Definition: ketypes.h:199
#define FPSCRF_Z
Definition: ketypes.h:204
#define FPSCRM_AHP
Definition: ketypes.h:209
#define FPSCR_IDE
Definition: ketypes.h:219
#define FPSCRM_RMODE_RP
Definition: ketypes.h:214
#define SYSCALL_PSR
Definition: ketypes.h:194
#define FPSCRF_C
Definition: ketypes.h:205
#define CPSRM_SYS
Definition: ketypes.h:192
#define CP15_PMCR_CLKCNT_DIV
Definition: ketypes.h:255
#define CP14_DBGDSCR_MOE_HALT
Definition: ketypes.h:245
#define SWFS_DEBUG_FAULT
Definition: ketypes.h:239
#define CP15_PMCR_X
Definition: ketypes.h:254
#define CP15_PMCR_ENABLE
Definition: ketypes.h:258
#define CPSRM_ABT
Definition: ketypes.h:190
#define FPSCRM_RMODE_MASK
Definition: ketypes.h:212
#define FPSCR_DZE
Definition: ketypes.h:223
#define CPSRF_Q
Definition: ketypes.h:200
#define FPSCRM_RMODE_RZ
Definition: ketypes.h:216
#define CP14_DBGDSCR_MOE_BKPT
Definition: ketypes.h:248
#define FPSCR_IOC
Definition: ketypes.h:230
#define FPSCR_OFC
Definition: ketypes.h:228
#define FPSCR_IOE
Definition: ketypes.h:224
#define CP14_DBGDSCR_MOE_MASK
Definition: ketypes.h:243
#define FPSCRM_FZ
Definition: ketypes.h:211
#define SWFS_WRITE
Definition: ketypes.h:241
#define CP14_DBGDSCR_MOE_SHIFT
Definition: ketypes.h:244
#define CPSRF_N
Definition: ketypes.h:196
#define FPSCR_UFE
Definition: ketypes.h:221
#define CPSRC_THUMB
Definition: ketypes.h:234
#define FPSCR_IXC
Definition: ketypes.h:226
#define CPSRM_SVC
Definition: ketypes.h:189
#define CPSRM_FIQ
Definition: ketypes.h:187
#define CP14_DBGDSCR_MOE_WPSYNC
Definition: ketypes.h:251
#define CP15_PMCR_CLKCNT_RST
Definition: ketypes.h:256
#define CPSRF_C
Definition: ketypes.h:198
#define FPSCR_UFC
Definition: ketypes.h:227
#define CPSRC_INT
Definition: ketypes.h:232
#define CONTEXT_FRAME_LENGTH
Definition: asm.h:366
#define KI_EXCEPTION_INTERNAL
Definition: ketypes.h:143
_In_opt_ PSID Group
Definition: rtlfuncs.h:1658
_IRQL_requires_same_ _In_ PVOID EstablisherFrame
Definition: ntbasedef.h:653
_IRQL_requires_same_ _In_ PVOID _Inout_ struct _CONTEXT * ContextRecord
Definition: ntbasedef.h:654
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
ULONG CcFastReadNoWait
Definition: copysup.c:23
ULONG CcFastReadNotPossible
Definition: copysup.c:21
ULONG CcFastReadWait
Definition: copysup.c:22
_In_opt_ PENTER_STATE_SYSTEM_HANDLER _In_opt_ PVOID _In_ LONG _In_opt_ LONG volatile * Number
Definition: ntpoapi.h:207
#define R1(v, w, x, y, z, i)
Definition: sha1.c:36
#define R2(v, w, x, y, z, i)
Definition: sha1.c:37
#define R0(v, w, x, y, z, i)
Definition: sha1.c:35
#define R3(v, w, x, y, z, i)
Definition: sha1.c:38
#define R4(v, w, x, y, z, i)
Definition: sha1.c:39
ULONG BuildType
Definition: main.c:25
@ DpcLock
Definition: storport.h:485
Definition: movable.cpp:9
UCHAR Number
Definition: ketypes.h:820
#define OFFSET
Definition: vbltest.c:24
static int Link(const char **args)
Definition: vfdcmd.c:2414
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ WDF_DEVICE_POWER_STATE PowerState
Definition: wdfdevice.h:3034
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR OutputBuffer
Definition: wdfiotarget.h:863
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
_Out_ PULONG UserTime
Definition: kefuncs.h:759
#define PF_ARM_EXTERNAL_CACHE_AVAILABLE
Definition: ketypes.h:150
_In_ KPROCESSOR_MODE PreviousMode
Definition: sefuncs.h:103