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
27 #define EC_I_ABORT 0b100000
28 #define EC_I_ABORT_EL 0b100001
30 #define EC_D_ABORT 0b100100
31 #define EC_D_ABORT_EL 0b100101
33 #define EC_PC_ALIGN 0b100010
34 #define EC_SP_ALIGN 0b100110
36 #define EC_SERROR 0b101111
41 return !!BITS_GET(esr, ESR_IL);
44 static inline unsigned int
47 return (unsigned int)BITS_GET(esr, ESR_EC);
53 return (reg_t)BITS_GET(esr, ESR_ISS);
57 #endif /* __LUNAIX_AA64_ESR_H */