Module Name: src
Committed By: maxv
Date: Wed May 23 10:21:43 UTC 2018
Modified Files:
src/sys/arch/x86/x86: fpu.c
Log Message:
Add a comment about recent AMD CPUs.
To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/x86/x86/fpu.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/x86/x86/fpu.c
diff -u src/sys/arch/x86/x86/fpu.c:1.31 src/sys/arch/x86/x86/fpu.c:1.32
--- src/sys/arch/x86/x86/fpu.c:1.31 Wed May 23 10:00:27 2018
+++ src/sys/arch/x86/x86/fpu.c Wed May 23 10:21:43 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: fpu.c,v 1.31 2018/05/23 10:00:27 maxv Exp $ */
+/* $NetBSD: fpu.c,v 1.32 2018/05/23 10:21:43 maxv Exp $ */
/*
* Copyright (c) 2008 The NetBSD Foundation, Inc. All
@@ -96,7 +96,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.31 2018/05/23 10:00:27 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.32 2018/05/23 10:21:43 maxv Exp $");
#include "opt_multiprocessor.h"
@@ -352,6 +352,10 @@ fpu_clear_amd(void)
* Before that, clear the ES bit in the x87 status word if it is
* currently set, in order to avoid causing a fault in the
* upcoming load.
+ *
+ * Newer generations of AMD CPUs have CPUID_Fn80000008_EBX[2],
+ * which indicates that FIP/FDP/FOP are restored (same behavior
+ * as Intel). We're not using it though.
*/
if (fngetsw() & 0x80)
fnclex();