[8468] in Athena Bugs
RT sys/ca/trap.c
daemon@ATHENA.MIT.EDU (John Carr)
Thu Oct 24 09:35:11 1991
To: bugs@Athena.MIT.EDU
Date: Thu, 24 Oct 91 09:35:03 EDT
From: John Carr <jfc@Athena.MIT.EDU>
This change to trap.c on the RT prevents panics from short power failures
and also handles some unusual machine checks differently.
With this change, a short power failure (< 1s) will make RTs log an error
instead of rebooting.
*** /source/bsd-4.3/rt/sys/ca/trap.c Fri Jun 16 17:55:14 1989
--- trap.c Thu Oct 24 09:31:07 1991
***************
*** 99,109 ****
(trdebug & SHOW_TRAP_REGS) ? locr0 : (int *)0));
switch (mcs_pcs) {
default:
if (mcs_pcs & MCS_CHECK) { /* machine check */
! if (mcs_pcs & USER) { /* machine check in user mode */
! printf("machine check in user mode ...\n");
! prstate("machine check", mcs_pcs, info, locr0[IAR], ics_cs, locr0);
klsreset(); /* reinitialize keyboard */
klswait(); /* and wait until done */
printf("keyboard init done.\n");
--- 98,124 ----
(trdebug & SHOW_TRAP_REGS) ? locr0 : (int *)0));
switch (mcs_pcs) {
+ case MCS_CHECK:
+ case MCS_CHECK+USER:
+ printf("Unidentified machine check ignored.\n");
+ break;
+ case MCS_PMUC_CK+MCS_CHECK:
+ case MCS_PMUC_CK+MCS_CHECK+USER:
+ printf("machine check: Processor Channel Check\n");
+ prstate("machine check", mcs_pcs, info, locr0[IAR],
+ ics_cs, locr0);
+ break;
default:
if (mcs_pcs & MCS_CHECK) { /* machine check */
! if (mcs_pcs & USER) /* machine check in user mode */
! printf("machine check in user mode");
! else
! printf("machine check");
! prstate("machine check", mcs_pcs, info, locr0[IAR], ics_cs, locr0);
! if ((_csr & CSR_EPOW) && !(_csr & CSR_OHOH)) {
! printf("power fail warning");
! goto out;
! } else if (mcs_pcs & USER) {
klsreset(); /* reinitialize keyboard */
klswait(); /* and wait until done */
printf("keyboard init done.\n");