summaryrefslogtreecommitdiffstats
path: root/sys/x86/x86/identcpu.c
diff options
context:
space:
mode:
authorLuiz Souza <luiz@netgate.com>2018-02-23 19:39:53 -0300
committerLuiz Souza <luiz@netgate.com>2018-02-23 19:39:53 -0300
commit87723fb19e17d7530d3c14f47c01e8f9d43dfd16 (patch)
tree34df2a835a0733c2fce23e4d6f7b948e5b841282 /sys/x86/x86/identcpu.c
parentd7a980c060dbe445736d4344990e8d3757f74b40 (diff)
downloadFreeBSD-src-87723fb19e17d7530d3c14f47c01e8f9d43dfd16.zip
FreeBSD-src-87723fb19e17d7530d3c14f47c01e8f9d43dfd16.tar.gz
Revert "Revert "MFC 322323 by jkim""
This reverts commit b634270605d0823a7110d2385de63e1e3a74f786.
Diffstat (limited to 'sys/x86/x86/identcpu.c')
-rw-r--r--sys/x86/x86/identcpu.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/sys/x86/x86/identcpu.c b/sys/x86/x86/identcpu.c
index 051855e..c0cc2a6 100644
--- a/sys/x86/x86/identcpu.c
+++ b/sys/x86/x86/identcpu.c
@@ -1370,23 +1370,12 @@ fix_cpuid(void)
return (false);
}
-/*
- * Final stage of CPU identification.
- */
-#ifdef __i386__
-void
-finishidentcpu(void)
-#else
+#ifdef __amd64__
void
identify_cpu(void)
-#endif
{
- u_int regs[4], cpu_stdext_disable;
-#ifdef __i386__
- u_char ccr3;
-#endif
+ u_int regs[4];
-#ifdef __amd64__
do_cpuid(0, regs);
cpu_high = regs[0];
((u_int *)&cpu_vendor)[0] = regs[1];
@@ -1399,6 +1388,18 @@ identify_cpu(void)
cpu_procinfo = regs[1];
cpu_feature = regs[3];
cpu_feature2 = regs[2];
+}
+#endif
+
+/*
+ * Final stage of CPU identification.
+ */
+void
+finishidentcpu(void)
+{
+ u_int regs[4], cpu_stdext_disable;
+#ifdef __i386__
+ u_char ccr3;
#endif
cpu_vendor_id = find_cpu_vendor_id();
OpenPOWER on IntegriCloud