4 /* First include CPU-dependent definitions */
10 #include "cpu_x86_64.h"
16 /* This macro serves as an indicator of included file */
17 #ifndef PRINT_CPUCONTEXT
18 #error Unsupported CPU
23 #define regs_t CONTEXT
25 /* Some common definitions */
26 #define cpumode_t __unused char
32 #define AROS_EXCEPTION_SYSCALL 0x00080001
33 #define AROS_EXCEPTION_RESUME 0x00080002
35 /* Our virtual CPU interface. It's needed here for krnSysCall() definition */
36 struct KernelInterface
38 int (*core_init
)(unsigned int TimerPeriod
);
39 void (*core_raise
)(ULONG num
, const IPTR n
);
40 unsigned int (*core_protect
)(void *addr
, unsigned int len
, unsigned int prot
);
41 void (*core_putc
)(char c
);
42 int (*core_getc
)(void);
43 void (*core_alert
)(const char *text
);
48 unsigned char *SleepState
;
52 extern struct KernelInterface KernelIFace
;
54 #define krnSysCall(n) KernelIFace.core_raise(AROS_EXCEPTION_SYSCALL, n)
58 /* Interrupt enable states */
64 #define SLEEP_MODE_OFF 0
65 #define SLEEP_MODE_PENDING 1
66 #define SLEEP_MODE_ON 2