Changes in kernel/arch/ia64/include/register.h [5bda2f3e:8b4d6cb] in mainline
- File:
-
- 1 edited
-
kernel/arch/ia64/include/register.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia64/include/register.h
r5bda2f3e r8b4d6cb 27 27 */ 28 28 29 /** @addtogroup ia64 29 /** @addtogroup ia64 30 30 * @{ 31 31 */ … … 36 36 #define KERN_ia64_REGISTER_H_ 37 37 38 #define DCR_PP_MASK (1 << 0) 39 #define DCR_BE_MASK (1 << 1) 40 #define DCR_LC_MASK (1 << 2) 41 #define DCR_DM_MASK (1 << 8) 42 #define DCR_DP_MASK (1 << 9) 43 #define DCR_DK_MASK (1 << 10) 44 #define DCR_DX_MASK (1 << 11) 45 #define DCR_DR_MASK (1 << 12) 46 #define DCR_DA_MASK (1 << 13) 47 #define DCR_DD_MASK (1 << 14) 48 49 #define CR_IVR_MASK 0x0f 50 51 #define PSR_IC_MASK (1 << 13) 52 #define PSR_I_MASK (1 << 14) 53 #define PSR_PK_MASK (1 << 15) 54 #define PSR_DT_MASK (1 << 17) 55 #define PSR_DFL_MASK (1 << 18) 56 #define PSR_DFH_MASK (1 << 19) 57 #define PSR_RT_MASK (1 << 27) 58 #define PSR_IT_MASK (1 << 36) 59 60 #define PSR_CPL_SHIFT 32 61 #define PSR_CPL_MASK_SHIFTED 3 62 63 #define PFM_MASK (~0x3fffffffff) 64 65 #define RSC_MODE_MASK 3 66 #define RSC_PL_MASK 12 38 #define CR_IVR_MASK 0xf 39 #define PSR_IC_MASK 0x2000 40 #define PSR_I_MASK 0x4000 41 #define PSR_PK_MASK 0x8000 42 43 #define PSR_DT_MASK (1 << 17) 44 #define PSR_RT_MASK (1 << 27) 45 46 #define PSR_DFL_MASK (1 << 18) 47 #define PSR_DFH_MASK (1 << 19) 48 49 #define PSR_IT_MASK 0x0000001000000000 50 51 #define PSR_CPL_SHIFT 32 52 #define PSR_CPL_MASK_SHIFTED 3 53 54 #define PFM_MASK (~0x3fffffffff) 55 56 #define RSC_MODE_MASK 3 57 #define RSC_PL_MASK 12 67 58 68 59 /** Application registers. */ 69 #define AR_KR0 070 #define AR_KR1 171 #define AR_KR2 272 #define AR_KR3 373 #define AR_KR4 474 #define AR_KR5 575 #define AR_KR6 676 #define AR_KR7 777 /* AR s 8-15 arereserved */78 #define AR_RSC 1679 #define AR_BSP 1780 #define AR_BSPSTORE 1881 #define AR_RNAT 1982 /* AR 20 isreserved */83 #define AR_FCR 2184 /* AR s 22-23 arereserved */85 #define AR_EFLAG 2486 #define AR_CSD 2587 #define AR_SSD 2688 #define AR_CFLG 2789 #define AR_FSR 2890 #define AR_FIR 2991 #define AR_FDR 3092 /* AR 31 isreserved */93 #define AR_CCV 3294 /* AR s 33-35 arereserved */95 #define AR_UNAT 3696 /* AR s 37-39 arereserved */97 #define AR_FPSR 4098 /* AR s 41-43 arereserved */99 #define AR_ITC 44100 /* AR s 45-47 arereserved */101 /* AR s 48-63 areignored */102 #define AR_PFS 64103 #define AR_LC 65104 #define AR_EC 66105 /* AR s 67-111 arereserved */106 /* AR s 112-127 areignored */60 #define AR_KR0 0 61 #define AR_KR1 1 62 #define AR_KR2 2 63 #define AR_KR3 3 64 #define AR_KR4 4 65 #define AR_KR5 5 66 #define AR_KR6 6 67 #define AR_KR7 7 68 /* AR 8-15 reserved */ 69 #define AR_RSC 16 70 #define AR_BSP 17 71 #define AR_BSPSTORE 18 72 #define AR_RNAT 19 73 /* AR 20 reserved */ 74 #define AR_FCR 21 75 /* AR 22-23 reserved */ 76 #define AR_EFLAG 24 77 #define AR_CSD 25 78 #define AR_SSD 26 79 #define AR_CFLG 27 80 #define AR_FSR 28 81 #define AR_FIR 29 82 #define AR_FDR 30 83 /* AR 31 reserved */ 84 #define AR_CCV 32 85 /* AR 33-35 reserved */ 86 #define AR_UNAT 36 87 /* AR 37-39 reserved */ 88 #define AR_FPSR 40 89 /* AR 41-43 reserved */ 90 #define AR_ITC 44 91 /* AR 45-47 reserved */ 92 /* AR 48-63 ignored */ 93 #define AR_PFS 64 94 #define AR_LC 65 95 #define AR_EC 66 96 /* AR 67-111 reserved */ 97 /* AR 112-127 ignored */ 107 98 108 99 /** Control registers. */ 109 #define CR_DCR 0110 #define CR_ITM 1111 #define CR_IVA 2112 /* CR3-CR7 arereserved */113 #define CR_PTA 8114 /* CR9-CR15 arereserved */115 #define CR_IPSR 16116 #define CR_ISR 17117 /* CR18 isreserved */118 #define CR_IIP 19119 #define CR_IFA 20120 #define CR_ITIR 21121 #define CR_IIPA 22122 #define CR_IFS 23123 #define CR_IIM 24124 #define CR_IHA 25125 /* CR26-CR63 arereserved */126 #define CR_LID 64127 #define CR_IVR 65128 #define CR_TPR 66129 #define CR_EOI 67130 #define CR_IRR0 68131 #define CR_IRR1 69132 #define CR_IRR2 70133 #define CR_IRR3 71134 #define CR_ITV 72135 #define CR_PMV 73136 #define CR_CMCV 74137 /* CR75-CR79 arereserved */138 #define CR_LRR0 80139 #define CR_LRR1 81140 /* CR82-CR127 arereserved */100 #define CR_DCR 0 101 #define CR_ITM 1 102 #define CR_IVA 2 103 /* CR3-CR7 reserved */ 104 #define CR_PTA 8 105 /* CR9-CR15 reserved */ 106 #define CR_IPSR 16 107 #define CR_ISR 17 108 /* CR18 reserved */ 109 #define CR_IIP 19 110 #define CR_IFA 20 111 #define CR_ITIR 21 112 #define CR_IIPA 22 113 #define CR_IFS 23 114 #define CR_IIM 24 115 #define CR_IHA 25 116 /* CR26-CR63 reserved */ 117 #define CR_LID 64 118 #define CR_IVR 65 119 #define CR_TPR 66 120 #define CR_EOI 67 121 #define CR_IRR0 68 122 #define CR_IRR1 69 123 #define CR_IRR2 70 124 #define CR_IRR3 71 125 #define CR_ITV 72 126 #define CR_PMV 73 127 #define CR_CMCV 74 128 /* CR75-CR79 reserved */ 129 #define CR_LRR0 80 130 #define CR_LRR1 81 131 /* CR82-CR127 reserved */ 141 132 142 133 #ifndef __ASM__ … … 145 136 146 137 /** Processor Status Register. */ 147 typedef union { 148 uint64_t value; 149 struct { 150 unsigned int : 1; 151 unsigned int be : 1; /**< Big-Endian data accesses. */ 152 unsigned int up : 1; /**< User Performance monitor enable. */ 153 unsigned int ac : 1; /**< Alignment Check. */ 154 unsigned int mfl : 1; /**< Lower floating-point register written. */ 155 unsigned int mfh : 1; /**< Upper floating-point register written. */ 156 unsigned int : 7; 157 unsigned int ic : 1; /**< Interruption Collection. */ 158 unsigned int i : 1; /**< Interrupt Bit. */ 159 unsigned int pk : 1; /**< Protection Key enable. */ 160 unsigned int : 1; 161 unsigned int dt : 1; /**< Data address Translation. */ 162 unsigned int dfl : 1; /**< Disabled Floating-point Low register set. */ 163 unsigned int dfh : 1; /**< Disabled Floating-point High register set. */ 164 unsigned int sp : 1; /**< Secure Performance monitors. */ 165 unsigned int pp : 1; /**< Privileged Performance monitor enable. */ 166 unsigned int di : 1; /**< Disable Instruction set transition. */ 167 unsigned int si : 1; /**< Secure Interval timer. */ 168 unsigned int db : 1; /**< Debug Breakpoint fault. */ 169 unsigned int lp : 1; /**< Lower Privilege transfer trap. */ 170 unsigned int tb : 1; /**< Taken Branch trap. */ 171 unsigned int rt : 1; /**< Register Stack Translation. */ 172 unsigned int : 4; 173 unsigned int cpl : 2; /**< Current Privilege Level. */ 174 unsigned int is : 1; /**< Instruction Set. */ 175 unsigned int mc : 1; /**< Machine Check abort mask. */ 176 unsigned int it : 1; /**< Instruction address Translation. */ 177 unsigned int id : 1; /**< Instruction Debug fault disable. */ 178 unsigned int da : 1; /**< Disable Data Access and Dirty-bit faults. */ 179 unsigned int dd : 1; /**< Data Debug fault disable. */ 180 unsigned int ss : 1; /**< Single Step enable. */ 181 unsigned int ri : 2; /**< Restart Instruction. */ 182 unsigned int ed : 1; /**< Exception Deferral. */ 183 unsigned int bn : 1; /**< Register Bank. */ 184 unsigned int ia : 1; /**< Disable Instruction Access-bit faults. */ 185 } __attribute__ ((packed)); 186 } psr_t; 138 union psr { 139 uint64_t value; 140 struct { 141 unsigned : 1; 142 unsigned be : 1; /**< Big-Endian data accesses. */ 143 unsigned up : 1; /**< User Performance monitor enable. */ 144 unsigned ac : 1; /**< Alignment Check. */ 145 unsigned mfl : 1; /**< Lower floating-point register written. */ 146 unsigned mfh : 1; /**< Upper floating-point register written. */ 147 unsigned : 7; 148 unsigned ic : 1; /**< Interruption Collection. */ 149 unsigned i : 1; /**< Interrupt Bit. */ 150 unsigned pk : 1; /**< Protection Key enable. */ 151 unsigned : 1; 152 unsigned dt : 1; /**< Data address Translation. */ 153 unsigned dfl : 1; /**< Disabled Floating-point Low register set. */ 154 unsigned dfh : 1; /**< Disabled Floating-point High register set. */ 155 unsigned sp : 1; /**< Secure Performance monitors. */ 156 unsigned pp : 1; /**< Privileged Performance monitor enable. */ 157 unsigned di : 1; /**< Disable Instruction set transition. */ 158 unsigned si : 1; /**< Secure Interval timer. */ 159 unsigned db : 1; /**< Debug Breakpoint fault. */ 160 unsigned lp : 1; /**< Lower Privilege transfer trap. */ 161 unsigned tb : 1; /**< Taken Branch trap. */ 162 unsigned rt : 1; /**< Register Stack Translation. */ 163 unsigned : 4; 164 unsigned cpl : 2; /**< Current Privilege Level. */ 165 unsigned is : 1; /**< Instruction Set. */ 166 unsigned mc : 1; /**< Machine Check abort mask. */ 167 unsigned it : 1; /**< Instruction address Translation. */ 168 unsigned id : 1; /**< Instruction Debug fault disable. */ 169 unsigned da : 1; /**< Disable Data Access and Dirty-bit faults. */ 170 unsigned dd : 1; /**< Data Debug fault disable. */ 171 unsigned ss : 1; /**< Single Step enable. */ 172 unsigned ri : 2; /**< Restart Instruction. */ 173 unsigned ed : 1; /**< Exception Deferral. */ 174 unsigned bn : 1; /**< Register Bank. */ 175 unsigned ia : 1; /**< Disable Instruction Access-bit faults. */ 176 } __attribute__ ((packed)); 177 }; 178 typedef union psr psr_t; 187 179 188 180 /** Register Stack Configuration Register */ 189 typedef union { 190 uint64_t value; 191 struct { 192 unsigned int mode : 2; 193 unsigned int pl : 2; /**< Privilege Level. */ 194 unsigned int be : 1; /**< Big-endian. */ 195 unsigned int : 11; 196 unsigned int loadrs : 14; 197 } __attribute__ ((packed)); 198 } rsc_t; 181 union rsc { 182 uint64_t value; 183 struct { 184 unsigned mode : 2; 185 unsigned pl : 2; /**< Privilege Level. */ 186 unsigned be : 1; /**< Big-endian. */ 187 unsigned : 11; 188 unsigned loadrs : 14; 189 } __attribute__ ((packed)); 190 }; 191 typedef union rsc rsc_t; 199 192 200 193 /** External Interrupt Vector Register */ 201 typedef union { 202 uint8_t vector; 203 uint64_t value; 204 } cr_ivr_t; 194 union cr_ivr { 195 uint8_t vector; 196 uint64_t value; 197 }; 198 199 typedef union cr_ivr cr_ivr_t; 205 200 206 201 /** Task Priority Register */ 207 typedef union { 208 uint64_t value; 209 struct { 210 unsigned int : 4; 211 unsigned int mic: 4; /**< Mask Interrupt Class. */ 212 unsigned int : 8; 213 unsigned int mmi: 1; /**< Mask Maskable Interrupts. */ 214 } __attribute__ ((packed)); 215 } cr_tpr_t; 202 union cr_tpr { 203 struct { 204 unsigned : 4; 205 unsigned mic: 4; /**< Mask Interrupt Class. */ 206 unsigned : 8; 207 unsigned mmi: 1; /**< Mask Maskable Interrupts. */ 208 } __attribute__ ((packed)); 209 uint64_t value; 210 }; 211 212 typedef union cr_tpr cr_tpr_t; 216 213 217 214 /** Interval Timer Vector */ 218 typedef union { 219 uint64_t value; 220 struct { 221 unsigned int vector : 8; 222 unsigned int : 4; 223 unsigned int : 1; 224 unsigned int : 3; 225 unsigned int m : 1; /**< Mask. */ 226 } __attribute__ ((packed)); 227 } cr_itv_t; 215 union cr_itv { 216 struct { 217 unsigned vector : 8; 218 unsigned : 4; 219 unsigned : 1; 220 unsigned : 3; 221 unsigned m : 1; /**< Mask. */ 222 } __attribute__ ((packed)); 223 uint64_t value; 224 }; 225 226 typedef union cr_itv cr_itv_t; 228 227 229 228 /** Interruption Status Register */ 230 typedef union { 231 uint64_t value; 229 union cr_isr { 232 230 struct { 233 231 union { 234 232 /** General Exception code field structuring. */ 233 struct { 234 unsigned ge_na : 4; 235 unsigned ge_code : 4; 236 } __attribute__ ((packed)); 235 237 uint16_t code; 236 struct {237 unsigned int ge_na : 4;238 unsigned int ge_code : 4;239 } __attribute__ ((packed));240 238 }; 241 239 uint8_t vector; 242 unsigned int : 8; 243 unsigned int x : 1; /**< Execute exception. */ 244 unsigned int w : 1; /**< Write exception. */ 245 unsigned int r : 1; /**< Read exception. */ 246 unsigned int na : 1; /**< Non-access exception. */ 247 unsigned int sp : 1; /**< Speculative load exception. */ 248 unsigned int rs : 1; /**< Register stack. */ 249 unsigned int ir : 1; /**< Incomplete Register frame. */ 250 unsigned int ni : 1; /**< Nested Interruption. */ 251 unsigned int so : 1; /**< IA-32 Supervisor Override. */ 252 unsigned int ei : 2; /**< Excepting Instruction. */ 253 unsigned int ed : 1; /**< Exception Deferral. */ 254 unsigned int : 20; 255 } __attribute__ ((packed)); 256 } cr_isr_t; 240 unsigned : 8; 241 unsigned x : 1; /**< Execute exception. */ 242 unsigned w : 1; /**< Write exception. */ 243 unsigned r : 1; /**< Read exception. */ 244 unsigned na : 1; /**< Non-access exception. */ 245 unsigned sp : 1; /**< Speculative load exception. */ 246 unsigned rs : 1; /**< Register stack. */ 247 unsigned ir : 1; /**< Incomplete Register frame. */ 248 unsigned ni : 1; /**< Nested Interruption. */ 249 unsigned so : 1; /**< IA-32 Supervisor Override. */ 250 unsigned ei : 2; /**< Excepting Instruction. */ 251 unsigned ed : 1; /**< Exception Deferral. */ 252 unsigned : 20; 253 } __attribute__ ((packed)); 254 uint64_t value; 255 }; 256 257 typedef union cr_isr cr_isr_t; 257 258 258 259 /** CPUID Register 3 */ 259 typedef union { 260 uint64_t value; 260 union cpuid3 { 261 261 struct { 262 262 uint8_t number; … … 266 266 uint8_t archrev; 267 267 } __attribute__ ((packed)); 268 } cpuid3_t; 268 uint64_t value; 269 }; 270 271 typedef union cpuid3 cpuid3_t; 269 272 270 273 #endif /* !__ASM__ */
Note:
See TracChangeset
for help on using the changeset viewer.
