* Initialize the local APIC on the BSP. */
| 350 | * Initialize the local APIC on the BSP. |
| 351 | */ |
| 352 | static int |
| 353 | mptable_setup_local(void) |
| 354 | { |
| 355 | vm_paddr_t addr; |
| 356 | u_int cpu_mask; |
| 357 | |
| 358 | /* Is this a pre-defined config? */ |
| 359 | printf("MPTable: <"); |
| 360 | if (mpfps->config_type != 0) { |
| 361 | lapic_create(0, 1); |
| 362 | lapic_create(1, 0); |
| 363 | addr = DEFAULT_APIC_BASE; |
| 364 | printf("Default Configuration %d", mpfps->config_type); |
| 365 | |
| 366 | } else { |
| 367 | cpu_mask = 0; |
| 368 | mptable_walk_table(mptable_setup_cpus_handler, &cpu_mask); |
| 369 | #ifdef MPTABLE_FORCE_HTT |
| 370 | mptable_hyperthread_fixup(cpu_mask); |
| 371 | #endif |
| 372 | addr = mpct->apic_address; |
| 373 | printf("%.*s %.*s", (int)sizeof(mpct->oem_id), mpct->oem_id, |
| 374 | (int)sizeof(mpct->product_id), mpct->product_id); |
| 375 | } |
| 376 | printf(">\n"); |
| 377 | lapic_init(addr); |
| 378 | return (0); |
| 379 | } |
| 380 | |
| 381 | /* |
| 382 | * Run through the MP table enumerating I/O APICs. |
nothing calls this directly
no test coverage detected