svn commit: r340604 - in stable/12/sys: amd64/amd64 x86/include x86/x86

Konstantin Belousov kib at FreeBSD.org
Mon Nov 19 05:42:02 UTC 2018


Author: kib
Date: Mon Nov 19 05:42:00 2018
New Revision: 340604
URL: https://svnweb.freebsd.org/changeset/base/340604

Log:
  MFC r340384:
  Apply fix to un-cripple max cpu id on BSP earlier.

Modified:
  stable/12/sys/amd64/amd64/machdep.c
  stable/12/sys/x86/include/x86_var.h
  stable/12/sys/x86/x86/identcpu.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/amd64/amd64/machdep.c
==============================================================================
--- stable/12/sys/amd64/amd64/machdep.c	Mon Nov 19 05:40:37 2018	(r340603)
+++ stable/12/sys/amd64/amd64/machdep.c	Mon Nov 19 05:42:00 2018	(r340604)
@@ -1581,6 +1581,7 @@ hammer_time(u_int64_t modulep, u_int64_t physfree)
 
 	identify_cpu1();
 	identify_hypervisor();
+	identify_cpu_fixup_bsp();
 	identify_cpu2();
 	initializecpucache();
 

Modified: stable/12/sys/x86/include/x86_var.h
==============================================================================
--- stable/12/sys/x86/include/x86_var.h	Mon Nov 19 05:40:37 2018	(r340603)
+++ stable/12/sys/x86/include/x86_var.h	Mon Nov 19 05:42:00 2018	(r340604)
@@ -129,6 +129,7 @@ void	dump_drop_page(vm_paddr_t);
 void	finishidentcpu(void);
 void	identify_cpu1(void);
 void	identify_cpu2(void);
+void	identify_cpu_fixup_bsp(void);
 void	identify_hypervisor(void);
 void	initializecpu(void);
 void	initializecpucache(void);

Modified: stable/12/sys/x86/x86/identcpu.c
==============================================================================
--- stable/12/sys/x86/x86/identcpu.c	Mon Nov 19 05:40:37 2018	(r340603)
+++ stable/12/sys/x86/x86/identcpu.c	Mon Nov 19 05:42:00 2018	(r340604)
@@ -1467,6 +1467,19 @@ identify_cpu2(void)
 	}
 }
 
+void
+identify_cpu_fixup_bsp(void)
+{
+	u_int regs[4];
+
+	cpu_vendor_id = find_cpu_vendor_id();
+
+	if (fix_cpuid()) {
+		do_cpuid(0, regs);
+		cpu_high = regs[0];
+	}
+}
+
 /*
  * Final stage of CPU identification.
  */
@@ -1478,12 +1491,7 @@ finishidentcpu(void)
 	u_char ccr3;
 #endif
 
-	cpu_vendor_id = find_cpu_vendor_id();
-
-	if (fix_cpuid()) {
-		do_cpuid(0, regs);
-		cpu_high = regs[0];
-	}
+	identify_cpu_fixup_bsp();
 
 	if (cpu_high >= 5 && (cpu_feature2 & CPUID2_MON) != 0) {
 		do_cpuid(5, regs);


More information about the svn-src-stable-12 mailing list