Subject: Re: my ds3100...
To: Herb Peyerl <hpeyerl@novatel.ca>
From: Per Fogelstrom <pefo@enea.se>
List: port-pmax
Date: 12/14/1994 11:03:23
>
> pefo@enea.se (Per Fogelstrom) wrote:
> > Suggestion: Put an printf in the interrupt handler and print out the
> > cause register. If you get there tell me what you got.
>
> err, I hope this doesn't sound stupid but the interrupt handler is
> in locore.S from what I can see and I'm not familiar enough with this
> to figure out how to output from locore... Sorry, I'm a 68k person
> myself...
>
> If you have a code fragment you'd like me to try.........
>
No, not stupid at all. I wasn't specific enough. I suspect it is an
non expected interrupt that kills the system. Have seen it many times
before :-). This is a code fragment from 'pmax/trap.c':
/*
* Handle an interrupt.
* Called from MachKernIntr() or MachUserIntr()
* Note: curproc might be NULL.
*/
interrupt(statusReg, causeReg, pc)
unsigned statusReg; /* status register at time of the exception */
unsigned causeReg; /* cause register at time of exception */
unsigned pc; /* program counter where to continue */
{
register unsigned mask;
struct clockframe cf;
#ifdef DEBUG
trp->status = statusReg;
trp->cause = causeReg;
trp->vadr = 0;
trp->pc = pc;
trp->ra = 0;
trp->code = 0;
if (++trp == &trapdebug[TRAPSIZE])
trp = trapdebug;
#endif
--->
| cnt.v_intr++;
| mask = causeReg & statusReg; /* pending interrupts & enable mask */
| if (pmax_hardware_intr)
| splx((*pmax_hardware_intr)(mask, pc, statusReg, causeReg));
|
|
| Now here it's beginning to be interesting. Values of interest is
'statusReg' and 'causeReg'. Having a printf here could be anoying
when the clock is started but to me it looks that you don't get
that far. Just put in:
printf("Interrupt cause = %x, status %x\n", causeReg, statusReg);
and see what happens.
Per