Changeset b3f8fb7 in mainline for kernel/arch/ia32/include/smp/apic.h
- Timestamp:
- 2007-01-28T13:25:49Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8e8c1a5
- Parents:
- 1ba41c5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/include/smp/apic.h
r1ba41c5 rb3f8fb7 108 108 #define ICRlo (0x300/sizeof(uint32_t)) 109 109 #define ICRhi (0x310/sizeof(uint32_t)) 110 struct icr{110 typedef struct { 111 111 union { 112 112 uint32_t lo; … … 131 131 } __attribute__ ((packed)); 132 132 }; 133 } __attribute__ ((packed)); 134 typedef struct icr icr_t; 133 } __attribute__ ((packed)) icr_t; 135 134 136 135 /* End Of Interrupt. */ … … 139 138 /** Error Status Register. */ 140 139 #define ESR (0x280/sizeof(uint32_t)) 141 union esr{140 typedef union { 142 141 uint32_t value; 143 142 uint8_t err_bitmap; … … 153 152 unsigned : 24; 154 153 } __attribute__ ((packed)); 155 }; 156 typedef union esr esr_t; 154 } esr_t; 157 155 158 156 /* Task Priority Register */ 159 157 #define TPR (0x080/sizeof(uint32_t)) 160 union tpr{158 typedef union { 161 159 uint32_t value; 162 160 struct { … … 164 162 unsigned pri : 4; /**< Task Priority. */ 165 163 } __attribute__ ((packed)); 166 }; 167 typedef union tpr tpr_t; 164 } tpr_t; 168 165 169 166 /** Spurious-Interrupt Vector Register. */ 170 167 #define SVR (0x0f0/sizeof(uint32_t)) 171 union svr{168 typedef union { 172 169 uint32_t value; 173 170 struct { … … 177 174 unsigned : 22; /**< Reserved. */ 178 175 } __attribute__ ((packed)); 179 }; 180 typedef union svr svr_t; 176 } svr_t; 181 177 182 178 /** Time Divide Configuration Register. */ 183 179 #define TDCR (0x3e0/sizeof(uint32_t)) 184 union tdcr{180 typedef union { 185 181 uint32_t value; 186 182 struct { … … 188 184 unsigned : 28; /**< Reserved. */ 189 185 } __attribute__ ((packed)); 190 }; 191 typedef union tdcr tdcr_t; 186 } tdcr_t; 192 187 193 188 /* Initial Count Register for Timer */ … … 199 194 /** LVT Timer register. */ 200 195 #define LVT_Tm (0x320/sizeof(uint32_t)) 201 union lvt_tm{196 typedef union { 202 197 uint32_t value; 203 198 struct { … … 210 205 unsigned : 14; /**< Reserved. */ 211 206 } __attribute__ ((packed)); 212 }; 213 typedef union lvt_tm lvt_tm_t; 207 } lvt_tm_t; 214 208 215 209 /** LVT LINT registers. */ 216 210 #define LVT_LINT0 (0x350/sizeof(uint32_t)) 217 211 #define LVT_LINT1 (0x360/sizeof(uint32_t)) 218 union lvt_lint{212 typedef union { 219 213 uint32_t value; 220 214 struct { … … 229 223 unsigned : 15; /**< Reserved. */ 230 224 } __attribute__ ((packed)); 231 }; 232 typedef union lvt_lint lvt_lint_t; 225 } lvt_lint_t; 233 226 234 227 /** LVT Error register. */ 235 228 #define LVT_Err (0x370/sizeof(uint32_t)) 236 union lvt_error{229 typedef union { 237 230 uint32_t value; 238 231 struct { … … 244 237 unsigned : 15; /**< Reserved. */ 245 238 } __attribute__ ((packed)); 246 }; 247 typedef union lvt_error lvt_error_t; 239 } lvt_error_t; 248 240 249 241 /** Local APIC ID Register. */ 250 242 #define L_APIC_ID (0x020/sizeof(uint32_t)) 251 union l_apic_id{243 typedef union { 252 244 uint32_t value; 253 245 struct { … … 255 247 uint8_t apic_id; /**< Local APIC ID. */ 256 248 } __attribute__ ((packed)); 257 }; 258 typedef union l_apic_id l_apic_id_t; 249 } l_apic_id_t; 259 250 260 251 /** Local APIC Version Register */ … … 267 258 /** Logical Destination Register. */ 268 259 #define LDR (0x0d0/sizeof(uint32_t)) 269 union ldr{260 typedef union { 270 261 uint32_t value; 271 262 struct { … … 273 264 uint8_t id; /**< Logical APIC ID. */ 274 265 } __attribute__ ((packed)); 275 }; 276 typedef union ldr ldr_t; 266 } ldr_t; 277 267 278 268 /** Destination Format Register. */ 279 269 #define DFR (0x0e0/sizeof(uint32_t)) 280 union dfr{270 typedef union { 281 271 uint32_t value; 282 272 struct { … … 284 274 unsigned model : 4; /**< Model. */ 285 275 } __attribute__ ((packed)); 286 }; 287 typedef union dfr dfr_t; 276 } dfr_t; 288 277 289 278 /* IO APIC */ … … 297 286 298 287 /** I/O Register Select Register. */ 299 union io_regsel{288 typedef union { 300 289 uint32_t value; 301 290 struct { … … 303 292 unsigned : 24; /**< Reserved. */ 304 293 } __attribute__ ((packed)); 305 }; 306 typedef union io_regsel io_regsel_t; 294 } io_regsel_t; 307 295 308 296 /** I/O Redirection Register. */ 309 struct io_redirection_reg {297 typedef struct io_redirection_reg { 310 298 union { 311 299 uint32_t lo; … … 330 318 }; 331 319 332 } __attribute__ ((packed)); 333 typedef struct io_redirection_reg io_redirection_reg_t; 320 } __attribute__ ((packed)) io_redirection_reg_t; 334 321 335 322 336 323 /** IO APIC Identification Register. */ 337 union io_apic_id{324 typedef union { 338 325 uint32_t value; 339 326 struct { … … 342 329 unsigned : 4; /**< Reserved. */ 343 330 } __attribute__ ((packed)); 344 }; 345 typedef union io_apic_id io_apic_id_t; 331 } io_apic_id_t; 346 332 347 333 extern volatile uint32_t *l_apic;
Note:
See TracChangeset
for help on using the changeset viewer.