diff --git a/sdk/include/xdk/arm64/ke.h b/sdk/include/xdk/arm64/ke.h new file mode 100644 index 00000000000..6fca07e5e56 --- /dev/null +++ b/sdk/include/xdk/arm64/ke.h @@ -0,0 +1,112 @@ +$if (_WDMDDK_) +/** Kernel definitions for ARM64 **/ + +/* Interrupt request levels */ +#define PASSIVE_LEVEL 0 +#define LOW_LEVEL 0 +#define APC_LEVEL 1 +#define DISPATCH_LEVEL 2 +#define CLOCK_LEVEL 13 +#define IPI_LEVEL 14 +#define DRS_LEVEL 14 +#define POWER_LEVEL 14 +#define PROFILE_LEVEL 15 +#define HIGH_LEVEL 15 + +NTSYSAPI +PKTHREAD +NTAPI +KeGetCurrentThread(VOID); + +#define DbgRaiseAssertionFailure() __break(0xf001) + +$endif (_WDMDDK_) +$if (_NTDDK_) + +#define ARM64_MAX_BREAKPOINTS 8 +#define ARM64_MAX_WATCHPOINTS 2 + +typedef union NEON128 { + struct { + ULONGLONG Low; + LONGLONG High; + } DUMMYSTRUCTNAME; + double D[2]; + float S[4]; + USHORT H[8]; + UCHAR B[16]; +} NEON128, *PNEON128; +typedef NEON128 NEON128, *PNEON128; + +typedef struct _CONTEXT { + + // + // Control flags. + // + + ULONG ContextFlags; + + // + // Integer registers + // + + ULONG Cpsr; + union { + struct { + ULONG64 X0; + ULONG64 X1; + ULONG64 X2; + ULONG64 X3; + ULONG64 X4; + ULONG64 X5; + ULONG64 X6; + ULONG64 X7; + ULONG64 X8; + ULONG64 X9; + ULONG64 X10; + ULONG64 X11; + ULONG64 X12; + ULONG64 X13; + ULONG64 X14; + ULONG64 X15; + ULONG64 X16; + ULONG64 X17; + ULONG64 X18; + ULONG64 X19; + ULONG64 X20; + ULONG64 X21; + ULONG64 X22; + ULONG64 X23; + ULONG64 X24; + ULONG64 X25; + ULONG64 X26; + ULONG64 X27; + ULONG64 X28; + ULONG64 Fp; + ULONG64 Lr; + } DUMMYSTRUCTNAME; + ULONG64 X[31]; + } DUMMYUNIONNAME; + + ULONG64 Sp; + ULONG64 Pc; + + // + // Floating Point/NEON Registers + // + + NEON128 V[32]; + ULONG Fpcr; + ULONG Fpsr; + + // + // Debug registers + // + + ULONG Bcr[ARM64_MAX_BREAKPOINTS]; + ULONG64 Bvr[ARM64_MAX_BREAKPOINTS]; + ULONG Wcr[ARM64_MAX_WATCHPOINTS]; + ULONG64 Wvr[ARM64_MAX_WATCHPOINTS]; + +} CONTEXT, *PCONTEXT; +$endif diff --git a/sdk/include/xdk/kefuncs.h b/sdk/include/xdk/kefuncs.h index bb8c662b73a..b1f02f5a9a1 100644 --- a/sdk/include/xdk/kefuncs.h +++ b/sdk/include/xdk/kefuncs.h @@ -14,6 +14,8 @@ $include(ppc/ke.h) $include(mips/ke.h) #elif defined(_M_ARM) $include(arm/ke.h) +#elif defined(_M_ARM64) +$include(arm64/ke.h) #else #error Unknown Architecture #endif diff --git a/sdk/include/xdk/ntddk.template.h b/sdk/include/xdk/ntddk.template.h index b942818ed81..35eb73c4aaf 100644 --- a/sdk/include/xdk/ntddk.template.h +++ b/sdk/include/xdk/ntddk.template.h @@ -118,6 +118,8 @@ $include(mips/ke.h) #elif defined(_M_ARM) $include(arm/ke.h) $include(arm/mm.h) +#elif defined(_M_ARM64) +$include(arm64/ke.h) #else #error Unknown Architecture #endif