Changeset 93e90c7 in mainline
- Timestamp:
- 2006-01-02T22:10:11Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0132630
- Parents:
- 95d191c
- Location:
- arch/ia32
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia32/include/smp/apic.h
r95d191c r93e90c7 94 94 /** Destination masks. */ 95 95 #define DEST_ALL 0xff 96 97 /** Dest format models. */ 98 #define MODEL_FLAT 0xf 99 #define MODEL_CLUSTER 0x0 96 100 97 101 /** Interrupt Command Register. */ … … 248 252 #define is_local_xapic(x) (((x)&LAVR_Mask)==0x14) 249 253 254 /** Logical Destination Register. */ 255 #define LDR (0x0d0/sizeof(__u32)) 256 union ldr { 257 __u32 value; 258 struct { 259 unsigned : 24; /**< Reserver. */ 260 __u8 id; /**< Logical APIC ID. */ 261 } __attribute__ ((packed)); 262 }; 263 typedef union ldr ldr_t; 264 265 /** Destination Format Register. */ 266 #define DFR (0x0e0/sizeof(__u32)) 267 union dfr { 268 __u32 value; 269 struct { 270 unsigned : 28; /**< Reserved, all ones. */ 271 unsigned model : 4; /**< Model. */ 272 } __attribute__ ((packed)); 273 }; 274 typedef union dfr dfr_t; 275 250 276 /* IO APIC */ 251 277 #define IOREGSEL (0x00/sizeof(__u32)) -
arch/ia32/src/smp/apic.c
r95d191c r93e90c7 44 44 * Advanced Programmable Interrupt Controller for SMP systems. 45 45 * Tested on: 46 * Bochs 2.0.2 - Bochs 2.2 with 2-8 CPUs46 * Bochs 2.0.2 - Bochs 2.2.5 with 2-8 CPUs 47 47 * Simics 2.0.28 - Simics 2.2.19 2-15 CPUs 48 48 * VMware Workstation 5.5 with 2 CPUs … … 312 312 tdcr_t tdcr; 313 313 lvt_tm_t tm; 314 ldr_t ldr; 315 dfr_t dfr; 314 316 __u32 t1, t2; 315 317 … … 373 375 374 376 l_apic[ICRT] = t1-t2; 377 378 /* Program Logical Destination Register. */ 379 ldr.value = l_apic[LDR]; 380 if (CPU->id < sizeof(CPU->id)*8) /* size in bits */ 381 ldr.id = (1<<CPU->id); 382 l_apic[LDR] = ldr.value; 383 384 /* Program Destination Format Register for Flat mode. */ 385 dfr.value = l_apic[DFR]; 386 dfr.model = MODEL_FLAT; 387 l_apic[DFR] = dfr.value; 375 388 } 376 389 … … 471 484 dlvr = DELMOD_LOWPRI; 472 485 473 474 486 reg.lo = io_apic_read(IOREDTBL + pin*2); 475 487 reg.hi = io_apic_read(IOREDTBL + pin*2 + 1); 476 488 477 reg.dest = 489 reg.dest = dest; 478 490 reg.destmod = DESTMOD_LOGIC; 479 491 reg.trigger_mode = TRIGMOD_EDGE;
Note:
See TracChangeset
for help on using the changeset viewer.