5 #include <machine/interrupt.h>
6 #include <machine/memory.h>
7 #include <machine/cpu.h>
8 #include <arm/armreg.h>
10 /* Program stack words and masks. */
11 #define INIT_PSR (PSR_USR32_MODE | PSR_F) /* initial psr */
12 #define INIT_TASK_PSR (PSR_SVC32_MODE | PSR_F) /* initial psr for tasks */
14 /* Exception vector numbers */
15 #define RESET_VECTOR 0
16 #define UNDEFINED_INST_VECTOR 1
17 #define SUPERVISOR_CALL_VECTOR 2
18 #define PREFETCH_ABORT_VECTOR 3
19 #define DATA_ABORT_VECTOR 4
20 #define HYPERVISOR_CALL_VECTOR 5
21 #define INTERRUPT_VECTOR 6
22 #define FAST_INTERRUPT_VECTOR 7
25 * defines how many bytes are reserved at the top of the kernel stack for global
26 * information like currently scheduled process or current cpu id
28 #define ARM_STACK_TOP_RESERVED (2 * sizeof(reg_t))
30 /* only selected bits are changeable by user e.g.[31:9] and skip the
31 * mode bits. It is probably is a better idea to look at the current
32 * status to determine if one is allowed to write these values. This
33 * might allow debugging of privileged processes
35 #define SET_USR_PSR(rp, npsr) \
36 rp->p_reg.psr = ( rp->p_reg.psr & 0x1F) | ( npsr & ~0x1F)
39 #define PG_ALLOCATEME ((phys_bytes)-1)
41 #endif /* _ARM_ACONST_H */