From f269e91c84324fbb103ee66a25aed583df983d61 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Thu, 11 Feb 1993 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1993-02-11 --- port/fault.c | 1 + power/io.h | 8 +++----- power/segment.h | 2 +- power/trap.c | 10 ++++++---- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/port/fault.c b/port/fault.c index b474805d4b49a9b095340d80bf205ac0432b802d..89fe9940c5b2297399c6f83c519b8eac7ea0385d 100644 --- a/port/fault.c +++ b/port/fault.c @@ -146,6 +146,7 @@ fixfault(Segment *s, ulong addr, int read, int doputmmu) mmuphys = PPN((*pg)->pa) |PTEWRITE|PTEUNCACHED|PTEVALID; (*pg)->modref = PG_MOD|PG_REF; +/* print("v %lux p %lux\n", addr, mmuphys); /**/ break; } diff --git a/power/io.h b/power/io.h index c49c4b93d1b912915fce542a6993ddc310e98f40..407ee88a811891dfcf7acf3af270f53a9aeb4186 100644 --- a/power/io.h +++ b/power/io.h @@ -10,17 +10,15 @@ enum { LEDtrapmask= 0xf<<0, + LED2= 1<<2, + LED3= 1<<3, LEDkfault= 1<<4, - LEDclock= 1<<5, + LED5= 1<<5, LEDfault= 1<<6, LEDpulse= 1<<7, }; -/* #define LEDON(x) (m->ledval &= ~(x), *LED = m->ledval) #define LEDOFF(x) (m->ledval |= (x), *LED = m->ledval) -*/ -#define LEDON(x) -#define LEDOFF(x) typedef struct SBCC SBCC; typedef struct Timer Timer; diff --git a/power/segment.h b/power/segment.h index 74affd406bdf545c75f3815dd9b1a148e3ad66f9..ecb7b8b120a8047599bd61600d4f3721346e4e10 100644 --- a/power/segment.h +++ b/power/segment.h @@ -2,7 +2,7 @@ * Attach segment types */ -#define VME16IO3 0x17C10000 +#define VME16IO3 0x17C00000 #define VME32TDFB (0x30000000+128*MB) Physseg physseg[] = diff --git a/power/trap.c b/power/trap.c index d16d64d11c955634532ab38fd9b45a336fd262bc..dc0a34372b6226a77b13122f390ff7168db7db32 100644 --- a/power/trap.c +++ b/power/trap.c @@ -169,7 +169,7 @@ void intr(Ureg *ur) { long v; - int i, any; + int i, any, limit; ulong cause; static int bogies; uchar pend, xxx; @@ -182,7 +182,7 @@ intr(Ureg *ur) cause &= ~INTR1; } - while(cause & INTR5) { + for(limit = 50; (cause&INTR5) && limit; limit--) { any = 0; if(!(*MPBERR1 & (1<<8))){ print("MP bus error %lux %lux\n", *MPBERR0, *MPBERR1); @@ -285,11 +285,13 @@ intr(Ureg *ur) if(any == 0) cause &= ~INTR5; } + if(limit == 0) { + print("intr: unable to identify and clear level5\n"); + cause &= ~INTR5; + } if(cause & (INTR2|INTR4)) { - LEDON(LEDclock); clock(ur); - LEDOFF(LEDclock); cause &= ~(INTR2|INTR4); }