Changeset 9cb107c9 in rtems
- Timestamp:
- 07/03/20 12:31:47 (4 years ago)
- Branches:
- master
- Children:
- 3a95a07d
- Parents:
- a3ed4219
- git-author:
- Jan Sommer <jan.sommer@…> (07/03/20 12:31:47)
- git-committer:
- Joel Sherrill <joel@…> (07/16/20 13:00:32)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
bsps/i386/pc386/start/smp-imps.c
ra3ed4219 r9cb107c9 227 227 send_ipi(unsigned int dst, unsigned int v) 228 228 { 229 int to, send_status; 230 231 IMPS_LAPIC_WRITE(LAPIC_ICR+0x10, (dst << 24)); 229 int to, send_status, apicid; 230 231 apicid = imps_cpu_apic_map[dst]; 232 233 IMPS_LAPIC_WRITE(LAPIC_ICR+0x10, (apicid << 24)); 232 234 IMPS_LAPIC_WRITE(LAPIC_ICR, v); 233 235 … … 252 254 { 253 255 int apicid = proc->apic_id, success = 1; 256 int cpuid; 254 257 unsigned bootaddr; 255 258 unsigned bios_reset_vector = PHYS_TO_VIRTUAL(BIOS_RESET_VECTOR); 256 259 260 cpuid = imps_apic_cpu_map[apicid]; 257 261 /* 258 262 * Copy boot code for secondary CPUs here. Find it in between … … 277 281 * see startAP.S for location */ 278 282 reset[1] = (uint32_t)secondary_cpu_initialize; 279 reset[2] = (uint32_t)_Per_CPU_Get_by_index( apicid)->interrupt_stack_high;283 reset[2] = (uint32_t)_Per_CPU_Get_by_index(cpuid)->interrupt_stack_high; 280 284 memcpy( 281 285 (char*) &reset[3], … … 296 300 /* assert INIT IPI */ 297 301 send_ipi( 298 apicid,302 cpuid, 299 303 LAPIC_ICR_TM_LEVEL | LAPIC_ICR_LEVELASSERT | LAPIC_ICR_DM_INIT 300 304 ); … … 302 306 303 307 /* de-assert INIT IPI */ 304 send_ipi( apicid, LAPIC_ICR_TM_LEVEL | LAPIC_ICR_DM_INIT);308 send_ipi(cpuid, LAPIC_ICR_TM_LEVEL | LAPIC_ICR_DM_INIT); 305 309 306 310 UDELAY(10000); … … 313 317 int i; 314 318 for (i = 1; i <= 2; i++) { 315 send_ipi( apicid, LAPIC_ICR_DM_SIPI | ((bootaddr >> 12) & 0xFF));319 send_ipi(cpuid, LAPIC_ICR_DM_SIPI | ((bootaddr >> 12) & 0xFF)); 316 320 UDELAY(1000); 317 321 }
Note: See TracChangeset
for help on using the changeset viewer.