summaryrefslogtreecommitdiff
path: root/sys/arch/i386/include/cpu.h
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2004-02-01 19:05:24 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2004-02-01 19:05:24 +0000
commit674770922e1c4de03caa86793ce2b4a44d482978 (patch)
treeb69ab7fbec510beef8ffab98791d2b1b4f213543 /sys/arch/i386/include/cpu.h
parent15f049748c018b0444e212573550de66dfb3d929 (diff)
Enable FXSR all the time, and cope with NPX/FXSR conversions; from netbsd.
Pass SSE/SSE2/XCRYPT flags out via syctl, and prepare for being able to do xcrypt-* in userland; ok naddy, tested a lot by pvalchev and jolan, also works on amd64 in 32bit mode
Diffstat (limited to 'sys/arch/i386/include/cpu.h')
-rw-r--r--sys/arch/i386/include/cpu.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/sys/arch/i386/include/cpu.h b/sys/arch/i386/include/cpu.h
index 2750fabdda6..ef70e5f86fc 100644
--- a/sys/arch/i386/include/cpu.h
+++ b/sys/arch/i386/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.56 2004/02/01 12:26:45 grange Exp $ */
+/* $OpenBSD: cpu.h,v 1.57 2004/02/01 19:05:23 deraadt Exp $ */
/* $NetBSD: cpu.h,v 1.35 1996/05/05 19:29:26 christos Exp $ */
/*-
@@ -163,6 +163,10 @@ void fix_f00f(void);
/* dkcsum.c */
void dkcsumattach(void);
+extern int i386_use_fxsave;
+extern int i386_has_sse;
+extern int i386_has_sse2;
+
/* machdep.c */
void dumpconf(void);
void cpu_reset(void);
@@ -257,7 +261,11 @@ void setconf(void);
#define CPU_KBDRESET 10 /* keyboard reset under pcvt */
#define CPU_APMHALT 11 /* halt -p hack */
#define CPU_USERLDT 12
-#define CPU_MAXID 13 /* number of valid machdep ids */
+#define CPU_OSFXSR 13 /* uses FXSAVE/FXRSTOR */
+#define CPU_SSE 14 /* supports SSE */
+#define CPU_SSE2 15 /* supports SSE2 */
+#define CPU_XCRYPT 16 /* supports VIA xcrypt in userland */
+#define CPU_MAXID 17 /* number of valid machdep ids */
#define CTL_MACHDEP_NAMES { \
{ 0, 0 }, \
@@ -273,6 +281,10 @@ void setconf(void);
{ "kbdreset", CTLTYPE_INT }, \
{ "apmhalt", CTLTYPE_INT }, \
{ "userldt", CTLTYPE_INT }, \
+ { "osfxsr", CTLTYPE_INT }, \
+ { "sse", CTLTYPE_INT }, \
+ { "sse2", CTLTYPE_INT }, \
+ { "xcrypt", CTLTYPE_INT }, \
}
#endif /* !_I386_CPU_H_ */