Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Nov 2009 01:32:59 +0000 (UTC)
From:      Attilio Rao <attilio@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r198868 - in head/sys: amd64/amd64 i386/i386
Message-ID:  <200911040132.nA41WxtQ012750@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: attilio
Date: Wed Nov  4 01:32:59 2009
New Revision: 198868
URL: http://svn.freebsd.org/changeset/base/198868

Log:
  Opteron rev E family of processor expose a bug where, in very rare
  ocassions, memory barriers semantic is not honoured by the hardware
  itself. As a result, some random breakage can happen in uninvestigable
  ways (for further explanation see at the content of the commit itself).
  
  As long as just a specific familly is bugged of an entire architecture
  is broken, a complete fix-up is impratical without harming to some
  extents the other correct cases.
  Considering that (and considering the frequency of the bug exposure)
  just print out a warning message if the affected machine is identified.
  
  Pointed out by:	Samy Al Bahra <sbahra at repnop dot org>
  Help on wordings by:	jeff
  MFC:	3 days

Modified:
  head/sys/amd64/amd64/identcpu.c
  head/sys/i386/i386/identcpu.c

Modified: head/sys/amd64/amd64/identcpu.c
==============================================================================
--- head/sys/amd64/amd64/identcpu.c	Wed Nov  4 01:00:28 2009	(r198867)
+++ head/sys/amd64/amd64/identcpu.c	Wed Nov  4 01:32:59 2009	(r198868)
@@ -607,6 +607,24 @@ print_AMD_info(void)
 		printf(", %d lines/tag", (regs[2] >> 8) & 0x0f);
 		print_AMD_l2_assoc((regs[2] >> 12) & 0x0f);	
 	}
+
+	/*
+	 * Opteron Rev E shows a bug as in very rare occasions a read memory 
+	 * barrier is not performed as expected if it is followed by a 
+	 * non-atomic read-modify-write instruction.  
+	 * As long as that bug pops up very rarely (intensive machine usage
+	 * on other operating systems generally generates one unexplainable 
+	 * crash any 2 months) and as long as a model specific fix would be
+	 * impratical at this stage, print out a warning string if the broken
+	 * model and family are identified.
+	 */
+	if (CPUID_TO_FAMILY(cpu_id) == 0xf && CPUID_TO_MODEL(cpu_id) >= 0x20 &&
+	    CPUID_TO_MODEL(cpu_id) <= 0x3f) {
+		printf("WARNING: This architecture revision has known SMP "
+		    "hardware bugs which may cause random instability\n");
+		printf("WARNING: For details see: "
+		    "http://bugzilla.kernel.org/show_bug.cgi?id=11305\n");
+	}
 }
 
 static void

Modified: head/sys/i386/i386/identcpu.c
==============================================================================
--- head/sys/i386/i386/identcpu.c	Wed Nov  4 01:00:28 2009	(r198867)
+++ head/sys/i386/i386/identcpu.c	Wed Nov  4 01:32:59 2009	(r198868)
@@ -1303,6 +1303,24 @@ print_AMD_info(void)
 			    (amd_whcr & 0x0100) ? "Enable" : "Disable");
 		}
 	}
+
+	/*
+	 * Opteron Rev E shows a bug as in very rare occasions a read memory
+	 * barrier is not performed as expected if it is followed by a
+	 * non-atomic read-modify-write instruction.
+	 * As long as that bug pops up very rarely (intensive machine usage
+	 * on other operating systems generally generates one unexplainable
+	 * crash any 2 months) and as long as a model specific fix would be
+	 * impratical at this stage, print out a warning string if the broken
+	 * model and family are identified.
+	 */
+	if (CPUID_TO_FAMILY(cpu_id) == 0xf && CPUID_TO_MODEL(cpu_id) >= 0x20 &&
+	    CPUID_TO_MODEL(cpu_id) <= 0x3f) {
+		printf("WARNING: This architecture revision has known SMP "
+		    "hardware bugs which may cause random instability\n");
+		printf("WARNING: For details see: "
+		    "http://bugzilla.kernel.org/show_bug.cgi?id=11305\n");
+	}
 }
 
 static void



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911040132.nA41WxtQ012750>