Changeset c9b8c5c in mainline for arch/ia32/src/smp/apic.c
- Timestamp:
- 2005-04-24T21:59:33Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ad36bd6
- Parents:
- f07bba5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia32/src/smp/apic.c
rf07bba5 rc9b8c5c 104 104 } 105 105 106 107 108 106 /* 109 107 * Configure the BSP's lapic. … … 184 182 l_apic[ICRhi] = hi; 185 183 l_apic[ICRlo] = lo; 186 184 187 185 /* 188 186 * According to MP Specification, 20us should be enough to … … 196 194 if (lo & SEND_PENDING) 197 195 printf("IPI is pending.\n"); 198 196 199 197 l_apic[ICRlo] = lo | DLVRMODE_INIT | DESTMODE_PHYS | LEVEL_DEASSERT | SHORTHAND_DEST | TRGRMODE_LEVEL; 200 198 … … 204 202 delay(10000); 205 203 206 /* 207 * MP specification says this should not be done for 82489DX-based 208 * l_apic's. However, everything is ok as long as STARTUP IPI is ignored 209 * by 8249DX. 210 */ 211 for (i = 0; i < 2; i++) { 212 lo = l_apic[ICRlo] & ICRloClear; 213 lo |= ((__address) ap_boot) / 4096; /* calculate the reset vector */ 214 l_apic[ICRlo] = lo | DLVRMODE_STUP | DESTMODE_PHYS | LEVEL_ASSERT | SHORTHAND_DEST | TRGRMODE_LEVEL; 215 delay(200); 216 } 204 if (!is_82489DX_apic(l_apic[LAVR])) { 205 /* 206 * If this is not 82489DX-based l_apic we must send two STARTUP IPI's. 207 */ 208 for (i = 0; i<2; i++) { 209 lo = l_apic[ICRlo] & ICRloClear; 210 lo |= ((__address) ap_boot) / 4096; /* calculate the reset vector */ 211 l_apic[ICRlo] = lo | DLVRMODE_STUP | DESTMODE_PHYS | LEVEL_ASSERT | SHORTHAND_DEST | TRGRMODE_LEVEL; 212 delay(200); 213 } 214 } 215 217 216 218 217 return apic_poll_errors(); … … 222 221 { 223 222 __u32 tmp, t1, t2; 224 int cpu_id = config.cpu_active - 1;225 226 227 /*228 * Here we set local APIC ID's so that they match operating system's CPU ID's229 * This operation is dangerous as it is model specific.230 * TODO: some care should be taken.231 * NOTE: CPU may not be used to define APIC ID232 */233 if (l_apic_id() != cpu_id) {234 l_apic[L_APIC_ID] &= L_APIC_IDClear;235 l_apic[L_APIC_ID] |= (l_apic[L_APIC_ID]&L_APIC_IDClear)|((cpu_id)<<L_APIC_IDShift);236 }237 223 238 224 l_apic[LVT_Err] |= (1<<16); … … 245 231 l_apic[TPR] &= TPRClear; 246 232 247 if (CPU->arch.family >= 6)248 enable_l_apic_in_msr();233 // if (CPU->arch.family >= 6) 234 // enable_l_apic_in_msr(); 249 235 250 236 tmp = l_apic[ICRlo] & ICRloClear;
Note:
See TracChangeset
for help on using the changeset viewer.