[CMAKE]
[reactos.git] / include / asm / ksamd64.template.h
1
2
3 HEADER("CR0 flags"),
4 CONSTANT(CR0_PE),
5 CONSTANT(CR0_MP),
6 CONSTANT(CR0_EM),
7 CONSTANT(CR0_TS),
8 CONSTANT(CR0_ET),
9 CONSTANT(CR0_NE),
10 CONSTANT(CR0_WP),
11 CONSTANT(CR0_AM),
12 CONSTANT(CR0_NW),
13 CONSTANT(CR0_CD),
14 CONSTANT(CR0_PG),
15
16 HEADER("CR4 flags"),
17 CONSTANT(CR4_VME),
18 CONSTANT(CR4_PVI),
19 CONSTANT(CR4_TSD),
20 CONSTANT(CR4_DE),
21 CONSTANT(CR4_PSE),
22 CONSTANT(CR4_PAE),
23 CONSTANT(CR4_MCE),
24 CONSTANT(CR4_PGE),
25 CONSTANT(CR4_FXSR),
26 CONSTANT(CR4_XMMEXCPT),
27 CONSTANT(CR4_CHANNELS),
28
29 HEADER("KeFeatureBits flags"),
30 CONSTANT(KF_RDTSC),
31 CONSTANT(KF_CR4),
32 CONSTANT(KF_GLOBAL_PAGE),
33 CONSTANT(KF_LARGE_PAGE),
34 CONSTANT(KF_CMPXCHG8B),
35 CONSTANT(KF_FAST_SYSCALL),
36
37 HEADER("Machine type definitions"),
38 CONSTANT(MACHINE_TYPE_ISA),
39 CONSTANT(MACHINE_TYPE_EISA),
40 CONSTANT(MACHINE_TYPE_MCA),
41
42 #endif
43 HEADER("EFLAGS"),
44 CONSTANT(EFLAGS_TF_MASK),
45 CONSTANT(EFLAGS_TF_SHIFT),
46 CONSTANT(EFLAGS_IF_MASK),
47 CONSTANT(EFLAGS_IF_SHIFT),
48 CONSTANT(EFLAGS_ID_MASK),
49
50 HEADER("Hypervisor Enlightenment Definitions"),
51 CONSTANT(HV_MMU_USE_HYPERCALL_FOR_ADDRESS_SWITCH),
52 CONSTANT(HV_MMU_USE_HYPERCALL_FOR_LOCAL_FLUSH),
53 CONSTANT(HV_MMU_USE_HYPERCALL_FOR_REMOTE_FLUSH),
54 CONSTANT(HV_X64_MSR_APIC_EOI),
55 CONSTANT(HV_APIC_ENLIGHTENED),
56 CONSTANT(HV_KE_USE_HYPERCALL_FOR_LONG_SPIN_WAIT),
57 CONSTANT(HV_VIRTUAL_APIC_NO_EOI_REQUIRED_V),
58 CONSTANT(HvApicFlags),
59
60 HEADER("KDGT selectors"),
61 CONSTANT(KGDT64_NULL),
62 CONSTANT(KGDT64_R0_CODE),
63 CONSTANT(KGDT64_R0_DATA),
64 CONSTANT(KGDT64_R3_CMCODE),
65 CONSTANT(KGDT64_R3_DATA),
66 CONSTANT(KGDT64_R3_CODE),
67 CONSTANT(KGDT64_SYS_TSS),
68 CONSTANT(KGDT64_R3_CMTEB),
69
70 HEADER("Machine Specific Register Numbers"),
71 CONSTANT(MSR_EFER),
72 CONSTANT(MSR_STAR),
73 CONSTANT(MSR_LSTAR),
74 CONSTANT(MSR_CSTAR),
75 CONSTANT(MSR_SYSCALL_MASK),
76 CONSTANT(MSR_FS_BASE),
77 CONSTANT(MSR_GS_BASE),
78 CONSTANT(MSR_GS_SWAP),
79 CONSTANT(MSR_MCG_STATUS),
80 CONSTANT(MSR_AMD_ACCESS),
81
82 HEADER("Flags for MSR_EFER"),
83 CONSTANT(MSR_LMA),
84 CONSTANT(MSR_LME),
85 CONSTANT(MSR_SCE),
86 CONSTANT(MSR_NXE),
87 CONSTANT(MSR_PAT),
88 CONSTANT(MSR_DEGUG_CTL),
89 CONSTANT(MSR_LAST_BRANCH_FROM),
90 CONSTANT(MSR_LAST_BRANCH_TO),
91 CONSTANT(MSR_LAST_EXCEPTION_FROM),
92 CONSTANT(MSR_LAST_EXCEPTION_TO),
93
94 HEADER("Flags for MSR_DEGUG_CTL"),
95 CONSTANT(MSR_DEBUG_CTL_LBR),
96 CONSTANT(MSR_DEBUG_CRL_BTF),
97
98 #if 0
99 HEADER("Fatal exception codes"),
100 CONSTANT(EXCEPTION_DIVIDED_BY_ZERO),
101 CONSTANT(EXCEPTION_DEBUG),
102 CONSTANT(EXCEPTION_NMI),
103 CONSTANT(EXCEPTION_INT3),
104 CONSTANT(EXCEPTION_BOUND_CHECK),
105 CONSTANT(EXCEPTION_INVALID_OPCODE),
106 CONSTANT(EXCEPTION_NPX_NOT_AVAILABLE),
107 CONSTANT(EXCEPTION_DOUBLE_FAULT),
108 CONSTANT(EXCEPTION_NPX_OVERRUN),
109 CONSTANT(EXCEPTION_INVALID_TSS),
110 CONSTANT(EXCEPTION_SEGMENT_NOT_PRESENT),
111 CONSTANT(EXCEPTION_STACK_FAULT),
112 CONSTANT(EXCEPTION_GP_FAULT),
113 CONSTANT(EXCEPTION_RESERVED_TRAP),
114 CONSTANT(EXCEPTION_NPX_ERROR),
115 CONSTANT(EXCEPTION_ALIGNMENT_CHECK),
116 #endif
117
118 HEADER("Argument Home Address"),
119 OFFSET(P1Home, CONTEXT, P1Home),
120 OFFSET(P2Home, CONTEXT, P1Home),
121 OFFSET(P3Home, CONTEXT, P1Home),
122 OFFSET(P4Home, CONTEXT, P1Home),
123
124 HEADER("CONTEXT"),
125 OFFSET(CxP1Home, CONTEXT, P1Home),
126 OFFSET(CxP2Home, CONTEXT, P2Home),
127 OFFSET(CxP3Home, CONTEXT, P3Home),
128 OFFSET(CxP4Home, CONTEXT, P4Home),
129 OFFSET(CxP5Home, CONTEXT, P5Home),
130 OFFSET(CxP6Home, CONTEXT, P6Home),
131 OFFSET(CxContextFlags, CONTEXT, ContextFlags),
132 OFFSET(CxMxCsr, CONTEXT, MxCsr),
133 OFFSET(CxSegCs, CONTEXT, SegCs),
134 OFFSET(CxSegDs, CONTEXT, SegDs),
135 OFFSET(CxSegEs, CONTEXT, SegEs),
136 OFFSET(CxSegFs, CONTEXT, SegFs),
137 OFFSET(CxSegGs, CONTEXT, SegGs),
138 OFFSET(CxSegSs, CONTEXT, SegSs),
139 OFFSET(CxEFlags, CONTEXT, EFlags),
140 OFFSET(CxDr0, CONTEXT, Dr0),
141 OFFSET(CxDr1, CONTEXT, Dr1),
142 OFFSET(CxDr2, CONTEXT, Dr2),
143 OFFSET(CxDr3, CONTEXT, Dr3),
144 OFFSET(CxDr6, CONTEXT, Dr6),
145 OFFSET(CxDr7, CONTEXT, Dr7),
146 OFFSET(CxRax, CONTEXT, Rax),
147 OFFSET(CxRcx, CONTEXT, Rcx),
148 OFFSET(CxRdx, CONTEXT, Rdx),
149 OFFSET(CxRbx, CONTEXT, Rbx),
150 OFFSET(CxRsp, CONTEXT, Rsp),
151 OFFSET(CxRbp, CONTEXT, Rbp),
152 OFFSET(CxRsi, CONTEXT, Rsi),
153 OFFSET(CxRdi, CONTEXT, Rdi),
154 OFFSET(CxR8, CONTEXT, R8),
155 OFFSET(CxR9, CONTEXT, R9),
156 OFFSET(CxR10, CONTEXT, R10),
157 OFFSET(CxR11, CONTEXT, R11),
158 OFFSET(CxR12, CONTEXT, R12),
159 OFFSET(CxR13, CONTEXT, R13),
160 OFFSET(CxR14, CONTEXT, R14),
161 OFFSET(CxR15, CONTEXT, R15),
162 OFFSET(CxRip, CONTEXT, Rip),
163 OFFSET(CxFltSave, CONTEXT, FltSave),
164 OFFSET(CxXmm0, CONTEXT, Xmm0),
165 OFFSET(CxXmm1, CONTEXT, Xmm1),
166 OFFSET(CxXmm2, CONTEXT, Xmm2),
167 OFFSET(CxXmm3, CONTEXT, Xmm3),
168 OFFSET(CxXmm4, CONTEXT, Xmm4),
169 OFFSET(CxXmm5, CONTEXT, Xmm5),
170 OFFSET(CxXmm6, CONTEXT, Xmm6),
171 OFFSET(CxXmm7, CONTEXT, Xmm7),
172 OFFSET(CxXmm8, CONTEXT, Xmm8),
173 OFFSET(CxXmm9, CONTEXT, Xmm9),
174 OFFSET(CxXmm10, CONTEXT, Xmm10),
175 OFFSET(CxXmm11, CONTEXT, Xmm11),
176 OFFSET(CxXmm12, CONTEXT, Xmm12),
177 OFFSET(CxXmm13, CONTEXT, Xmm13),
178 OFFSET(CxXmm14, CONTEXT, Xmm14),
179 OFFSET(CxXmm15, CONTEXT, Xmm15),
180 OFFSET(CxDebugControl, CONTEXT, DebugControl),
181 OFFSET(CxLastBranchToRip, CONTEXT, LastBranchToRip),
182 OFFSET(CxLastBranchFromRip, CONTEXT, LastBranchFromRip),
183 OFFSET(CxLastExceptionToRip, CONTEXT, LastExceptionToRip),
184 OFFSET(CxLastExceptionFromRip, CONTEXT, LastExceptionFromRip),
185 OFFSET(CxVectorControl, CONTEXT, VectorControl),
186 OFFSET(CxVectorRegister, CONTEXT, VectorRegister),
187 SIZE(CONTEXT_FRAME_LENGTH, CONTEXT),
188
189 HEADER("DISPATCHER_CONTEXT"),
190 OFFSET(DcControlPc, TYPE, ControlPc),
191 OFFSET(DcImageBase, TYPE, ImageBase),
192 OFFSET(DcFunctionEntry, TYPE, FunctionEntry),
193 OFFSET(DcEstablisherFrame, TYPE, EstablisherFrame),
194 OFFSET(DcTargetIp, TYPE, TargetIp),
195 OFFSET(DcContextRecord, TYPE, ContextRecord),
196 OFFSET(DcLanguageHandler, TYPE, LanguageHandler),
197 OFFSET(DcHandlerData, TYPE, HandlerData),
198 OFFSET(DcHistoryTable, TYPE, HistoryTable),
199 OFFSET(DcScopeIndex, TYPE, ScopeIndex),
200
201 HEADER("KEXCEPTION_FRAME"),
202 OFFSET(ExP1Home, KEXCEPTION_FRAME, P1Home),
203 OFFSET(ExP2Home, KEXCEPTION_FRAME, P2Home),
204 OFFSET(ExP3Home, KEXCEPTION_FRAME, P3Home),
205 OFFSET(ExP4Home, KEXCEPTION_FRAME, P4Home),
206 OFFSET(ExP5, KEXCEPTION_FRAME, P5),
207 OFFSET(ExXmm6, KEXCEPTION_FRAME, Xmm6),
208 OFFSET(ExXmm7, KEXCEPTION_FRAME, Xmm7),
209 OFFSET(ExXmm8, KEXCEPTION_FRAME, Xmm8),
210 OFFSET(ExXmm9, KEXCEPTION_FRAME, Xmm9),
211 OFFSET(ExXmm10, KEXCEPTION_FRAME, Xmm10),
212 OFFSET(ExXmm11, KEXCEPTION_FRAME, Xmm11),
213 OFFSET(ExXmm12, KEXCEPTION_FRAME, Xmm12),
214 OFFSET(ExXmm13, KEXCEPTION_FRAME, Xmm13),
215 OFFSET(ExXmm14, KEXCEPTION_FRAME, Xmm14),
216 OFFSET(ExXmm15, KEXCEPTION_FRAME, Xmm15),
217 OFFSET(ExMxCsr, KEXCEPTION_FRAME, MxCsr),
218 OFFSET(ExRbp, KEXCEPTION_FRAME, Rbp),
219 OFFSET(ExRbx, KEXCEPTION_FRAME, Rbx),
220 OFFSET(ExRdi, KEXCEPTION_FRAME, Rdi),
221 OFFSET(ExRsi, KEXCEPTION_FRAME, Rsi),
222 OFFSET(ExR12, KEXCEPTION_FRAME, R12),
223 OFFSET(ExR13, KEXCEPTION_FRAME, R13),
224 OFFSET(ExR14, KEXCEPTION_FRAME, R14),
225 OFFSET(ExR15, KEXCEPTION_FRAME, R15),
226 OFFSET(ExReturn, KEXCEPTION_FRAME, Return),
227 OFFSET(CuInitialStack, KEXCEPTION_FRAME, InitialStack),
228 OFFSET(CuTrapFrame, KEXCEPTION_FRAME, TrapFrame),
229 OFFSET(CuCallbackStack, KEXCEPTION_FRAME, CallbackStack),
230 OFFSET(CuOutputBuffer, KEXCEPTION_FRAME, OutputBuffer),
231 OFFSET(CuOutputLength, KEXCEPTION_FRAME, OutputLength),
232 SIZE(KEXCEPTION_FRAME_LENGTH, KEXCEPTION_FRAME),
233
234 HEADER("JUMP_BUFFER"),
235 OFFSET(JbFrame, JUMP_BUFFER, Frame),
236 OFFSET(JbRbx, JUMP_BUFFER, Rbx),
237 OFFSET(JbRsp, JUMP_BUFFER, Rsp),
238 OFFSET(JbRbp, JUMP_BUFFER, Rbp),
239 OFFSET(JbRsi, JUMP_BUFFER, Rsi),
240 OFFSET(JbRdi, JUMP_BUFFER, Rdi),
241 OFFSET(JbR12, JUMP_BUFFER, R12),
242 OFFSET(JbR13, JUMP_BUFFER, R13),
243 OFFSET(JbR14, JUMP_BUFFER, R14),
244 OFFSET(JbR15, JUMP_BUFFER, R15),
245 OFFSET(JbRip, JUMP_BUFFER, Rip),
246 OFFSET(JbMxCsr, JUMP_BUFFER, MxCsr),
247 OFFSET(JbFpCsr, JUMP_BUFFER, FpCsr),
248 OFFSET(JbXmm6, JUMP_BUFFER, Xmm6),
249 OFFSET(JbXmm7, JUMP_BUFFER, Xmm7),
250 OFFSET(JbXmm8, JUMP_BUFFER, Xmm8),
251 OFFSET(JbXmm9, JUMP_BUFFER, Xmm9),
252 OFFSET(JbXmm10, JUMP_BUFFER, Xmm10),
253 OFFSET(JbXmm11, JUMP_BUFFER, Xmm11),
254 OFFSET(JbXmm12, JUMP_BUFFER, Xmm12),
255 OFFSET(JbXmm13, JUMP_BUFFER, Xmm13),
256 OFFSET(JbXmm14, JUMP_BUFFER, Xmm14),
257 OFFSET(JbXmm15, JUMP_BUFFER, Xmm15),
258
259 HEADER("KGDT64"),
260 OFFSET(KgdtBaseLow, KGDT64, BaseLow),
261 OFFSET(KgdtBaseMiddle, KGDT64, BaseMiddle),
262 OFFSET(KgdtBaseHigh, KGDT64, BaseHigh),
263 OFFSET(KgdtBaseUpper, KGDT64, BaseUpper),
264 OFFSET(KgdtLimitHigh, KGDT64, LimitHigh),
265 OFFSET(KgdtLimitLow, KGDT64, LimitLow),
266 CONSTANT(KGDT_LIMIT_ENCODE_MASK),
267
268 HEADER("KPRCB"),
269 OFFSET(PbMxCsr, KPRCB, MxCsr),
270 OFFSET(PbNumber, KPRCB, Number),
271 OFFSET(PbInterruptRequest, KPRCB, InterruptRequest),
272 OFFSET(PbIdleHalt, KPRCB, IdleHalt),
273 OFFSET(PbCurrentThread, KPRCB, CurrentThread),
274 OFFSET(PbNextThread, KPRCB, NextThread),
275 OFFSET(PbIdleThread, KPRCB, IdleThread),
276 OFFSET(PbNestingLevel, KPRCB, NestingLevel),
277 OFFSET(PbRspBase, KPRCB, RspBase),
278 OFFSET(PbPrcbLock, KPRCB, PrcbLock),
279 OFFSET(PbSetMember, KPRCB, SetMember),
280 OFFSET(PbProcessorState, KPRCB, ProcessorState),
281 OFFSET(PbCpuType, KPRCB, CpuType),
282 OFFSET(PbCpuID, KPRCB, CpuID),
283 OFFSET(PbCpuStep, KPRCB, CpuStep),
284 OFFSET(PbHalReserved, KPRCB, HalReserved),
285 OFFSET(PbMinorVersion, KPRCB, MinorVersion),
286 OFFSET(PbMajorVersion, KPRCB, MajorVersion),
287 OFFSET(PbBuildType, KPRCB, BuildType),
288 OFFSET(PbCpuVendor, KPRCB, CpuVendor),
289 OFFSET(PbCoresPerPhysicalProcessor, KPRCB, CoresPerPhysicalProcessor),
290 OFFSET(PbLogicalProcessorsPerCore, KPRCB, LogicalProcessorsPerCore),
291 OFFSET(PbApicMask, KPRCB, ApicMask),
292 OFFSET(PbCFlushSize, KPRCB, CFlushSize),
293 OFFSET(PbAcpiReserved, KPRCB, AcpiReserved),
294 OFFSET(PbInitialApicId, KPRCB, InitialApicId),
295 OFFSET(PbStride, KPRCB, Stride),
296 OFFSET(PbLockQueue, KPRCB, LockQueue),
297 OFFSET(PbPPLookasideList, KPRCB, PPLookasideList),
298 OFFSET(PbPPNPagedLookasideList, KPRCB, PPNPagedLookasideList),
299 OFFSET(PbPPPagedLookasideList, KPRCB, PPPagedLookasideList),
300 OFFSET(PbPacketBarrier, KPRCB, PacketBarrier),
301 OFFSET(PbDeferredReadyListHead, KPRCB, DeferredReadyListHead),
302 OFFSET(PbLookasideIrpFloat, KPRCB, LookasideIrpFloat),
303 OFFSET(PbSystemCalls, KPRCB, SystemCalls),
304 OFFSET(PbReadOperationCount, KPRCB, ReadOperationCount),
305 OFFSET(PbWriteOperationCount, KPRCB, WriteOperationCount),
306 OFFSET(PbOtherOperationCount, KPRCB, OtherOperationCount),
307 OFFSET(PbReadTransferCount, KPRCB, ReadTransferCount),
308 OFFSET(PbWriteTransferCount, KPRCB, WriteTransferCount),
309 OFFSET(PbOtherTransferCount, KPRCB, OtherTransferCount),
310 OFFSET(PbContextSwitches, KPRCB, ContextSwitches),
311 OFFSET(PbTargetSet, KPRCB, TargetSet),
312 OFFSET(PbIpiFrozen, KPRCB, IpiFrozen),
313 OFFSET(PbRequestMailbox, KPRCB, RequestMailbox),
314 OFFSET(PbSenderSummary, KPRCB, SenderSummary),
315 OFFSET(PbDpcListHead, KPRCB, DpcListHead),
316 OFFSET(PbDpcLock, KPRCB, DpcLock),
317 OFFSET(PbDpcQueueDepth, KPRCB, DpcQueueDepth),
318 OFFSET(PbDpcCount, KPRCB, DpcCount),
319 OFFSET(PbDpcStack, KPRCB, DpcStack),
320 OFFSET(PbMaximumDpcQueueDepth, KPRCB, MaximumDpcQueueDepth),
321 OFFSET(PbDpcRequestRate, KPRCB, DpcRequestRate),
322 OFFSET(PbMinimumDpcRate, KPRCB, MinimumDpcRate),
323 OFFSET(PbDpcInterruptRequested, KPRCB, DpcInterruptRequested),
324 OFFSET(PbDpcThreadRequested, KPRCB, DpcThreadRequested),
325 OFFSET(PbDpcRoutineActive, KPRCB, DpcRoutineActive),
326 OFFSET(PbDpcThreadActive, KPRCB, DpcThreadActive),
327 OFFSET(PbTimerHand, KPRCB, TimerHand),
328 OFFSET(PbTimerRequest, KPRCB, TimerRequest),
329 OFFSET(PbTickOffset, KPRCB, TickOffset),
330 OFFSET(PbMasterOffset, KPRCB, MasterOffset),
331 OFFSET(PbDpcLastCount, KPRCB, DpcLastCount),
332 OFFSET(PbQuantumEnd, KPRCB, QuantumEnd),
333 OFFSET(PbDpcSetEventRequest, KPRCB, DpcSetEventRequest),
334 OFFSET(PbIdleSchedule, KPRCB, IdleSchedule),
335 OFFSET(PbReadySummary, KPRCB, ReadySummary),
336 OFFSET(PbDispatcherReadyListHead, KPRCB, DispatcherReadyListHead),
337 OFFSET(PbInterruptCount, KPRCB, InterruptCount),
338 OFFSET(PbKernelTime, KPRCB, KernelTime),
339 OFFSET(PbUserTime, KPRCB, UserTime),
340 OFFSET(PbDpcTime, KPRCB, DpcTime),
341 OFFSET(PbInterruptTime, KPRCB, InterruptTime),
342 OFFSET(PbAdjustDpcThreshold, KPRCB, AdjustDpcThreshold),
343 OFFSET(PbSkipTick, KPRCB, SkipTick),
344 OFFSET(PbPollSlot, KPRCB, PollSlot),
345 OFFSET(PbParentNode, KPRCB, ParentNode),
346 OFFSET(PbMultiThreadProcessorSet, KPRCB, MultiThreadProcessorSet),
347 OFFSET(PbMultiThreadSetMaster, KPRCB, MultiThreadSetMaster),
348 OFFSET(PbStartCycles, KPRCB, StartCycles),
349 OFFSET(PbPageColor, KPRCB, PageColor),
350 OFFSET(PbNodeColor, KPRCB, NodeColor),
351 OFFSET(PbNodeShiftedColor, KPRCB,NodeShiftedColor),
352 OFFSET(PbSecondaryColorMask, KPRCB, SecondaryColorMask),
353 OFFSET(PbSleeping, KPRCB, Sleeping),
354 OFFSET(PbCycleTime, KPRCB, CycleTime),
355 OFFSET(PbFastReadNoWait, KPRCB, FastReadNoWait),
356 OFFSET(PbFastReadWait, KPRCB, FastReadWait),
357 OFFSET(PbFastReadNotPossible, KPRCB, FastReadNotPossible),
358 OFFSET(PbCopyReadNoWait, KPRCB, CopyReadNoWait),
359 OFFSET(PbCopyReadWait, KPRCB, CopyReadWait),
360 OFFSET(PbCopyReadNoWaitMiss, KPRCB, CopyReadNoWaitMiss),
361 OFFSET(PbAlignmentFixupCount, KPRCB, AlignmentFixupCount),
362 OFFSET(PbExceptionDispatchCount, KPRCB, ExceptionDispatchCount),
363 OFFSET(PbVendorString, KPRCB, VendorString),
364 OFFSET(PbPowerState, KPRCB, PowerState),
365 SIZE(ProcessorBlockLength, KPRCB),
366
367 HEADER("KPCR"),
368 OFFSET(PcGdt, KPCR, Gdt),
369 OFFSET(PcTss, KPCR, Tss),
370 OFFSET(PcUserRsp, KPCR, UserRsp),
371 OFFSET(PcSelf, KPCR, Self),
372 OFFSET(PcCurrentPrcb, KPCR, CurrentPrcb),
373 OFFSET(PcLockArray, KPCR, LockArray),
374 OFFSET(PcTeb, KPCR, Teb),
375 OFFSET(PcIdt, KPCR, Idt),
376 OFFSET(PcIrql, KPCR, Irql),
377 OFFSET(PcStallScaleFactor, KPCR, StallScaleFactor),
378 OFFSET(PcHalReserved, KPCR, HalReserved),
379 OFFSET(PcPrcb, KPCR, Prcb),
380 OFFSET(PcMxCsr, KPCR, MxCsr),
381 OFFSET(PcNumber, KPCR, Number),
382 OFFSET(PcInterruptRequest, KPCR, InterruptRequest),
383 OFFSET(PcIdleHalt, KPCR, IdleHalt),
384 OFFSET(PcCurrentThread, KPCR, CurrentThread),
385 OFFSET(PcNextThread, KPCR, NextThread),
386 OFFSET(PcIdleThread, KPCR, IdleThread),
387 OFFSET(PcIpiFrozen, KPCR, IpiFrozen),
388 OFFSET(PcNestingLevel, KPCR, NestingLevel),
389 OFFSET(PcRspBase, KPCR, RspBase),
390 OFFSET(PcPrcbLock, KPCR, PrcbLock),
391 OFFSET(PcSetMember, KPCR, SetMember),
392 OFFSET(PcCr0, KPCR, Cr0),
393 OFFSET(PcCr2, KPCR, Cr2),
394 OFFSET(PcCr3, KPCR, Cr3),
395 OFFSET(PcCr4, KPCR, Cr4),
396 OFFSET(PcKernelDr0, KPCR, KernelDr0),
397 OFFSET(PcKernelDr1, KPCR, KernelDr1),
398 OFFSET(PcKernelDr2, KPCR, KernelDr2),
399 OFFSET(PcKernelDr3, KPCR, KernelDr3),
400 OFFSET(PcKernelDr7, KPCR, KernelDr7),
401 OFFSET(PcGdtrLimit, KPCR, GdtrLimit),
402 OFFSET(PcGdtrBase, KPCR, GdtrBase),
403 OFFSET(PcIdtrLimit, KPCR, IdtrLimit),
404 OFFSET(PcIdtrBase, KPCR, IdtrBase),
405 OFFSET(PcTr, KPCR, Tr),
406 OFFSET(PcLdtr, KPCR, Ldtr),
407 OFFSET(PcDebugControl, KPCR, DebugControl),
408 OFFSET(PcLastBranchToRip, KPCR, LastBranchToRip),
409 OFFSET(PcLastBranchFromRip, KPCR, LastBranchFromRip),
410 OFFSET(PcLastExceptionToRip, KPCR, LastExceptionToRip),
411 OFFSET(PcLastExceptionFromRip, KPCR, LastExceptionFromRip),
412 OFFSET(PcCr8, KPCR, Cr8),
413 OFFSET(PcCpuType, KPCR, CpuType),
414 OFFSET(PcCpuID, KPCR, CpuID),
415 OFFSET(PcCpuStep, KPCR, CpuStep),
416 OFFSET(PcCpuVendor, KPCR, CpuVendor),
417 OFFSET(PcVirtualApicAssist, KPCR, VirtualApicAssist),
418 OFFSET(PcCFlushSize, KPCR, CFlushSize),
419 OFFSET(PcDeferredReadyListHead, KPCR, DeferredReadyListHead),
420 OFFSET(PcSystemCalls, KPCR, SystemCalls),
421 OFFSET(PcDpcRoutineActive, KPCR, DpcRoutineActive),
422 OFFSET(PcInterruptCount, KPCR, InterruptCount),
423 OFFSET(PcDebuggerSavedIRQL, KPCR, DebuggerSavedIRQL),
424 OFFSET(PcTickOffset, KPCR, TickOffset),
425 OFFSET(PcMasterOffset, KPCR, MasterOffset),
426 OFFSET(PcSkipTick, KPCR, SkipTick),
427 OFFSET(PcStartCycles, KPCR, StartCycles),
428 SIZE(ProcessorControlRegisterLength, KPCR),
429
430 HEADER("KPROCESSOR_STATE"),
431 OFFSET(PsSpecialRegisters, KPROCESSOR_STATE, SpecialRegisters),
432 OFFSET(PsCr0, KPROCESSOR_STATE, Cr0),
433 OFFSET(PsCr2, KPROCESSOR_STATE, Cr2),
434 OFFSET(PsCr3, KPROCESSOR_STATE, Cr3),
435 OFFSET(PsCr4, KPROCESSOR_STATE, Cr4),
436 OFFSET(PsKernelDr0, KPROCESSOR_STATE, KernelDr0),
437 OFFSET(PsKernelDr1, KPROCESSOR_STATE, KernelDr1),
438 OFFSET(PsKernelDr2, KPROCESSOR_STATE, KernelDr2),
439 OFFSET(PsKernelDr3, KPROCESSOR_STATE, KernelDr3),
440 OFFSET(PsKernelDr6, KPROCESSOR_STATE, KernelDr6),
441 OFFSET(PsKernelDr7, KPROCESSOR_STATE, KernelDr7),
442 OFFSET(PsGdtr, KPROCESSOR_STATE, Gdtr),
443 OFFSET(PsIdtr, KPROCESSOR_STATE, Idtr),
444 OFFSET(PsTr, KPROCESSOR_STATE, Tr),
445 OFFSET(PsLdtr, KPROCESSOR_STATE, Ldtr),
446 OFFSET(PsMxCsr, KPROCESSOR_STATE, MxCsr),
447 OFFSET(PsContextFrame, KPROCESSOR_STATE, ContextFrame),
448 OFFSET(PsDebugControl, KPROCESSOR_STATE, DebugControl),
449 OFFSET(PsLastBranchToRip, KPROCESSOR_STATE, LastBranchToRip),
450 OFFSET(PsLastBranchFromRip, KPROCESSOR_STATE, LastBranchFromRip),
451 OFFSET(PsLastExceptionToRip, KPROCESSOR_STATE, LastExceptionToRip),
452 OFFSET(PsLastExceptionFromRip, KPROCESSOR_STATE, LastExceptionFromRip),
453 OFFSET(PsCr8, KPROCESSOR_STATE, Cr8),
454 SIZE(ProcessorStateLength, KPROCESSOR_STATE),
455
456 HEADER("KSTART_FRAME"),
457 OFFSET(SfP1Home, KSTART_FRAME, P1Home),
458 OFFSET(SfP2Home, KSTART_FRAME, P2Home),
459 OFFSET(SfP3Home, KSTART_FRAME, P3Home),
460 OFFSET(SfP4Home, KSTART_FRAME, P4Home),
461 OFFSET(SfReturn, KSTART_FRAME, Return),
462 SIZE(KSTART_FRAME_LENGTH, KSTART_FRAME),
463
464 HEADER("KSPECIAL_REGISTERS"),
465 OFFSET(SrKernelDr0, KSPECIAL_REGISTERS, KernelDr0),
466 OFFSET(SrKernelDr1, KSPECIAL_REGISTERS, KernelDr1),
467 OFFSET(SrKernelDr2, KSPECIAL_REGISTERS, KernelDr2),
468 OFFSET(SrKernelDr3, KSPECIAL_REGISTERS, KernelDr3),
469 OFFSET(SrKernelDr6, KSPECIAL_REGISTERS, KernelDr6),
470 OFFSET(SrKernelDr7, KSPECIAL_REGISTERS, KernelDr7),
471 OFFSET(SrGdtr, KSPECIAL_REGISTERS, Gdtr),
472 OFFSET(SrIdtr, KSPECIAL_REGISTERS, Idtr),
473 OFFSET(SrTr, KSPECIAL_REGISTERS, Tr),
474 OFFSET(SrMxCsr, KSPECIAL_REGISTERS, MxCsr),
475 OFFSET(SrMsrGsBase, KSPECIAL_REGISTERS, MsrGsBase),
476 OFFSET(SrMsrGsSwap, KSPECIAL_REGISTERS, MsrGsSwap),
477 OFFSET(SrMsrStar, KSPECIAL_REGISTERS, MsrStar),
478 OFFSET(SrMsrLStar, KSPECIAL_REGISTERS, MsrLStar),
479 OFFSET(SrMsrCStar, KSPECIAL_REGISTERS, MsrCStar),
480 OFFSET(SrMsrSyscallMask, KSPECIAL_REGISTERS, MsrSyscallMask),
481
482 HEADER("KSYSTEM_TIME"),
483 OFFSET(StLowTime, KSYSTEM_TIME, LowTime),
484 OFFSET(StHigh1Time, KSYSTEM_TIME, High1Time),
485 OFFSET(StHigh2Time, KSYSTEM_TIME, High2Time),
486
487 HEADER("KSWITCH_FRAME"),
488 OFFSET(SwP5Home, KSWITCH_FRAME, P5Home),
489 OFFSET(SwApcBypass, KSWITCH_FRAME, ApcBypass),
490 OFFSET(SwRbp, KSWITCH_FRAME, Rbp),
491 OFFSET(SwReturn, KSWITCH_FRAME, Return),
492 SIZE(SwitchFrameLength, KSWITCH_FRAME),
493 SIZE(KSWITCH_FRAME_LENGTH, KSWITCH_FRAME),
494
495 HEADER("KTRAP_FRAME"),
496 OFFSET(TrP1Home, KTRAP_FRAME, P1Home),
497 OFFSET(TrP2Home, KTRAP_FRAME, P2Home),
498 OFFSET(TrP3Home, KTRAP_FRAME, P3Home),
499 OFFSET(TrP4Home, KTRAP_FRAME, P4Home),
500 OFFSET(TrP5, KTRAP_FRAME, P5),
501 OFFSET(TrPreviousMode, KTRAP_FRAME, PreviousMode),
502 OFFSET(TrPreviousIrql, KTRAP_FRAME, PreviousIrql),
503 OFFSET(TrFaultIndicator, KTRAP_FRAME, FaultIndicator),
504 OFFSET(TrExceptionActive, KTRAP_FRAME, ExceptionActive),
505 OFFSET(TrMxCsr, KTRAP_FRAME, MxCsr),
506 OFFSET(TrRax, KTRAP_FRAME, Rax),
507 OFFSET(TrRcx, KTRAP_FRAME, Rcx),
508 OFFSET(TrRdx, KTRAP_FRAME, Rdx),
509 OFFSET(TrR8, KTRAP_FRAME, R8),
510 OFFSET(TrR9, KTRAP_FRAME, R9),
511 OFFSET(TrR10, KTRAP_FRAME, R10),
512 OFFSET(TrR11, KTRAP_FRAME, R11),
513 OFFSET(TrGsBase, KTRAP_FRAME, GsBase),
514 OFFSET(TrGsSwap, KTRAP_FRAME,GsSwap),
515 OFFSET(TrXmm0, KTRAP_FRAME, Xmm0),
516 OFFSET(TrXmm1, KTRAP_FRAME, Xmm1),
517 OFFSET(TrXmm2, KTRAP_FRAME, Xmm2),
518 OFFSET(TrXmm3, KTRAP_FRAME, Xmm3),
519 OFFSET(TrXmm4, KTRAP_FRAME, Xmm4),
520 OFFSET(TrXmm5, KTRAP_FRAME, Xmm5),
521 OFFSET(TrFaultAddress, KTRAP_FRAME, FaultAddress),
522 OFFSET(TrTimeStampCKCL, KTRAP_FRAME, TimeStampCKCL),
523 OFFSET(TrDr0, KTRAP_FRAME, Dr0),
524 OFFSET(TrDr1, KTRAP_FRAME, Dr1),
525 OFFSET(TrDr2, KTRAP_FRAME, Dr2),
526 OFFSET(TrDr3, KTRAP_FRAME, Dr3),
527 OFFSET(TrDr6, KTRAP_FRAME, Dr6),
528 OFFSET(TrDr7, KTRAP_FRAME, Dr7),
529 OFFSET(TrDebugControl, KTRAP_FRAME, DebugControl),
530 OFFSET(TrLastBranchToRip, KTRAP_FRAME, LastBranchToRip),
531 OFFSET(TrLastBranchFromRip, KTRAP_FRAME, LastBranchFromRip),
532 OFFSET(TrLastExceptionToRip, KTRAP_FRAME, LastExceptionToRip),
533 OFFSET(TrLastExceptionFromRip, KTRAP_FRAME, LastExceptionFromRip),
534 OFFSET(TrLastBranchControl, KTRAP_FRAME, LastBranchControl),
535 OFFSET(TrLastBranchMSR, KTRAP_FRAME, LastBranchMSR),
536 OFFSET(TrSegDs, KTRAP_FRAME, SegDs),
537 OFFSET(TrSegEs, KTRAP_FRAME, SegEs),
538 OFFSET(TrSegFs, KTRAP_FRAME, SegFs),
539 OFFSET(TrSegGs, KTRAP_FRAME, SegGs),
540 OFFSET(TrTrapFrame, KTRAP_FRAME, TrapFrame),
541 OFFSET(TrRbx, KTRAP_FRAME, Rbx),
542 OFFSET(TrRdi, KTRAP_FRAME, Rdi),
543 OFFSET(TrRsi, KTRAP_FRAME, Rsi),
544 OFFSET(TrRbp, KTRAP_FRAME, Rbp),
545 OFFSET(TrErrorCode, KTRAP_FRAME, ErrorCode),
546 OFFSET(TrTimeStampKlog, KTRAP_FRAME, TimeStampKlog),
547 OFFSET(TrRip, KTRAP_FRAME, Rip),
548 OFFSET(TrSegCs, KTRAP_FRAME, SegCs),
549 OFFSET(TrLogging, KTRAP_FRAME, Logging),
550 OFFSET(TrEFlags, KTRAP_FRAME, EFlags),
551 OFFSET(TrRsp, KTRAP_FRAME, Rsp),
552 OFFSET(TrSegSs, KTRAP_FRAME, SegSs),
553 OFFSET(TrCodePatchCycle, KTRAP_FRAME, CodePatchCycle),
554 SIZE(KTRAP_FRAME_LENGTH, KTRAP_FRAME),
555
556 HEADER("KTIMER_TABLE"),
557 OFFSET(TtEntry, KTIMER_TABLE, TimerEntries),
558 OFFSET(TtTime, KTIMER_TABLE, Time),
559 SIZE(TIMER_ENTRY_SIZE, KTIMER_ENTRY),
560 SIZE(TIMER_TABLE_SIZE, KTIMER_TABLE),
561 SIZE(KTIMER_TABLE_SIZE, KTIMER_TABLE),
562
563 HEADER("KTSS"),
564 OFFSET(TssRsp0, TYPE, Rsp0),
565 OFFSET(TssRsp1, TYPE, Rsp1),
566 OFFSET(TssRsp2, TYPE, Rsp2),
567 OFFSET(TssPanicStack, TYPE, PanicStack),
568 OFFSET(TssMcaStack, TYPE, McaStack),
569 OFFSET(TssNmiStack, TYPE, NmiStack),
570 OFFSET(TssIoMapBase, TYPE, IoMapBase),
571 SIZE(TssLength, TYPE),
572