Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site umcp-cs.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!lll-crg!gymble!umcp-cs!chris From: chris@umcp-cs.UUCP (Chris Torek) Newsgroups: net.unix-wizards Subject: Re: 785 CPU bug -- BEWARE Message-ID: <1945@umcp-cs.UUCP> Date: Tue, 22-Oct-85 12:54:57 EDT Article-I.D.: umcp-cs.1945 Posted: Tue Oct 22 12:54:57 1985 Date-Received: Thu, 24-Oct-85 06:17:44 EDT References: <2237@brl-tgr.ARPA> Organization: U of Maryland, Computer Science Dept., College Park, MD Lines: 115 On our 785, this bug takes the form of computing the value 0x7dfffffc on `extzv $0,$4,-4(r0),r0' instructions when r0 has the value 0x80000000. Here is what I did to keep it from crashing our machine. I also added options "AVOID_785_CPU_BUG" to the conf file, of course. RCS file: RCS/kern_exit.c,v retrieving revision 1.1 retrieving revision 1.2 diff -c2 -r1.1 -r1.2 *** /tmp/,RCSt1008733 Tue Oct 22 12:52:03 1985 --- /tmp/,RCSt2008733 Tue Oct 22 12:52:05 1985 *************** *** 181,184 { struct rusage ru, *rup; if ((u.u_ar0[PS] & PSL_ALLCC) != PSL_ALLCC) { --- 181,186 ----- { struct rusage ru, *rup; + #ifdef AVOID_785_CPU_BUG + int psl; psl = u.u_ar0[PS]; *************** *** 182,185 struct rusage ru, *rup; if ((u.u_ar0[PS] & PSL_ALLCC) != PSL_ALLCC) { u.u_error = wait1(0, (struct rusage *)0); --- 184,193 ----- int psl; + psl = u.u_ar0[PS]; + if ((psl & PSL_ALLCC) != PSL_ALLCC) { + u.u_error = wait1(0, (struct rusage *)0); + return; + } + #else if ((u.u_ar0[PS] & PSL_ALLCC) != PSL_ALLCC) { u.u_error = wait1(0, (struct rusage *)0); *************** *** 186,189 return; } rup = (struct rusage *)u.u_ar0[R1]; u.u_error = wait1(u.u_ar0[R0], &ru); --- 194,198 ----- return; } + #endif rup = (struct rusage *)u.u_ar0[R1]; u.u_error = wait1(u.u_ar0[R0], &ru); RCS file: RCS/kern_xxx.c,v retrieving revision 1.2 retrieving revision 1.3 diff -c2 -r1.2 -r1.3 *** /tmp/,RCSt1008740 Tue Oct 22 12:52:11 1985 --- /tmp/,RCSt2008740 Tue Oct 22 12:52:13 1985 *************** *** 283,286 struct rusage ru; struct vtimes *vtp, avt; if ((u.u_ar0[PS] & PSL_ALLCC) != PSL_ALLCC) { --- 283,288 ----- struct rusage ru; struct vtimes *vtp, avt; + #ifdef AVOID_785_CPU_BUG + int psl; psl = u.u_ar0[PS]; *************** *** 284,287 struct vtimes *vtp, avt; if ((u.u_ar0[PS] & PSL_ALLCC) != PSL_ALLCC) { u.u_error = wait1(0, (struct rusage *)0); --- 286,295 ----- int psl; + psl = u.u_ar0[PS]; + if ((psl & PSL_ALLCC) != PSL_ALLCC) { + u.u_error = wait1(0, (struct rusage *)0); + return; + } + #else if ((u.u_ar0[PS] & PSL_ALLCC) != PSL_ALLCC) { u.u_error = wait1(0, (struct rusage *)0); *************** *** 288,291 return; } vtp = (struct vtimes *)u.u_ar0[R1]; u.u_error = wait1(u.u_ar0[R0], &ru); --- 296,300 ----- return; } + #endif vtp = (struct vtimes *)u.u_ar0[R1]; u.u_error = wait1(u.u_ar0[R0], &ru); -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 4251) UUCP: seismo!umcp-cs!chris CSNet: chris@umcp-cs ARPA: chris@mimsy.umd.edu