| 488 | static int ppro_apic_used = -1; |
| 489 | |
| 490 | static void |
| 491 | init_ppro(void) |
| 492 | { |
| 493 | u_int64_t apicbase; |
| 494 | |
| 495 | /* |
| 496 | * Local APIC should be disabled if it is not going to be used. |
| 497 | */ |
| 498 | if (ppro_apic_used != 1) { |
| 499 | apicbase = rdmsr(MSR_APICBASE); |
| 500 | apicbase &= ~APICBASE_ENABLED; |
| 501 | wrmsr(MSR_APICBASE, apicbase); |
| 502 | ppro_apic_used = 0; |
| 503 | } |
| 504 | } |
| 505 | |
| 506 | /* |
| 507 | * If the local APIC is going to be used after being disabled above, |
no test coverage detected