Changeset 99189 in vbox for trunk/include/iprt
- Timestamp:
- Mar 28, 2023 8:24:54 AM (20 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/armv8.h
r99077 r99189 51 51 * @{ 52 52 */ 53 54 /** @name The AArch64 register encoding. 55 * @{ */ 56 #define ARMV8_AARCH64_REG_X0 0 57 #define ARMV8_AARCH64_REG_W0 ARMV8_AARCH64_REG_X0 58 #define ARMV8_AARCH64_REG_X1 1 59 #define ARMV8_AARCH64_REG_W1 ARMV8_AARCH64_REG_X1 60 #define ARMV8_AARCH64_REG_X2 2 61 #define ARMV8_AARCH64_REG_W2 ARMV8_AARCH64_REG_X2 62 #define ARMV8_AARCH64_REG_X3 3 63 #define ARMV8_AARCH64_REG_W3 ARMV8_AARCH64_REG_X3 64 #define ARMV8_AARCH64_REG_X4 4 65 #define ARMV8_AARCH64_REG_W4 ARMV8_AARCH64_REG_X4 66 #define ARMV8_AARCH64_REG_X5 5 67 #define ARMV8_AARCH64_REG_W5 ARMV8_AARCH64_REG_X5 68 #define ARMV8_AARCH64_REG_X6 6 69 #define ARMV8_AARCH64_REG_W6 ARMV8_AARCH64_REG_X6 70 #define ARMV8_AARCH64_REG_X7 7 71 #define ARMV8_AARCH64_REG_W7 ARMV8_AARCH64_REG_X7 72 #define ARMV8_AARCH64_REG_X8 8 73 #define ARMV8_AARCH64_REG_W8 ARMV8_AARCH64_REG_X8 74 #define ARMV8_AARCH64_REG_X9 9 75 #define ARMV8_AARCH64_REG_W9 ARMV8_AARCH64_REG_X9 76 #define ARMV8_AARCH64_REG_X10 10 77 #define ARMV8_AARCH64_REG_W10 ARMV8_AARCH64_REG_X10 78 #define ARMV8_AARCH64_REG_X11 11 79 #define ARMV8_AARCH64_REG_W11 ARMV8_AARCH64_REG_X11 80 #define ARMV8_AARCH64_REG_X12 12 81 #define ARMV8_AARCH64_REG_W12 ARMV8_AARCH64_REG_X12 82 #define ARMV8_AARCH64_REG_X13 13 83 #define ARMV8_AARCH64_REG_W13 ARMV8_AARCH64_REG_X13 84 #define ARMV8_AARCH64_REG_X14 14 85 #define ARMV8_AARCH64_REG_W14 ARMV8_AARCH64_REG_X14 86 #define ARMV8_AARCH64_REG_X15 15 87 #define ARMV8_AARCH64_REG_W15 ARMV8_AARCH64_REG_X15 88 #define ARMV8_AARCH64_REG_X16 16 89 #define ARMV8_AARCH64_REG_W16 ARMV8_AARCH64_REG_X16 90 #define ARMV8_AARCH64_REG_X17 17 91 #define ARMV8_AARCH64_REG_W17 ARMV8_AARCH64_REG_X17 92 #define ARMV8_AARCH64_REG_X18 18 93 #define ARMV8_AARCH64_REG_W18 ARMV8_AARCH64_REG_X18 94 #define ARMV8_AARCH64_REG_X19 19 95 #define ARMV8_AARCH64_REG_W19 ARMV8_AARCH64_REG_X19 96 #define ARMV8_AARCH64_REG_X20 20 97 #define ARMV8_AARCH64_REG_W20 ARMV8_AARCH64_REG_X20 98 #define ARMV8_AARCH64_REG_X21 21 99 #define ARMV8_AARCH64_REG_W21 ARMV8_AARCH64_REG_X21 100 #define ARMV8_AARCH64_REG_X22 22 101 #define ARMV8_AARCH64_REG_W22 ARMV8_AARCH64_REG_X22 102 #define ARMV8_AARCH64_REG_X23 23 103 #define ARMV8_AARCH64_REG_W23 ARMV8_AARCH64_REG_X23 104 #define ARMV8_AARCH64_REG_X24 24 105 #define ARMV8_AARCH64_REG_W24 ARMV8_AARCH64_REG_X24 106 #define ARMV8_AARCH64_REG_X25 25 107 #define ARMV8_AARCH64_REG_W25 ARMV8_AARCH64_REG_X25 108 #define ARMV8_AARCH64_REG_X26 26 109 #define ARMV8_AARCH64_REG_W26 ARMV8_AARCH64_REG_X26 110 #define ARMV8_AARCH64_REG_X27 27 111 #define ARMV8_AARCH64_REG_W27 ARMV8_AARCH64_REG_X27 112 #define ARMV8_AARCH64_REG_X28 28 113 #define ARMV8_AARCH64_REG_W28 ARMV8_AARCH64_REG_X28 114 #define ARMV8_AARCH64_REG_X29 29 115 #define ARMV8_AARCH64_REG_W29 ARMV8_AARCH64_REG_X29 116 #define ARMV8_AARCH64_REG_X30 30 117 #define ARMV8_AARCH64_REG_W30 ARMV8_AARCH64_REG_X30 118 /** The zero register. */ 119 #define ARMV8_AARCH64_REG_ZR 31 120 /** @} */ 121 122 123 /** @name System register encoding. 124 * @{ 125 */ 126 /** Mask for the op0 part of an MSR/MRS instruction */ 127 #define ARMV8_AARCH64_SYSREG_OP0_MASK (RT_BIT_32(19) | RT_BIT_32(20)) 128 /** Shift for the op0 part of an MSR/MRS instruction */ 129 #define ARMV8_AARCH64_SYSREG_OP0_SHIFT 19 130 /** Returns the op0 part of the given MRS/MSR instruction. */ 131 #define ARMV8_AARCH64_SYSREG_OP0_GET(a_MsrMrsInsn) (((a_MsrMrsInsn) & ARMV8_AARCH64_SYSREG_OP0_MASK) >> ARMV8_AARCH64_SYSREG_OP0_SHIFT) 132 /** Mask for the op1 part of an MSR/MRS instruction */ 133 #define ARMV8_AARCH64_SYSREG_OP1_MASK (RT_BIT_32(16) | RT_BIT_32(17) | RT_BIT_32(18)) 134 /** Shift for the op1 part of an MSR/MRS instruction */ 135 #define ARMV8_AARCH64_SYSREG_OP1_SHIFT 16 136 /** Returns the op1 part of the given MRS/MSR instruction. */ 137 #define ARMV8_AARCH64_SYSREG_OP1_GET(a_MsrMrsInsn) (((a_MsrMrsInsn) & ARMV8_AARCH64_SYSREG_OP1_MASK) >> ARMV8_AARCH64_SYSREG_OP1_SHIFT) 138 /** Mask for the CRn part of an MSR/MRS instruction */ 139 #define ARMV8_AARCH64_SYSREG_CRN_MASK ( RT_BIT_32(12) | RT_BIT_32(13) | RT_BIT_32(14) \ 140 | RT_BIT_32(15) ) 141 /** Shift for the CRn part of an MSR/MRS instruction */ 142 #define ARMV8_AARCH64_SYSREG_CRN_SHIFT 12 143 /** Returns the CRn part of the given MRS/MSR instruction. */ 144 #define ARMV8_AARCH64_SYSREG_CRN_GET(a_MsrMrsInsn) (((a_MsrMrsInsn) & ARMV8_AARCH64_SYSREG_CRN_MASK) >> ARMV8_AARCH64_SYSREG_CRN_SHIFT) 145 /** Mask for the CRm part of an MSR/MRS instruction */ 146 #define ARMV8_AARCH64_SYSREG_CRM_MASK ( RT_BIT_32(8) | RT_BIT_32(9) | RT_BIT_32(10) \ 147 | RT_BIT_32(11) ) 148 /** Shift for the CRm part of an MSR/MRS instruction */ 149 #define ARMV8_AARCH64_SYSREG_CRM_SHIFT 8 150 /** Returns the CRn part of the given MRS/MSR instruction. */ 151 #define ARMV8_AARCH64_SYSREG_CRM_GET(a_MsrMrsInsn) (((a_MsrMrsInsn) & ARMV8_AARCH64_SYSREG_CRM_MASK) >> ARMV8_AARCH64_SYSREG_CRM_SHIFT) 152 /** Mask for the op2 part of an MSR/MRS instruction */ 153 #define ARMV8_AARCH64_SYSREG_OP2_MASK (RT_BIT_32(5) | RT_BIT_32(6) | RT_BIT_32(7)) 154 /** Shift for the op2 part of an MSR/MRS instruction */ 155 #define ARMV8_AARCH64_SYSREG_OP2_SHIFT 5 156 /** Returns the op2 part of the given MRS/MSR instruction. */ 157 #define ARMV8_AARCH64_SYSREG_OP2_GET(a_MsrMrsInsn) (((a_MsrMrsInsn) & ARMV8_AARCH64_SYSREG_OP2_MASK) >> ARMV8_AARCH64_SYSREG_OP2_SHIFT) 158 /** Mask for all system register encoding relevant fields in an MRS/MSR instruction. */ 159 #define ARMV8_AARCH64_SYSREG_MASK ( ARMV8_AARCH64_SYSREG_OP0_MASK | ARMV8_AARCH64_SYSREG_OP1_MASK \ 160 | ARMV8_AARCH64_SYSREG_CRN_MASK | ARMV8_AARCH64_SYSREG_CRN_MASK \ 161 | ARMV8_AARCH64_SYSREG_OP2_MASK) 162 163 /** @name Mapping of op0:op1:CRn:CRm:op2 to a system register ID. This is 164 * IPRT specific and not part of the ARMv8 specification. */ 165 #define ARMV8_AARCH64_SYSREG_ID_CREATE(a_Op0, a_Op1, a_CRn, a_CRm, a_Op2) \ 166 UINT16_C( (((a_Op1) & 0x3) << 15) \ 167 | (((a_Op1) & 0x7) << 12) \ 168 | (((a_CRn) & 0xf) << 7) \ 169 | (((a_CRm) & 0xf) << 3) \ 170 | ((a_Op2) & 0x7)) 171 /** Returns the internal system register ID from the given MRS/MSR instruction. */ 172 #define ARMV8_AARCH64_SYSREG_ID_FROM_MRS_MSR(a_MsrMrsInsn) \ 173 ARMV8_AARCH64_SYSREG_ID_CREATE(ARMV8_AARCH64_SYSREG_OP0_GET(a_MsrMrsInsn), \ 174 ARMV8_AARCH64_SYSREG_OP1_GET(a_MsrMrsInsn), \ 175 ARMV8_AARCH64_SYSREG_CRN_GET(a_MsrMrsInsn), \ 176 ARMV8_AARCH64_SYSREG_CRM_GET(a_MsrMrsInsn), \ 177 ARMV8_AARCH64_SYSREG_OP2_GET(a_MsrMrsInsn)) 178 /** Encodes the given system register ID in the given MSR/MRS instruction. */ 179 #define ARMV8_AARCH64_SYSREG_ID_ENCODE_IN_MRS_MSR(a_MsrMrsInsn, a_SysregId) \ 180 ((a_MsrMrsInsn) = ((a_MsrMrsInsn) & ~ARMV8_AARCH64_SYSREG_MASK) | (a_SysregId << ARMV8_AARCH64_SYSREG_OP2_SHIFT)) 181 /** @} */ 182 183 184 /** @name System register IDs. 185 * @{ */ 186 /** MIDR_EL1 register - RO. */ 187 #define ARMV8_AARCH64_SYSREG_MIDR_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 0, 0, 0) 188 /** MIPDR_EL1 register - RO. */ 189 #define ARMV8_AARCH64_SYSREG_MPIDR_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 0, 0, 5) 190 /** REVIDR_EL1 register - RO. */ 191 #define ARMV8_AARCH64_SYSREG_REVIDR_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 0, 0, 6) 192 /** ID_PFR0_EL1 register - RO. */ 193 #define ARMV8_AARCH64_SYSREG_ID_PFR0_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 0, 1, 0) 194 /** ID_PFR1_EL1 register - RO. */ 195 #define ARMV8_AARCH64_SYSREG_ID_PFR1_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 0, 1, 1) 196 /** ID_DFR0_EL1 register - RO. */ 197 #define ARMV8_AARCH64_SYSREG_ID_DFR0_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 0, 1, 2) 198 /** ID_AFR0_EL1 register - RO. */ 199 #define ARMV8_AARCH64_SYSREG_ID_AFR0_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 0, 1, 3) 200 /** ID_MMFR0_EL1 register - RO. */ 201 #define ARMV8_AARCH64_SYSREG_ID_MMFR0_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 0, 1, 4) 202 /** ID_MMFR1_EL1 register - RO. */ 203 #define ARMV8_AARCH64_SYSREG_ID_MMFR1_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 0, 1, 5) 204 /** ID_MMFR2_EL1 register - RO. */ 205 #define ARMV8_AARCH64_SYSREG_ID_MMFR2_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 0, 1, 6) 206 /** ID_MMFR3_EL1 register - RO. */ 207 #define ARMV8_AARCH64_SYSREG_ID_MMFR3_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 0, 1, 7) 208 209 /** ID_ISAR0_EL1 register - RO. */ 210 #define ARMV8_AARCH64_SYSREG_ID_ISAR0_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 0, 2, 0) 211 /** ID_ISAR1_EL1 register - RO. */ 212 #define ARMV8_AARCH64_SYSREG_ID_ISAR1_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 0, 2, 1) 213 /** ID_ISAR2_EL1 register - RO. */ 214 #define ARMV8_AARCH64_SYSREG_ID_ISAR2_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 0, 2, 2) 215 /** ID_ISAR3_EL1 register - RO. */ 216 #define ARMV8_AARCH64_SYSREG_ID_ISAR3_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 0, 2, 3) 217 /** ID_ISAR4_EL1 register - RO. */ 218 #define ARMV8_AARCH64_SYSREG_ID_ISAR4_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 0, 2, 4) 219 /** ID_ISAR5_EL1 register - RO. */ 220 #define ARMV8_AARCH64_SYSREG_ID_ISAR5_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 0, 2, 5) 221 /** ID_MMFR4_EL1 register - RO. */ 222 #define ARMV8_AARCH64_SYSREG_ID_MMFR4_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 0, 2, 6) 223 /** ID_ISAR6_EL1 register - RO. */ 224 #define ARMV8_AARCH64_SYSREG_ID_ISAR6_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 0, 2, 7) 225 226 /** MVFR0_EL1 register - RO. */ 227 #define ARMV8_AARCH64_SYSREG_MVFR0_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 0, 3, 0) 228 /** MVFR1_EL1 register - RO. */ 229 #define ARMV8_AARCH64_SYSREG_MVFR1_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 0, 3, 1) 230 /** MVFR2_EL1 register - RO. */ 231 #define ARMV8_AARCH64_SYSREG_MVFR2_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 0, 3, 2) 232 /** ID_PFR2_EL1 register - RO. */ 233 #define ARMV8_AARCH64_SYSREG_ID_PFR2_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 0, 3, 4) 234 /** ID_DFR1_EL1 register - RO. */ 235 #define ARMV8_AARCH64_SYSREG_ID_DFR1_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 0, 3, 5) 236 /** ID_MMFR5_EL1 register - RO. */ 237 #define ARMV8_AARCH64_SYSREG_ID_MMFR5_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 0, 3, 6) 238 239 /** ID_AA64PFR0_EL1 register - RO. */ 240 #define ARMV8_AARCH64_SYSREG_ID_AA64PFR0_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 0, 4, 0) 241 /** ID_AA64PFR0_EL1 register - RO. */ 242 #define ARMV8_AARCH64_SYSREG_ID_AA64PFR1_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 0, 4, 1) 243 /** ID_AA64ZFR0_EL1 register - RO. */ 244 #define ARMV8_AARCH64_SYSREG_ID_AA64ZFR0_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 0, 4, 4) 245 /** ID_AA64SMFR0_EL1 register - RO. */ 246 #define ARMV8_AARCH64_SYSREG_ID_AA64SMFR0_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 0, 4, 5) 247 248 /** ID_AA64DFR0_EL1 register - RO. */ 249 #define ARMV8_AARCH64_SYSREG_ID_AA64DFR0_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 0, 5, 0) 250 /** ID_AA64DFR0_EL1 register - RO. */ 251 #define ARMV8_AARCH64_SYSREG_ID_AA64DFR1_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 0, 5, 1) 252 /** ID_AA64AFR0_EL1 register - RO. */ 253 #define ARMV8_AARCH64_SYSREG_ID_AA64AFR0_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 0, 5, 4) 254 /** ID_AA64AFR1_EL1 register - RO. */ 255 #define ARMV8_AARCH64_SYSREG_ID_AA64AFR1_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 0, 5, 5) 256 257 /** ID_AA64ISAR0_EL1 register - RO. */ 258 #define ARMV8_AARCH64_SYSREG_ID_AA64ISAR0_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 0, 6, 0) 259 /** ID_AA64ISAR1_EL1 register - RO. */ 260 #define ARMV8_AARCH64_SYSREG_ID_AA64ISAR1_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 0, 6, 1) 261 /** ID_AA64ISAR2_EL1 register - RO. */ 262 #define ARMV8_AARCH64_SYSREG_ID_AA64ISAR2_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 0, 6, 2) 263 264 /** ID_AA64MMFR0_EL1 register - RO. */ 265 #define ARMV8_AARCH64_SYSREG_ID_AA64MMFR0_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 0, 7, 0) 266 /** ID_AA64MMFR1_EL1 register - RO. */ 267 #define ARMV8_AARCH64_SYSREG_ID_AA64MMFR1_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 0, 7, 1) 268 /** ID_AA64MMFR2_EL1 register - RO. */ 269 #define ARMV8_AARCH64_SYSREG_ID_AA64MMFR2_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 0, 7, 2) 270 271 /** SCTRL_EL1 register - RW. */ 272 #define ARMV8_AARCH64_SYSREG_SCTRL_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 1, 0, 0) 273 /** ACTRL_EL1 register - RW. */ 274 #define ARMV8_AARCH64_SYSREG_ACTRL_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 1, 0, 1) 275 /** CPACR_EL1 register - RW. */ 276 #define ARMV8_AARCH64_SYSREG_CPACR_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 1, 0, 2) 277 /** RGSR_EL1 register - RW. */ 278 #define ARMV8_AARCH64_SYSREG_RGSR_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 1, 0, 5) 279 /** GCR_EL1 register - RW. */ 280 #define ARMV8_AARCH64_SYSREG_GCR_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 1, 0, 6) 281 282 /** ZCR_EL1 register - RW. */ 283 #define ARMV8_AARCH64_SYSREG_ZCR_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 1, 2, 0) 284 /** TRFCR_EL1 register - RW. */ 285 #define ARMV8_AARCH64_SYSREG_TRFCR_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 1, 2, 1) 286 /** SMPRI_EL1 register - RW. */ 287 #define ARMV8_AARCH64_SYSREG_SMPRI_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 1, 2, 4) 288 /** SMCR_EL1 register - RW. */ 289 #define ARMV8_AARCH64_SYSREG_SMCR_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 1, 2, 6) 290 291 /** TTBR0_EL1 register - RW. */ 292 #define ARMV8_AARCH64_SYSREG_TTBR0_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 2, 0, 0) 293 /** TTBR1_EL1 register - RW. */ 294 #define ARMV8_AARCH64_SYSREG_TTBR1_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 2, 0, 1) 295 /** TCR_EL1 register - RW. */ 296 #define ARMV8_AARCH64_SYSREG_TCR_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 2, 0, 2) 297 298 /** @todo APIA,APIB,APDA,APDB,APGA registers. */ 299 300 /** SPSR_EL1 register - RW. */ 301 #define ARMV8_AARCH64_SYSREG_SPSR_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 4, 0, 0) 302 /** ELR_EL1 register - RW. */ 303 #define ARMV8_AARCH64_SYSREG_ELR_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 4, 0, 1) 304 305 /** SP_EL0 register - RW. */ 306 #define ARMV8_AARCH64_SYSREG_SP_EL0 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 4, 1, 0) 307 308 /** PSTATE.SPSel value. */ 309 #define ARMV8_AARCH64_SYSREG_SPSEL ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 4, 2, 0) 310 /** PSTATE.CurrentEL value. */ 311 #define ARMV8_AARCH64_SYSREG_CURRENTEL ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 4, 2, 2) 312 /** PSTATE.PAN value. */ 313 #define ARMV8_AARCH64_SYSREG_PAN ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 4, 2, 3) 314 /** PSTATE.UAO value. */ 315 #define ARMV8_AARCH64_SYSREG_UAO ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 4, 2, 4) 316 317 /** PSTATE.ALLINT value. */ 318 #define ARMV8_AARCH64_SYSREG_ALLINT ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 4, 3, 0) 319 320 321 /** AFSR0_EL1 register - RW. */ 322 #define ARMV8_AARCH64_SYSREG_AFSR0_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 5, 1, 0) 323 /** AFSR1_EL1 register - RW. */ 324 #define ARMV8_AARCH64_SYSREG_AFSR1_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 5, 1, 1) 325 326 /** ESR_EL1 register - RW. */ 327 #define ARMV8_AARCH64_SYSREG_ESR_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 5, 2, 0) 328 329 /** ERRIDR_EL1 register - RO. */ 330 #define ARMV8_AARCH64_SYSREG_ERRIDR_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 5, 3, 0) 331 /** ERRSELR_EL1 register - RW. */ 332 #define ARMV8_AARCH64_SYSREG_ERRSELR_EL1 ARMV8_AARCH64_SYSREG_ID_CREATE(3, 0, 5, 3, 1) 333 334 /** @} */ 335 336 /** @} */ 337 53 338 54 339 /** … … 389 674 /** @} */ 390 675 676 677 /** @name ISS encoding for trapped MSR, MRS or System instruction exceptions. 678 * @{ */ 679 /** Bit 0 - Direction flag. */ 680 #define ARMV8_EC_ISS_AARCH64_TRAPPED_SYS_INSN_DIRECTION RT_BIT_32(0) 681 #define ARMV8_EC_ISS_AARCH64_TRAPPED_SYS_INSN_DIRECTION_IS_READ(a_Iss) RT_BOOL((a_Iss) & ARMV8_EC_ISS_AARCH64_TRAPPED_SYS_INSN_DIRECTION) 682 /** Bit 1 - 4 - CRm value from the instruction. */ 683 #define ARMV8_EC_ISS_AARCH64_TRAPPED_SYS_INSN_CRM ( RT_BIT_32(1) | RT_BIT_32(2) | RT_BIT_32(3) \ 684 | RT_BIT_32(4)) 685 #define ARMV8_EC_ISS_AARCH64_TRAPPED_SYS_INSN_CRM_GET(a_Iss) (((a_Iss) & ARMV8_EC_ISS_AARCH64_TRAPPED_SYS_INSN_CRM) >> 10) 686 /** Bit 5 - 9 - Rt value from the instruction. */ 687 #define ARMV8_EC_ISS_AARCH64_TRAPPED_SYS_INSN_RT ( RT_BIT_32(5) | RT_BIT_32(6) | RT_BIT_32(7) \ 688 | RT_BIT_32(8) | RT_BIT_32(9)) 689 #define ARMV8_EC_ISS_AARCH64_TRAPPED_SYS_INSN_RT_GET(a_Iss) (((a_Iss) & ARMV8_EC_ISS_AARCH64_TRAPPED_SYS_INSN_RT) >> 5) 690 /** Bit 10 - 13 - CRn value from the instruction. */ 691 #define ARMV8_EC_ISS_AARCH64_TRAPPED_SYS_INSN_CRN ( RT_BIT_32(10) | RT_BIT_32(11) | RT_BIT_32(12) \ 692 | RT_BIT_32(13)) 693 #define ARMV8_EC_ISS_AARCH64_TRAPPED_SYS_INSN_CRN_GET(a_Iss) (((a_Iss) & ARMV8_EC_ISS_AARCH64_TRAPPED_SYS_INSN_CRN) >> 10) 694 /** Bit 14 - 16 - Op2 value from the instruction. */ 695 #define ARMV8_EC_ISS_AARCH64_TRAPPED_SYS_INSN_OP1 (RT_BIT_32(14) | RT_BIT_32(15) | RT_BIT_32(16)) 696 #define ARMV8_EC_ISS_AARCH64_TRAPPED_SYS_INSN_OP1_GET(a_Iss) (((a_Iss) & ARMV8_EC_ISS_AARCH64_TRAPPED_SYS_INSN_OP1) >> 14) 697 /** Bit 17 - 19 - Op2 value from the instruction. */ 698 #define ARMV8_EC_ISS_AARCH64_TRAPPED_SYS_INSN_OP2 (RT_BIT_32(17) | RT_BIT_32(18) | RT_BIT_32(19)) 699 #define ARMV8_EC_ISS_AARCH64_TRAPPED_SYS_INSN_OP2_GET(a_Iss) (((a_Iss) & ARMV8_EC_ISS_AARCH64_TRAPPED_SYS_INSN_OP2) >> 17) 700 /** Bit 20 - 21 - Op0 value from the instruction. */ 701 #define ARMV8_EC_ISS_AARCH64_TRAPPED_SYS_INSN_OP0 (RT_BIT_32(20) | RT_BIT_32(21)) 702 #define ARMV8_EC_ISS_AARCH64_TRAPPED_SYS_INSN_OP0_GET(a_Iss) (((a_Iss) & ARMV8_EC_ISS_AARCH64_TRAPPED_SYS_INSN_OP0) >> 20) 703 /** Bit 22 - 24 - Reserved. */ 704 #define ARMV8_EC_ISS_AARCH64_TRAPPED_SYS_INSN_RSVD (RT_BIT_32(22) | RT_BIT_32(23) | RT_BIT_32(24)) 705 /** @} */ 706 391 707 /** @} */ 392 708
Note:
See TracChangeset
for help on using the changeset viewer.