usr/src/uts/i86pc/os/mp_startup.c
changeset 13148 67d1861e02c1
parent 13146 8315ff49e22e
child 13651 af464d8d3a31
equal deleted inserted replaced
13147:9f04f32f7f45 13148:67d1861e02c1
  1603  */
  1603  */
  1604 static void
  1604 static void
  1605 mp_startup_common(boolean_t boot)
  1605 mp_startup_common(boolean_t boot)
  1606 {
  1606 {
  1607 	cpu_t *cp = CPU;
  1607 	cpu_t *cp = CPU;
  1608 	void *new_x86_featureset;
  1608 	uchar_t new_x86_featureset[BT_SIZEOFMAP(NUM_X86_FEATURES)];
  1609 	extern void cpu_event_init_cpu(cpu_t *);
  1609 	extern void cpu_event_init_cpu(cpu_t *);
  1610 
  1610 
  1611 	/*
  1611 	/*
  1612 	 * We need to get TSC on this proc synced (i.e., any delta
  1612 	 * We need to get TSC on this proc synced (i.e., any delta
  1613 	 * from cpu0 accounted for) as soon as we can, because many
  1613 	 * from cpu0 accounted for) as soon as we can, because many
  1629 	 * since we get here by calling t_pc, we need to do that call
  1629 	 * since we get here by calling t_pc, we need to do that call
  1630 	 * before swtch() overwrites it.
  1630 	 * before swtch() overwrites it.
  1631 	 */
  1631 	 */
  1632 	(void) (*ap_mlsetup)();
  1632 	(void) (*ap_mlsetup)();
  1633 
  1633 
  1634 	new_x86_featureset = cpuid_pass1(cp);
  1634 	bzero(new_x86_featureset, BT_SIZEOFMAP(NUM_X86_FEATURES));
       
  1635 	cpuid_pass1(cp, new_x86_featureset);
  1635 
  1636 
  1636 #ifndef __xpv
  1637 #ifndef __xpv
  1637 	/*
  1638 	/*
  1638 	 * Program this cpu's PAT
  1639 	 * Program this cpu's PAT
  1639 	 */
  1640 	 */
  1685 	 * boot cpu supports monitor/mwait.
  1686 	 * boot cpu supports monitor/mwait.
  1686 	 */
  1687 	 */
  1687 	if (is_x86_feature(x86_featureset, X86FSET_MWAIT) !=
  1688 	if (is_x86_feature(x86_featureset, X86FSET_MWAIT) !=
  1688 	    is_x86_feature(new_x86_featureset, X86FSET_MWAIT))
  1689 	    is_x86_feature(new_x86_featureset, X86FSET_MWAIT))
  1689 		panic("unsupported mixed cpu monitor/mwait support detected");
  1690 		panic("unsupported mixed cpu monitor/mwait support detected");
  1690 
       
  1691 	free_x86_featureset(new_x86_featureset);
       
  1692 
  1691 
  1693 	/*
  1692 	/*
  1694 	 * We could be more sophisticated here, and just mark the CPU
  1693 	 * We could be more sophisticated here, and just mark the CPU
  1695 	 * as "faulted" but at this point we'll opt for the easier
  1694 	 * as "faulted" but at this point we'll opt for the easier
  1696 	 * answer of dying horribly.  Provided the boot cpu is ok,
  1695 	 * answer of dying horribly.  Provided the boot cpu is ok,