Oops, bug in bugfix for VAX 750 4.2BSD hard vs. soft memory error

William L. Sebok wls at astrovax.UUCP
Wed Mar 7 03:10:36 AEST 1984


One bug of my own slipped out.  In the final line M750_SYS(&mcr) should be
replaced by M750_SYS(&amcr).  I am reposting the rest of the fix. This fix was
based on a similar fix to BSD 4.1 in which mcr was used everywhere instead
of &amcr.  I guess I partially missed one of them.
Bill Sebok			Princeton University, Astrophysics
{allegra,akgua,burl,cbosgd,decvax,ihnp4,kpno,princeton,vax135}!astrovax!wls

Index:	/sys/vax/machdep.c 4.2BSD

Description:
	In memerr() in /sys/vax/machdep.c  no test is ever done to check
	whether memory errors on a VAX 750 are correctible or not.  Thus
	strange panics and such may occur with no indication on the console
	that there was a hard error.
	  The fix below fixes the problem for a VAX 750.  I suspect that the
	same problem is also present in the VAX 780 and 730 support code, as
	I have not seen any tests for the uncorrectable memory error condition.

	This bug was also present in BSD 4.1.

Repeat-By:
	Get yourself a bad memory board with hard errors.  The system may do
	all sorts of strange things because of memory errors yet only
	"soft ecc" messages will appear on the console. 

Fix:
	Here are the diffs to /sys/vax/machdep.c.  The line numbers of the new
	machdep.c may vary as there have been other fixes necessary.

*** machdep.c.ORIG	Tue Feb 28 11:27:04 1984
--- machdep.c.		Mon Mar  5 15:30:39 1984
***************
*** 481,488
  			if (M750_ERR(mcr)) {
  				struct mcr amcr;
  				amcr.mc_reg[0] = mcr->mc_reg[0];
! 				printf("mcr%d: soft ecc addr %x syn %x\n",
! 				    m, M750_ADDR(&amcr), M750_SYN(&amcr));
  				M750_INH(mcr);
  			}
  			break;

--- 481,497 -----
  			if (M750_ERR(mcr)) {
  				struct mcr amcr;
  				amcr.mc_reg[0] = mcr->mc_reg[0];
! 				/*
! 				 * modified to distinguish hard and soft errors
! 				 * (W. Sebok astrovax!wls 3/7/83)
! 				 */
! 				if (M750_ERR(mcr)&M750_UNCORR) {
! 					printf("mcr%d: hard error",m);
! 				} else {
! 					printf("mcr%d: soft ecc",m);
! 				}
! 				printf(" addr %x syn %x\n",
! 				    M750_ADDR(&amcr), M750_SYN(&amcr));
  				M750_INH(mcr);
  			}
  			break;
***************
-- 
Bill Sebok			Princeton University, Astrophysics
{allegra,akgua,burl,cbosgd,decvax,ihnp4,kpno,princeton,vax135}!astrovax!wls



More information about the Comp.unix.wizards mailing list