ReactOS 0.4.16-dev-250-g3ecd236
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
7extern "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// Double fault stack size
54//
55#define DOUBLE_FAULT_STACK_SIZE 0x8000
56
57//
58// Structure for CPUID info
59//
60typedef union _CPU_INFO
61{
64
65typedef struct _KTRAP_FRAME
66{
70 union
71 {
72 struct
73 {
76 };
77 };
79 union
80 {
81 struct
82 {
85 };
86 };
87 //struct PKARM64_VFP_STATE VfpState;
89 ULONG Bcr[8];
91 ULONG Wcr[2];
96 union
97 {
99 struct
100 {
120 };
121 };
126
127typedef struct _KEXCEPTION_FRAME
128{
131
132#ifndef NTOS_MODE_USER
133
135{
157
158//
159// Processor Region Control Block
160// Based on WoA
161//
162typedef struct _KPRCB
163{
166
167//
168// Processor Control Region
169// Based on WoA
170//
171typedef struct _KIPCR
172{
173 union
174 {
175 struct
176 {
177 ULONG TibPad0[2];
179 struct _KPCR *Self;
183 };
184 };
192 struct
193 {
196 };
199 struct
200 {
206 };
212
213 /* Private members, not in ntddk.h */
214 PVOID Idt[256];
215 PVOID* IdtExt;
217 KPRCB Prcb;
219
220//
221// Special Registers Structure (outside of CONTEXT)
222// Based on WoA symbols
223//
224typedef struct _KSPECIAL_REGISTERS
225{
232 ULONG KernelBcr[8];
234 ULONG KernelWcr[2];
236
237//
238// ARM64 Architecture State
239// Based on WoA symbols
240//
241typedef struct _KARM64_ARCH_STATE
242{
263
264typedef struct _KPROCESSOR_STATE
265{
268 CONTEXT ContextFrame; // 800
270
271//
272// Macro to get current KPRCB
273//
275struct _KPRCB *
277{
278 //UNIMPLEMENTED;
279 return 0;
280}
281
282//
283// Just read it from the PCR
284//
285#define KeGetCurrentIrql() KeGetPcr()->CurrentIrql
286#define _KeGetCurrentThread() KeGetCurrentPrcb()->CurrentThread
287#define _KeGetPreviousMode() KeGetCurrentPrcb()->CurrentThread->PreviousMode
288#define _KeIsExecutingDpc() (KeGetCurrentPrcb()->DpcRoutineActive != 0)
289#define KeGetCurrentThread() _KeGetCurrentThread()
290#define KeGetPreviousMode() _KeGetPreviousMode()
291
292#endif // !NTOS_MODE_USER
293
294#ifdef __cplusplus
295}; // extern "C"
296#endif
297
298#endif // !_ARM64_KETYPES_H
unsigned int UINT32
UCHAR KIRQL
Definition: env_spec_w32.h:591
unsigned __int64 ULONG64
Definition: imports.h:198
struct _KSPECIAL_REGISTERS * PKSPECIAL_REGISTERS
struct _KTRAP_FRAME KTRAP_FRAME
struct _KPROCESSOR_STATE * PKPROCESSOR_STATE
struct _KIPCR KIPCR
struct _KPRCB * PKPRCB
struct _KEXCEPTION_FRAME * PKEXCEPTION_FRAME
FORCEINLINE struct _KPRCB * KeGetCurrentPrcb(VOID)
Definition: ketypes.h:1150
struct _KIPCR * PKIPCR
union _CPU_INFO CPU_INFO
struct _KPRCB KPRCB
struct _KEXCEPTION_FRAME KEXCEPTION_FRAME
struct _KTRAP_FRAME * PKTRAP_FRAME
struct _KSPECIAL_REGISTERS KSPECIAL_REGISTERS
union _CPU_INFO * PCPU_INFO
struct _KPROCESSOR_STATE KPROCESSOR_STATE
struct _KARM64_ARCH_STATE * PKARM64_ARCH_STATE
struct _TRAPFRAME_LOG_ENTRY * PTRAPFRAME_LOG_ENTRY
struct _KARM64_ARCH_STATE KARM64_ARCH_STATE
struct _TRAPFRAME_LOG_ENTRY TRAPFRAME_LOG_ENTRY
unsigned short USHORT
Definition: pedump.c:61
ULONG64 Pmuserenr_El0
Definition: ketypes.h:259
ULONG64 Pmxevcntr_El0[31]
Definition: ketypes.h:255
ULONG64 Pmselr_El0
Definition: ketypes.h:258
ULONG64 Esr_El1
Definition: ketypes.h:250
ULONG64 Ttbr1_El1
Definition: ketypes.h:249
ULONG64 Mair_El1
Definition: ketypes.h:260
ULONG64 Pmovsclr_El0
Definition: ketypes.h:257
ULONG64 Ttbr0_El1
Definition: ketypes.h:248
ULONG64 Midr_El1
Definition: ketypes.h:243
ULONG64 Actlr_El1
Definition: ketypes.h:245
ULONG64 Pmcr_El0
Definition: ketypes.h:252
ULONG64 Vbar_El1
Definition: ketypes.h:261
ULONG64 Cpacr_El1
Definition: ketypes.h:246
ULONG64 Sctlr_El1
Definition: ketypes.h:244
ULONG64 Pmccntr_El0
Definition: ketypes.h:254
ULONG64 Pmxevtyper_El0[31]
Definition: ketypes.h:256
ULONG64 Tcr_El1
Definition: ketypes.h:247
ULONG64 Far_El1
Definition: ketypes.h:251
ULONG64 Pmcntenset_El0
Definition: ketypes.h:253
UCHAR SsbMitigationKernel
Definition: ketypes.h:203
KPRCB Prcb
Definition: ketypes.h:965
UCHAR Pad1[2]
Definition: ketypes.h:187
USHORT MinorVersion
Definition: ketypes.h:953
ULONG TibPad0[2]
Definition: ketypes.h:1055
USHORT InterruptPad
Definition: ketypes.h:1081
ULONG SecondLevelCacheSize
Definition: ketypes.h:957
UCHAR SsbMitigationDynamic
Definition: ketypes.h:202
UCHAR SsbMitigationFirmware
Definition: ketypes.h:201
USHORT MajorVersion
Definition: ketypes.h:952
UCHAR SecondLevelCacheAssociativity
Definition: ketypes.h:948
PVOID Spare1
Definition: ketypes.h:1056
PVOID Idt[256]
Definition: ketypes.h:1088
KIRQL CurrentIrql
Definition: ketypes.h:1063
PVOID * IdtExt
Definition: ketypes.h:1089
UCHAR DispatchInterrupt
Definition: ketypes.h:1078
UCHAR BtiMitigation
Definition: ketypes.h:198
ULONG64 PanicStorage[6]
Definition: ketypes.h:208
UCHAR SsbMitigationUser
Definition: ketypes.h:204
ULONG HalReserved[16]
Definition: ketypes.h:958
PKSPIN_LOCK_QUEUE LockArray
Definition: ketypes.h:941
UCHAR Pad2[2]
Definition: ketypes.h:207
UCHAR ApcInterrupt
Definition: ketypes.h:1077
PVOID PcrAlign[15]
Definition: ketypes.h:216
UCHAR SsbMitigationReserved
Definition: ketypes.h:205
struct _KPCR * Self
Definition: ketypes.h:939
ULONG StallScaleFactor
Definition: ketypes.h:954
PVOID KdVersionBlock
Definition: ketypes.h:961
PVOID Used_Self
Definition: ketypes.h:942
PVOID KvaUserModeTtbr1
Definition: ketypes.h:211
PVOID PcrReserved0
Definition: ketypes.h:180
Definition: ke.h:294
ULONG dummy
Definition: ketypes.h:164
KSPECIAL_REGISTERS SpecialRegisters
Definition: ketypes.h:604
KARM64_ARCH_STATE ArchState
Definition: ketypes.h:267
CONTEXT ContextFrame
Definition: ketypes.h:605
ULONG KernelWcr[1]
Definition: ketypes.h:628
ULONG64 Tpidr_El0
Definition: ketypes.h:228
ULONG64 Tpidr_El1
Definition: ketypes.h:230
ULONG KernelBvr[8]
Definition: ketypes.h:625
ULONG KernelWvr[1]
Definition: ketypes.h:627
ULONG KernelBcr[8]
Definition: ketypes.h:626
ULONG64 Tpidrro_El0
Definition: ketypes.h:229
ULONG64 X12
Definition: ketypes.h:113
ULONG Esr
Definition: ketypes.h:94
ULONG64 X8
Definition: ketypes.h:109
UCHAR DebugRegistersValid
Definition: ketypes.h:69
ULONG64 Pc
Definition: ketypes.h:124
ULONG VfpState
Definition: ketypes.h:88
ULONG64 X11
Definition: ketypes.h:112
ULONG64 X18
Definition: ketypes.h:119
ULONG64 X9
Definition: ketypes.h:110
ULONG64 X13
Definition: ketypes.h:114
ULONG64 X15
Definition: ketypes.h:116
ULONG Reserved
Definition: ketypes.h:353
CHAR PreviousMode
Definition: ketypes.h:387
ULONG Wcr[1]
Definition: ketypes.h:366
ULONG64 X16
Definition: ketypes.h:117
ULONG64 X2
Definition: ketypes.h:103
ULONG Spsr
Definition: ketypes.h:93
ULONG64 X1
Definition: ketypes.h:102
ULONG64 TrapFrame
Definition: ketypes.h:84
ULONG Bcr[8]
Definition: ketypes.h:364
ULONG64 X4
Definition: ketypes.h:105
ULONG64 Fp
Definition: ketypes.h:123
ULONG64 Lr
Definition: ketypes.h:122
ULONG64 Sp
Definition: ketypes.h:95
ULONG64 FaultAddress
Definition: ketypes.h:83
ULONG64 X3
Definition: ketypes.h:104
ULONG64 X5
Definition: ketypes.h:106
ULONG64 X14
Definition: ketypes.h:115
UCHAR PreviousIrql
Definition: ketypes.h:388
ULONG64 X17
Definition: ketypes.h:118
ULONG64 X0
Definition: ketypes.h:101
UCHAR ExceptionActive
Definition: ketypes.h:390
UCHAR ContextFromKFramesUnwound
Definition: ketypes.h:68
ULONG Wvr[1]
Definition: ketypes.h:365
ULONG64 X10
Definition: ketypes.h:111
ULONG Bvr[8]
Definition: ketypes.h:363
ULONG64 X7
Definition: ketypes.h:108
ULONG64 X6
Definition: ketypes.h:107
Definition: ketypes.h:135
ULONG64 X4
Definition: ketypes.h:145
ULONG64 X1
Definition: ketypes.h:142
ULONG64 Fp
Definition: ketypes.h:149
ULONG64 Sp
Definition: ketypes.h:151
ULONG Esr
Definition: ketypes.h:154
ULONG64 X6
Definition: ketypes.h:147
ULONG64 X0
Definition: ketypes.h:141
ULONG64 X5
Definition: ketypes.h:146
ULONG64 Far
Definition: ketypes.h:153
ULONG64 X2
Definition: ketypes.h:143
USHORT Padding
Definition: ketypes.h:139
ULONG64 Lr
Definition: ketypes.h:150
ULONG64 X7
Definition: ketypes.h:148
UCHAR CpuNumber
Definition: ketypes.h:137
ULONG64 X3
Definition: ketypes.h:144
UCHAR TrapType
Definition: ketypes.h:138
ULONG64 Thread
Definition: ketypes.h:136
ULONG64 Pc
Definition: ketypes.h:152
ULONG Cpsrl
Definition: ketypes.h:140
ULONG Reserved1
Definition: ketypes.h:155
uint32_t ULONG
Definition: typedefs.h:59
ULONG dummy
Definition: ketypes.h:62
#define FORCEINLINE
Definition: wdftypes.h:67
unsigned char UCHAR
Definition: xmlstorage.h:181
char CHAR
Definition: xmlstorage.h:175