On 2017/10/21 12:04, Tim Stewart wrote:
> *49727  296965      0      0  7     0x14200                crynlk

aha, it was that one. Try this diff on top.

Index: fpu.c
===================================================================
RCS file: /cvs/src/sys/arch/amd64/amd64/fpu.c,v
retrieving revision 1.38
diff -u -p -r1.38 fpu.c
--- fpu.c       14 Oct 2017 04:44:43 -0000      1.38
+++ fpu.c       21 Oct 2017 16:16:14 -0000
@@ -347,7 +347,7 @@ void
 fpu_kernel_enter(void)
 {
        struct cpu_info *ci = curcpu();
-       uint32_t         cw;
+       struct savefpu  *sfp;
        int              s;
 
        /*
@@ -376,10 +376,11 @@ fpu_kernel_enter(void)
 
        /* Initialize the FPU */
        fninit();
-       cw = __INITIAL_NPXCW__;
-       fldcw(&cw);
-       cw = __INITIAL_MXCSR__;
-       ldmxcsr(&cw);
+       sfp = &proc0.p_addr->u_pcb.pcb_savefpu;
+       memset(&sfp->fp_fxsave, 0, sizeof(sfp->fp_fxsave));
+       sfp->fp_fxsave.fx_fcw = __INITIAL_NPXCW__;
+       sfp->fp_fxsave.fx_mxcsr = __INITIAL_MXCSR__;
+       fxrstor(&sfp->fp_fxsave);
 }
 
 void

Reply via email to