[XDK] Start define of xdk ke.h for arm64

CORE-17518
This commit is contained in:
Justin Miller 2021-12-13 05:43:56 -08:00 committed by Stanislav Motylkov
parent 4342b84c9a
commit 3cee1f718b
No known key found for this signature in database
GPG key ID: AFE513258CBA9E92
3 changed files with 116 additions and 0 deletions

112
sdk/include/xdk/arm64/ke.h Normal file
View file

@ -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

View file

@ -14,6 +14,8 @@ $include(ppc/ke.h)
$include(mips/ke.h) $include(mips/ke.h)
#elif defined(_M_ARM) #elif defined(_M_ARM)
$include(arm/ke.h) $include(arm/ke.h)
#elif defined(_M_ARM64)
$include(arm64/ke.h)
#else #else
#error Unknown Architecture #error Unknown Architecture
#endif #endif

View file

@ -118,6 +118,8 @@ $include(mips/ke.h)
#elif defined(_M_ARM) #elif defined(_M_ARM)
$include(arm/ke.h) $include(arm/ke.h)
$include(arm/mm.h) $include(arm/mm.h)
#elif defined(_M_ARM64)
$include(arm64/ke.h)
#else #else
#error Unknown Architecture #error Unknown Architecture
#endif #endif