ref: 0bdfa3699dede75e657a24bd22e0e4aa7eafd5e4
parent: e6d84a3fa6c867594d9b572dddd4f4410708dbc9
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Thu Jul 16 04:51:06 EDT 2015
pc: check Sse (bit 25) in cpuiddx before enabling fxsr in cr4 (fixes crash on the pentium II)
--- a/sys/src/9/pc/devarch.c
+++ b/sys/src/9/pc/devarch.c
@@ -864,7 +864,7 @@
if(m->cpuiddx & Mtrr)
mtrrsync();
- if(m->cpuiddx & Fxsr){ /* have sse fp? */
+ if((m->cpuiddx & (Sse|Fxsr)) == (Sse|Fxsr)){ /* have sse fp? */
fpsave = fpssesave;
fprestore = fpsserestore;
putcr4(getcr4() | CR4Osfxsr|CR4Oxmmex);