395 SEL_KPL, 0, 1);
396 #endif
397
398 /*
399 * If we have more than one node, each cpu gets a copy of IDT
400 * local to its node. If this is a Pentium box, we use cpu 0's
401 * IDT. cpu 0's IDT has been made read-only to workaround the
402 * cmpxchgl register bug
403 */
404 if (system_hardware.hd_nodes && x86_type != X86_TYPE_P5) {
405 #if !defined(__lint)
406 ASSERT((sizeof (*CPU->cpu_idt) * NIDT) <= PAGESIZE);
407 #endif
408 cp->cpu_idt = kmem_zalloc(PAGESIZE, KM_SLEEP);
409 bcopy(CPU->cpu_idt, cp->cpu_idt, PAGESIZE);
410 } else {
411 cp->cpu_idt = CPU->cpu_idt;
412 }
413
414 /*
415 * Get interrupt priority data from cpu 0.
416 */
417 cp->cpu_pri_data = CPU->cpu_pri_data;
418
419 /*
420 * alloc space for cpuid info
421 */
422 cpuid_alloc_space(cp);
423 #if !defined(__xpv)
424 if (is_x86_feature(x86_featureset, X86FSET_MWAIT) &&
425 idle_cpu_prefer_mwait) {
426 cp->cpu_m.mcpu_mwait = cpuid_mwait_alloc(cp);
427 cp->cpu_m.mcpu_idle_cpu = cpu_idle_mwait;
428 } else
429 #endif
430 cp->cpu_m.mcpu_idle_cpu = cpu_idle;
431
432 init_cpu_info(cp);
433
434 /*
435 * alloc space for ucode_info
436 */
437 ucode_alloc_space(cp);
438 xc_init_cpu(cp);
439 hat_cpu_online(cp);
|
395 SEL_KPL, 0, 1);
396 #endif
397
398 /*
399 * If we have more than one node, each cpu gets a copy of IDT
400 * local to its node. If this is a Pentium box, we use cpu 0's
401 * IDT. cpu 0's IDT has been made read-only to workaround the
402 * cmpxchgl register bug
403 */
404 if (system_hardware.hd_nodes && x86_type != X86_TYPE_P5) {
405 #if !defined(__lint)
406 ASSERT((sizeof (*CPU->cpu_idt) * NIDT) <= PAGESIZE);
407 #endif
408 cp->cpu_idt = kmem_zalloc(PAGESIZE, KM_SLEEP);
409 bcopy(CPU->cpu_idt, cp->cpu_idt, PAGESIZE);
410 } else {
411 cp->cpu_idt = CPU->cpu_idt;
412 }
413
414 /*
415 * alloc space for cpuid info
416 */
417 cpuid_alloc_space(cp);
418 #if !defined(__xpv)
419 if (is_x86_feature(x86_featureset, X86FSET_MWAIT) &&
420 idle_cpu_prefer_mwait) {
421 cp->cpu_m.mcpu_mwait = cpuid_mwait_alloc(cp);
422 cp->cpu_m.mcpu_idle_cpu = cpu_idle_mwait;
423 } else
424 #endif
425 cp->cpu_m.mcpu_idle_cpu = cpu_idle;
426
427 init_cpu_info(cp);
428
429 /*
430 * alloc space for ucode_info
431 */
432 ucode_alloc_space(cp);
433 xc_init_cpu(cp);
434 hat_cpu_online(cp);
|