Stopgap measure: set i386_fpu_present to 1 for XEN.

Stop a stream of
npxintr: came from nowherenpxintr: l = 0xc17ba560, curproc = 0xc177d880, fpu_present = 0
when running some ATF tests:
http://www-soc.lip6.fr/~bouyer/NetBSD-tests/xen/HEAD/i386/201401300920Z_anita.txt

XXX this is probably still broken for native i386, at last for older CPUs.
It looks like on newer CPUs (such as the one emulated by qemu) this code path
is not used.
This commit is contained in:
bouyer 2014-02-01 18:57:38 +00:00
parent cd7408c584
commit 6d602218df
1 changed files with 6 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.743 2014/01/26 19:16:17 dsl Exp $ */
/* $NetBSD: machdep.c,v 1.744 2014/02/01 18:57:38 bouyer Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009
@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.743 2014/01/26 19:16:17 dsl Exp $");
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.744 2014/02/01 18:57:38 bouyer Exp $");
#include "opt_beep.h"
#include "opt_compat_ibcs2.h"
@ -229,7 +229,11 @@ struct mtrr_funcs *mtrr_funcs;
int cpu_class;
int use_pae;
#ifdef XEN
int i386_fpu_present = 1;
#else
int i386_fpu_present;
#endif
int i386_fpu_exception;
int i386_fpu_fdivbug;