Rev 13 | Rev 28 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 13 | Rev 27 | ||
---|---|---|---|
Line 484... | Line 484... | ||
484 | /* |
484 | /* |
485 | * Skip processors marked unusable. |
485 | * Skip processors marked unusable. |
486 | */ |
486 | */ |
487 | if (pr[i].cpu_flags & (1<<0) == 0) |
487 | if (pr[i].cpu_flags & (1<<0) == 0) |
488 | continue; |
488 | continue; |
489 | 489 | ||
490 | /* |
490 | /* |
491 | * The bootstrap processor is already up. |
491 | * The bootstrap processor is already up. |
492 | */ |
492 | */ |
493 | if (pr[i].cpu_flags & (1<<1)) |
493 | if (pr[i].cpu_flags & (1<<1)) |
494 | continue; |
494 | continue; |
- | 495 | ||
- | 496 | if (pr[i].l_apic_id == l_apic_id()) { |
|
- | 497 | printf("%X: bad processor entry #%d, will not send IPI to myself\n", &pr[i], i); |
|
- | 498 | continue; |
|
- | 499 | } |
|
495 | 500 | ||
496 | /* |
501 | /* |
497 | * Prepare new GDT for CPU in question. |
502 | * Prepare new GDT for CPU in question. |
498 | */ |
503 | */ |
499 | if (!(gdt_new = (struct descriptor *) malloc(GDT_ITEMS*sizeof(struct descriptor)))) |
504 | if (!(gdt_new = (struct descriptor *) malloc(GDT_ITEMS*sizeof(struct descriptor)))) |
500 | panic(PANIC "couldn't allocate memory for GDT\n"); |
505 | panic(PANIC "couldn't allocate memory for GDT\n"); |
501 | 506 | ||
502 | memcopy(gdt, gdt_new, GDT_ITEMS*sizeof(struct descriptor)); |
507 | memcopy(gdt, gdt_new, GDT_ITEMS*sizeof(struct descriptor)); |
503 | gdtr.base = (__address) gdt_new; |
508 | gdtr.base = (__address) gdt_new; |
504 | 509 | ||
505 | if (l_apic_send_init_ipi(pr[i].l_apic_id)) { |
510 | if (l_apic_send_init_ipi(pr[i].l_apic_id)) { |
506 | /* |
511 | /* |
507 | * There may be just one AP being initialized at |
512 | * There may be just one AP being initialized at |
508 | * the time. After it comes completely up, it is |
513 | * the time. After it comes completely up, it is |
509 | * supposed to wake us up. |
514 | * supposed to wake us up. |