16#define ARM_ARCH_EXCEPTION_IRQ EXCEPT_AARCH64_IRQ
19#define CPACR_TTA_EN (1UL << 28)
20#define CPACR_FPEN_EL1 (1UL << 20)
21#define CPACR_FPEN_FULL (3UL << 20)
22#define CPACR_DEFAULT CPACR_FPEN_FULL
25#define AARCH64_CPTR_TFP (1 << 10)
26#define AARCH64_CPTR_RES1 0x33ff
27#define AARCH64_CPTR_DEFAULT AARCH64_CPTR_RES1
30#define AARCH64_MMFR1_VH (0xF << 8)
33#define AARCH64_PFR0_FP (0xF << 16)
34#define AARCH64_PFR0_GIC (0xF << 24)
37#define AARCH64_DFR0_TRACEVER (0xFULL << 4)
38#define AARCH64_DFR0_TRBE (0xFULL << 44)
41#define SCR_NS (1 << 0)
42#define SCR_IRQ (1 << 1)
43#define SCR_FIQ (1 << 2)
44#define SCR_EA (1 << 3)
45#define SCR_FW (1 << 4)
46#define SCR_AW (1 << 5)
49#define ARM_CPU_TYPE_SHIFT 4
50#define ARM_CPU_TYPE_MASK 0xFFF
51#define ARM_CPU_TYPE_AEMV8 0xD0F
52#define ARM_CPU_TYPE_A53 0xD03
53#define ARM_CPU_TYPE_A57 0xD07
54#define ARM_CPU_TYPE_A72 0xD08
55#define ARM_CPU_TYPE_A15 0xC0F
56#define ARM_CPU_TYPE_A9 0xC09
57#define ARM_CPU_TYPE_A7 0xC07
58#define ARM_CPU_TYPE_A5 0xC05
60#define ARM_CPU_REV_MASK ((0xF << 20) | (0xF) )
61#define ARM_CPU_REV(rn, pn) ((((rn) & 0xF) << 20) | ((pn) & 0xF))
64#define ARM_HCR_FMO BIT3
65#define ARM_HCR_IMO BIT4
66#define ARM_HCR_AMO BIT5
67#define ARM_HCR_TSC BIT19
68#define ARM_HCR_TGE BIT27
71#define AARCH64_ESR_EC(Ecr) ((0x3F << 26) & (Ecr))
72#define AARCH64_ESR_ISS(Ecr) ((0x1FFFFFF) & (Ecr))
74#define AARCH64_ESR_EC_SMC32 (0x13 << 26)
75#define AARCH64_ESR_EC_SMC64 (0x17 << 26)
78#define AARCH64_EL3 0xC
79#define AARCH64_EL2 0x8
80#define AARCH64_EL1 0x4
87#define SPSR_AARCH32 BIT4
89#define SPSR_AARCH32_MODE_USER 0x0
90#define SPSR_AARCH32_MODE_FIQ 0x1
91#define SPSR_AARCH32_MODE_IRQ 0x2
92#define SPSR_AARCH32_MODE_SVC 0x3
93#define SPSR_AARCH32_MODE_ABORT 0x7
94#define SPSR_AARCH32_MODE_UNDEF 0xB
95#define SPSR_AARCH32_MODE_SYS 0xF
98#define CNTHCTL_EL2_EL1PCTEN BIT0
99#define CNTHCTL_EL2_EL1PCEN BIT1
101#define ARM_VECTOR_TABLE_ALIGNMENT ((1 << 11)-1)
104#define ARM_VECTOR_CUR_SP0_SYNC 0x000
105#define ARM_VECTOR_CUR_SP0_IRQ 0x080
106#define ARM_VECTOR_CUR_SP0_FIQ 0x100
107#define ARM_VECTOR_CUR_SP0_SERR 0x180
109#define ARM_VECTOR_CUR_SPX_SYNC 0x200
110#define ARM_VECTOR_CUR_SPX_IRQ 0x280
111#define ARM_VECTOR_CUR_SPX_FIQ 0x300
112#define ARM_VECTOR_CUR_SPX_SERR 0x380
114#define ARM_VECTOR_LOW_A64_SYNC 0x400
115#define ARM_VECTOR_LOW_A64_IRQ 0x480
116#define ARM_VECTOR_LOW_A64_FIQ 0x500
117#define ARM_VECTOR_LOW_A64_SERR 0x580
119#define ARM_VECTOR_LOW_A32_SYNC 0x600
120#define ARM_VECTOR_LOW_A32_IRQ 0x680
121#define ARM_VECTOR_LOW_A32_FIQ 0x700
122#define ARM_VECTOR_LOW_A32_SERR 0x780
126#define ID_AA64ISAR2_EL1 S3_0_C0_C6_2
130#define ID_AA64MMFR2_EL1 S3_0_C0_C7_2
132#define VECTOR_BASE(tbl) \
133 .section .text.##tbl##,"ax"; \
136 GCC_ASM_EXPORT(tbl); \
139#define VECTOR_ENTRY(tbl, off) \
142#define VECTOR_END(tbl) \
148ArmEnableSWPInstruction (
196ArmDisableAlignmentCheck (
202ArmEnableAlignmentCheck (
208ArmDisableStackAlignmentCheck (
214ArmEnableStackAlignmentCheck (
220ArmDisableAllExceptions (