patch-2.0.32 linux/include/asm-i386/bugs.h

Next file: linux/include/asm-i386/errno.h
Previous file: linux/include/asm-alpha/socket.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.31/linux/include/asm-i386/bugs.h linux/include/asm-i386/bugs.h
@@ -125,10 +125,32 @@
 #endif
 }
 
+/*
+ * All current models of Pentium and Pentium with MMX technology CPUs
+ * have the F0 0F bug, which lets nonpriviledged users lock up the system:
+ */
+extern int pentium_f00f_bug;
+extern void trap_init_f00f_bug(void);
+
+static void check_pentium_f00f(void)
+{
+	/*
+	 * Pentium and Pentium MMX
+	 */
+	pentium_f00f_bug = 0;
+	if (x86==5 && !memcmp(x86_vendor_id, "GenuineIntel", 12)) {
+		printk(KERN_INFO "Intel Pentium with F0 0F bug - workaround enabled.\n");
+		pentium_f00f_bug = 1;
+		trap_init_f00f_bug();
+	}
+}
+
+
 static void check_bugs(void)
 {
 	check_tlb();
 	check_fpu();
 	check_hlt();
+	check_pentium_f00f();
 	system_utsname.machine[1] = '0' + x86;
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov