Remove building with NOCRYPTO option
[minix3.git] / minix / kernel / arch / earm / include / archconst.h
blobd85dd81e0a7ea6a152ee4953d13399fc4e044730
2 #ifndef _ARM_ACONST_H
3 #define _ARM_ACONST_H
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
24 /* Data abort helper */
25 #define is_align_fault(fault_status) \
26 ((fault_status) == FAULT_ALIGN_0)
28 #define is_trans_fault(fault_status) \
29 (((fault_status) == FAULT_TRANS_S) || ((fault_status) == FAULT_TRANS_P))
31 #define is_perm_fault(fault_status) \
32 (((fault_status) == FAULT_PERM_S) || ((fault_status) == FAULT_PERM_P))
35 * defines how many bytes are reserved at the top of the kernel stack for global
36 * information like currently scheduled process or current cpu id
38 #define ARM_STACK_TOP_RESERVED (2 * sizeof(reg_t))
40 /* only selected bits are changeable by user e.g.[31:9] and skip the
41 * mode bits. It is probably is a better idea to look at the current
42 * status to determine if one is allowed to write these values. This
43 * might allow debugging of privileged processes
45 #define SET_USR_PSR(rp, npsr) \
46 rp->p_reg.psr = ( rp->p_reg.psr & 0x1F) | ( npsr & ~0x1F)
49 #define PG_ALLOCATEME ((phys_bytes)-1)
51 #endif /* _ARM_ACONST_H */