summaryrefslogtreecommitdiffstats
path: root/sys/amd64/amd64/mp_machdep.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2015-08-03 12:14:42 +0000
committerkib <kib@FreeBSD.org>2015-08-03 12:14:42 +0000
commitb31c115daa6de83fc575d484bbd4f7114d62b234 (patch)
tree8808f62dbb04c4b1e243fcfa9bba1dc90c84a48e /sys/amd64/amd64/mp_machdep.c
parent67927a7a7c96545feb52784dea33376dcf127e76 (diff)
downloadFreeBSD-src-b31c115daa6de83fc575d484bbd4f7114d62b234.zip
FreeBSD-src-b31c115daa6de83fc575d484bbd4f7114d62b234.tar.gz
Clear the IA32_MISC_ENABLE MSR bit, which limits the max CPUID
reported, on APs. We already did this on BSP. Otherwise, the userspace software which depends on the features reported by the high CPUID levels is misbehaving. In particular, AVX detection is non-functional, depending on which CPU thread happens to execute when doing CPUID. Another victim is the libthr signal handlers interposer, which needs to save full FPU extended state. Reported and tested by: Andre Meiser <ortadur@web.de> Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
Diffstat (limited to 'sys/amd64/amd64/mp_machdep.c')
-rw-r--r--sys/amd64/amd64/mp_machdep.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c
index e91e6d5..a2ca9e2 100644
--- a/sys/amd64/amd64/mp_machdep.c
+++ b/sys/amd64/amd64/mp_machdep.c
@@ -252,6 +252,7 @@ init_secondary(void)
wrmsr(MSR_FSBASE, 0); /* User value */
wrmsr(MSR_GSBASE, (u_int64_t)pc);
wrmsr(MSR_KGSBASE, (u_int64_t)pc); /* XXX User value while we're in the kernel */
+ intel_fix_cpuid();
lidt(&r_idt);
OpenPOWER on IntegriCloud