Subject: Re: Magnum...
To: Mark Abene <phiber@radicalmedia.com>
From: Wayne Knowles <w.knowles@niwa.cri.nz>
List: port-mips
Date: 02/06/2001 22:56:07
On Tue, 6 Feb 2001, Mark Abene wrote:
> On Mon, Feb 05, 2001 at 09:08:47AM -0800, Jason R Thorpe wrote:
> >
> > The tsleep has a timeout on it, so if your clock interrupt is working
> > properly, then the process will be awakened after 2 seconds.
> >
> > I suspect it actually *isn't* working properly.
> >
>
> If I stick a printf("*") in my clkintr handler, I see a constant stream of
> "*"'s at a fixed interval, which tells me it seems to be working.
> I'd be more than happy to send you my patches if you'll try them out on
> your Magnum.
Hi Mark,
By the sounds of it the hardintr() function isn't being called, or the
microtime() function is doing something weird.
Taking a look at the code I see that the hardintr() function is called
only if the clock_started variable has been set. This is only specific
for the MAGNUM and is set in cpu_initclocks(). I assume that you have
checked this variable has been set correctly.
You might be able to get a better handle on what is happening by adding
the following debug printf to the end of the microtime() function
printf("tv_sec=%ld, tv_usec=%ld\n", tvp->tv_sec, tvp->tv_usec);
If you could get into DDB and display the callout table - there should
only be a few entries and one will be endtsleep should be the event you
are after. DDB should work at that point on the system - I just tried it
on one of my NetBSD/mipsco machines - You say it doesn't work on yours
which might indicate a more serious problem.
It might be possible that sleep/wakeup and the clock interrupts are all
working and the system goes into an infinite loop when it is actually
setting up the SCSI probes.
One problem I experienced in the mipsco port was interrupt's not being
serviced correctly, and the interrupt handler would never return. Placing
a debug printf at the start of the interrupt handler showed me what was
going on (and filled the screen up real fast!)
Also on big-endian firmware if you hit the reset button and do a
printenv from the console you can get an idea of where it was looping from
the resetepc and resetra variables - that has saved my life many
times. Not sure if ARC firmware has a similar feature.
Good luck!
Wayne