1 #ifndef __LUNAIX_AA64_ESR_H
2 #define __LUNAIX_AA64_ESR_H
4 #define EXCEPTION_SYNC 0
5 #define EXCEPTION_FIQ 1
6 #define EXCEPTION_IRQ 2
7 #define EXCEPTION_SERR 3
11 #include <lunaix/bits.h>
12 #include <lunaix/types.h>
14 #define ESR_ISS2 BITFIELD(55, 32)
15 #define ESR_EC BITFIELD(31, 26)
16 #define ESR_IL BIT(25)
17 #define ESR_ISS BITFIELD(24, 0)
19 #define EC_UNKNOWN 0b000000
20 #define EC_WF 0b000001
21 #define EC_SIMD 0b000111
22 #define EC_LS64 0b001010
23 #define EC_BTI 0b001101
24 #define EC_EXEC_STATE 0b001110
25 #define EC_SYS_INST 0b011000
26 #define EC_SVC 0b010101
28 #define EC_I_ABORT 0b100000
29 #define EC_I_ABORT_EL 0b100001
31 #define EC_D_ABORT 0b100100
32 #define EC_D_ABORT_EL 0b100101
34 #define EC_PC_ALIGN 0b100010
35 #define EC_SP_ALIGN 0b100110
37 #define EC_SERROR 0b101111
42 return !!BITS_GET(esr, ESR_IL);
45 static inline unsigned int
48 return (unsigned int)BITS_GET(esr, ESR_EC);
54 return (reg_t)BITS_GET(esr, ESR_ISS);
58 #endif /* __LUNAIX_AA64_ESR_H */