Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Nov 2009 10:38:33 +0000 (UTC)
From:      Attilio Rao <attilio@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r198979 - in stable/7/sys: amd64/amd64 i386/i386
Message-ID:  <200911061038.nA6AcXgU013645@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: attilio
Date: Fri Nov  6 10:38:33 2009
New Revision: 198979
URL: http://svn.freebsd.org/changeset/base/198979

Log:
  MFC r198868, r198950:
  Opteron rev E family of processor expose a bug where acq memory barriers
  can be broken, resulting in random breakages.
  Printout a warning message if affected family and model are found.

Modified:
  stable/7/sys/amd64/amd64/identcpu.c
  stable/7/sys/i386/i386/identcpu.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/amd64/amd64/identcpu.c
==============================================================================
--- stable/7/sys/amd64/amd64/identcpu.c	Fri Nov  6 10:17:08 2009	(r198978)
+++ stable/7/sys/amd64/amd64/identcpu.c	Fri Nov  6 10:38:33 2009	(r198979)
@@ -627,6 +627,21 @@ 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 (AMD64_CPU_FAMILY(cpu_id) == 0xf &&
+	    AMD64_CPU_MODEL(cpu_id) >= 0x20 && AMD64_CPU_MODEL(cpu_id) <= 0x3f)
+		printf("WARNING: This architecture revision has known SMP "
+		    "hardware bugs which may cause random instability\n");
 }
 
 static void

Modified: stable/7/sys/i386/i386/identcpu.c
==============================================================================
--- stable/7/sys/i386/i386/identcpu.c	Fri Nov  6 10:17:08 2009	(r198978)
+++ stable/7/sys/i386/i386/identcpu.c	Fri Nov  6 10:38:33 2009	(r198979)
@@ -1320,6 +1320,21 @@ 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 (I386_CPU_FAMILY(cpu_id) == 0xf && I386_CPU_MODEL(cpu_id) >= 0x20 &&
+	    I386_CPU_MODEL(cpu_id) <= 0x3f)
+		printf("WARNING: This architecture revision has known SMP "
+		    "hardware bugs which may cause random instability\n");
 }
 
 static void



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