reactos/sdk/include/xdk/arm64/ke.h
Justin Miller 4363e74ddc
[REACTOS] Finally get some ARM64 applications building (#4517)
- Add some missing ARM64 exports to ntdll, kernel32 and user32
- Create mmtypes header file based on WoA debug symbols
- Get the remaining headers in order, so we can build ARM64 apps
- Adjust subsystem version for binaries so they can run on WoA host
- Get calc, notepad and more base apps to build for ARM64 platform

CORE-17518

Reviewed-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Reviewed-by: Stanislav Motylkov <x86corez@gmail.com>
2022-05-25 17:06:32 +03:00

130 lines
2.7 KiB
C

$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
#define SharedUserData ((KUSER_SHARED_DATA * const)KI_USER_SHARED_DATA)
#define PAGE_SIZE 0x1000
#define PAGE_SHIFT 12L
#define PAUSE_PROCESSOR YieldProcessor();
/* FIXME: Based on AMD64 but needed to compile apps */
#define KERNEL_STACK_SIZE 12288
#define KERNEL_LARGE_STACK_SIZE 61440
#define KERNEL_LARGE_STACK_COMMIT KERNEL_STACK_SIZE
/* FIXME End */
#define EXCEPTION_READ_FAULT 0
#define EXCEPTION_WRITE_FAULT 1
#define EXCEPTION_EXECUTE_FAULT 8
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