ReactOS  0.4.15-dev-4917-g934e521
ketypes.h
Go to the documentation of this file.
1 
2 
3 #ifndef _ARM64_KETYPES_H
4 #define _ARM64_KETYPES_H
5 
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
9 
10 /* Interrupt request levels */
11 #define PASSIVE_LEVEL 0
12 #define LOW_LEVEL 0
13 #define APC_LEVEL 1
14 #define DISPATCH_LEVEL 2
15 #define CMCI_LEVEL 5
16 #define CLOCK_LEVEL 13
17 #define IPI_LEVEL 14
18 #define DRS_LEVEL 14
19 #define POWER_LEVEL 14
20 #define PROFILE_LEVEL 15
21 #define HIGH_LEVEL 15
22 
23 //
24 // IPI Types
25 //
26 #define IPI_APC 1
27 #define IPI_DPC 2
28 #define IPI_FREEZE 4
29 #define IPI_PACKET_READY 6
30 #define IPI_SYNCH_REQUEST 16
31 
32 //
33 // PRCB Flags
34 //
35 #define PRCB_MAJOR_VERSION 1
36 #define PRCB_BUILD_DEBUG 1
37 #define PRCB_BUILD_UNIPROCESSOR 2
38 
39 //
40 // No LDTs on ARM64
41 //
42 #define LDT_ENTRY ULONG
43 
44 
45 //
46 // HAL Variables
47 //
48 #define INITIAL_STALL_COUNT 100
49 #define MM_HAL_VA_START 0xFFFFFFFFFFC00000ULL
50 #define MM_HAL_VA_END 0xFFFFFFFFFFFFFFFFULL
51 
52 //
53 // Structure for CPUID info
54 //
55 typedef union _CPU_INFO
56 {
59 
60 typedef struct _KTRAP_FRAME
61 {
65  union
66  {
67  struct
68  {
71  };
72  };
74  union
75  {
76  struct
77  {
80  };
81  };
82  //struct PKARM64_VFP_STATE VfpState;
84  ULONG Bcr[8];
86  ULONG Wcr[2];
91  union
92  {
93  ULONG64 X[19];
94  struct
95  {
115  };
116  };
121 
122 typedef struct _KEXCEPTION_FRAME
123 {
126 
127 #ifndef NTOS_MODE_USER
128 
129 typedef struct _TRAPFRAME_LOG_ENTRY
130 {
152 
153 //
154 // Processor Region Control Block
155 // Based on WoA
156 //
157 typedef struct _KPRCB
158 {
160 } KPRCB, *PKPRCB;
161 
162 //
163 // Processor Control Region
164 // Based on WoA
165 //
166 typedef struct _KIPCR
167 {
168  union
169  {
170  struct
171  {
172  ULONG TibPad0[2];
173  PVOID Spare1;
174  struct _KPCR *Self;
178  };
179  };
187  struct
188  {
191  };
194  struct
195  {
201  };
207 
208  /* Private members, not in ntddk.h */
209  PVOID Idt[256];
210  PVOID* IdtExt;
212  KPRCB Prcb;
213 } KIPCR, *PKIPCR;
214 
215 //
216 // Special Registers Structure (outside of CONTEXT)
217 // Based on WoA symbols
218 //
219 typedef struct _KSPECIAL_REGISTERS
220 {
227  ULONG KernelBcr[8];
229  ULONG KernelWcr[2];
231 
232 //
233 // ARM64 Architecture State
234 // Based on WoA symbols
235 //
236 typedef struct _KARM64_ARCH_STATE
237 {
258 
259 typedef struct _KPROCESSOR_STATE
260 {
263  CONTEXT ContextFrame; // 800
265 
266 //
267 // Macro to get current KPRCB
268 //
270 struct _KPRCB *
272 {
273  //UNIMPLEMENTED;
274  return 0;
275 }
276 
277 //
278 // Just read it from the PCR
279 //
280 #define KeGetCurrentIrql() KeGetPcr()->CurrentIrql
281 #define _KeGetCurrentThread() KeGetCurrentPrcb()->CurrentThread
282 #define _KeGetPreviousMode() KeGetCurrentPrcb()->CurrentThread->PreviousMode
283 #define _KeIsExecutingDpc() (KeGetCurrentPrcb()->DpcRoutineActive != 0)
284 #define KeGetCurrentThread() _KeGetCurrentThread()
285 #define KeGetPreviousMode() _KeGetPreviousMode()
286 
287 #endif // !NTOS_MODE_USER
288 
289 #ifdef __cplusplus
290 }; // extern "C"
291 #endif
292 
293 #endif // !_ARM64_KETYPES_H
ULONG TibPad0[2]
Definition: ketypes.h:1048
ULONG Esr
Definition: ketypes.h:149
UCHAR DebugRegistersValid
Definition: ketypes.h:64
ULONG64 Pc
Definition: ketypes.h:119
ULONG KernelWvr[1]
Definition: ketypes.h:620
ULONG64 Ttbr1_El1
Definition: ketypes.h:244
ULONG64 Lr
Definition: ketypes.h:117
ULONG64 X15
Definition: ketypes.h:111
UCHAR SsbMitigationKernel
Definition: ketypes.h:198
ULONG Reserved
Definition: ketypes.h:346
PVOID * IdtExt
Definition: ketypes.h:1082
PVOID Idt[256]
Definition: ketypes.h:1081
UCHAR ApcInterrupt
Definition: ketypes.h:1070
struct _KIPCR KIPCR
struct _KARM64_ARCH_STATE * PKARM64_ARCH_STATE
UCHAR PreviousIrql
Definition: ketypes.h:319
ULONG64 X4
Definition: ketypes.h:100
ULONG64 Thread
Definition: ketypes.h:131
UCHAR SecondLevelCacheAssociativity
Definition: ketypes.h:877
ULONG64 Tcr_El1
Definition: ketypes.h:242
char CHAR
Definition: xmlstorage.h:175
ULONG64 X7
Definition: ketypes.h:103
UCHAR SsbMitigationDynamic
Definition: ketypes.h:197
USHORT MinorVersion
Definition: ketypes.h:882
ULONG Reserved1
Definition: ketypes.h:150
ULONG64 Pmselr_El0
Definition: ketypes.h:253
PVOID PcrReserved0
Definition: ketypes.h:175
Definition: ketypes.h:129
union _CPU_INFO * PCPU_INFO
FORCEINLINE struct _KPRCB * KeGetCurrentPrcb(VOID)
Definition: ketypes.h:1080
struct _KIPCR * PKIPCR
ULONG64 Pmovsclr_El0
Definition: ketypes.h:252
UCHAR SsbMitigationUser
Definition: ketypes.h:199
UCHAR BtiMitigation
Definition: ketypes.h:193
ULONG64 Fp
Definition: ketypes.h:118
UCHAR CpuNumber
Definition: ketypes.h:132
Definition: ke.h:289
KSPECIAL_REGISTERS SpecialRegisters
Definition: ketypes.h:535
ULONG64 X5
Definition: ketypes.h:141
UCHAR Pad1[2]
Definition: ketypes.h:182
ULONG64 X3
Definition: ketypes.h:139
ULONG64 X7
Definition: ketypes.h:143
ULONG KernelWcr[1]
Definition: ketypes.h:621
ULONG64 X6
Definition: ketypes.h:102
PVOID Used_Self
Definition: ketypes.h:871
struct _KEXCEPTION_FRAME KEXCEPTION_FRAME
UCHAR KIRQL
Definition: env_spec_w32.h:591
UCHAR SsbMitigationReserved
Definition: ketypes.h:200
ULONG64 X4
Definition: ketypes.h:140
struct _KPRCB * PKPRCB
ULONG64 X3
Definition: ketypes.h:99
struct _KTRAP_FRAME KTRAP_FRAME
ULONG64 Vbar_El1
Definition: ketypes.h:256
ULONG64 X0
Definition: ketypes.h:96
struct _KPROCESSOR_STATE * PKPROCESSOR_STATE
unsigned int UINT32
struct _KPRCB KPRCB
struct _KEXCEPTION_FRAME * PKEXCEPTION_FRAME
ULONG64 Fp
Definition: ketypes.h:144
CONTEXT ContextFrame
Definition: ketypes.h:536
ULONG Wcr[1]
Definition: ketypes.h:359
struct _KSPECIAL_REGISTERS * PKSPECIAL_REGISTERS
ULONG StallScaleFactor
Definition: ketypes.h:883
ULONG SecondLevelCacheSize
Definition: ketypes.h:886
ULONG64 Sp
Definition: ketypes.h:146
ULONG64 Cpacr_El1
Definition: ketypes.h:241
ULONG64 Pmxevcntr_El0[31]
Definition: ketypes.h:250
USHORT Padding
Definition: ketypes.h:134
PVOID Spare1
Definition: ketypes.h:1049
PVOID PcrAlign[15]
Definition: ketypes.h:211
ULONG Wvr[1]
Definition: ketypes.h:358
ULONG64 X14
Definition: ketypes.h:110
ULONG dummy
Definition: ketypes.h:159
ULONG64 X2
Definition: ketypes.h:138
ULONG64 X17
Definition: ketypes.h:113
ULONG64 FaultAddress
Definition: ketypes.h:78
ULONG64 X0
Definition: ketypes.h:136
ULONG64 PanicStorage[6]
Definition: ketypes.h:203
ULONG64 Pmcr_El0
Definition: ketypes.h:247
ULONG64 Pmccntr_El0
Definition: ketypes.h:249
ULONG64 Mair_El1
Definition: ketypes.h:255
ULONG Bcr[8]
Definition: ketypes.h:357
ULONG64 X5
Definition: ketypes.h:101
ULONG Cpsrl
Definition: ketypes.h:135
ULONG64 Tpidrro_El0
Definition: ketypes.h:224
ULONG64 Pc
Definition: ketypes.h:147
UCHAR Pad2[2]
Definition: ketypes.h:202
ULONG64 Midr_El1
Definition: ketypes.h:238
unsigned __int64 ULONG64
Definition: imports.h:198
PVOID KvaUserModeTtbr1
Definition: ketypes.h:206
unsigned char UCHAR
Definition: xmlstorage.h:181
ULONG64 X6
Definition: ketypes.h:142
KPRCB Prcb
Definition: ketypes.h:894
ULONG64 Sctlr_El1
Definition: ketypes.h:239
ULONG64 X12
Definition: ketypes.h:108
ULONG HalReserved[16]
Definition: ketypes.h:887
UCHAR TrapType
Definition: ketypes.h:133
ULONG64 TrapFrame
Definition: ketypes.h:79
ULONG dummy
Definition: ketypes.h:57
struct _KSPECIAL_REGISTERS KSPECIAL_REGISTERS
ULONG Bvr[8]
Definition: ketypes.h:356
ULONG64 Tpidr_El0
Definition: ketypes.h:223
ULONG64 X18
Definition: ketypes.h:114
struct _KPCR * Self
Definition: ketypes.h:868
ULONG64 Esr_El1
Definition: ketypes.h:245
UCHAR ExceptionActive
Definition: ketypes.h:321
ULONG64 X2
Definition: ketypes.h:98
ULONG64 X1
Definition: ketypes.h:97
ULONG64 Pmuserenr_El0
Definition: ketypes.h:254
PVOID KdVersionBlock
Definition: ketypes.h:890
ULONG64 Ttbr0_El1
Definition: ketypes.h:243
ULONG64 X9
Definition: ketypes.h:105
ULONG64 X11
Definition: ketypes.h:107
unsigned short USHORT
Definition: pedump.c:61
#define FORCEINLINE
Definition: wdftypes.h:67
ULONG Esr
Definition: ketypes.h:89
KARM64_ARCH_STATE ArchState
Definition: ketypes.h:262
USHORT MajorVersion
Definition: ketypes.h:881
KIRQL CurrentIrql
Definition: ketypes.h:1056
UCHAR DispatchInterrupt
Definition: ketypes.h:1071
struct _KARM64_ARCH_STATE KARM64_ARCH_STATE
ULONG64 Far_El1
Definition: ketypes.h:246
ULONG64 Lr
Definition: ketypes.h:145
ULONG64 X13
Definition: ketypes.h:109
ULONG64 X16
Definition: ketypes.h:112
USHORT InterruptPad
Definition: ketypes.h:1074
ULONG64 X8
Definition: ketypes.h:104
struct _TRAPFRAME_LOG_ENTRY TRAPFRAME_LOG_ENTRY
ULONG64 Pmcntenset_El0
Definition: ketypes.h:248
unsigned int ULONG
Definition: retypes.h:1
ULONG64 X1
Definition: ketypes.h:137
ULONG64 Actlr_El1
Definition: ketypes.h:240
ULONG64 Tpidr_El1
Definition: ketypes.h:225
union _CPU_INFO CPU_INFO
ULONG KernelBvr[8]
Definition: ketypes.h:618
struct _KTRAP_FRAME * PKTRAP_FRAME
ULONG Spsr
Definition: ketypes.h:88
UCHAR SsbMitigationFirmware
Definition: ketypes.h:196
struct _TRAPFRAME_LOG_ENTRY * PTRAPFRAME_LOG_ENTRY
UCHAR ContextFromKFramesUnwound
Definition: ketypes.h:63
ULONG64 Sp
Definition: ketypes.h:90
ULONG KernelBcr[8]
Definition: ketypes.h:619
ULONG64 Pmxevtyper_El0[31]
Definition: ketypes.h:251
ULONG64 X10
Definition: ketypes.h:106
struct _KPROCESSOR_STATE KPROCESSOR_STATE
ULONG64 Far
Definition: ketypes.h:148
PKSPIN_LOCK_QUEUE LockArray
Definition: ketypes.h:870
ULONG VfpState
Definition: ketypes.h:83
CHAR PreviousMode
Definition: ketypes.h:318