[comp.sys.apollo] GPIO question

krowitz@LOVE.MIT.EDU (David Krowitz) (10/22/88)

I'm getting occasional system crashes when I'm running
a printer for which I wrote a GPIO driver. The crash
status says:

$ stcode 120031
illegal page fault in user gpio interrupt routine (OS/fault handler)

But all of the variables I refer to in the interrupt
routine are defined (Pascal DEFINE statement) within
that module, or are pointers to variable defined
within that module. I am under the impression that
the entire interrupt library is automatically 'wired'
into physical memory when the device is aquired. Is
this correct? Is there a limit to the size of the
interrupt routine and its buffers (I'm using a
60Kb ring buffer) that I could be exceeding?


 -- David Krowitz

krowitz@richter.mit.edu   (18.83.0.109)
krowitz%richter@eddie.mit.edu
krowitz%richter@athena.mit.edu
krowitz%richter.mit.edu@mitvma.bitnet
(in order of decreasing preference)

dbfunk@ICAEN.UIOWA.EDU (David B. Funk) (10/22/88)

> I'm getting occasional system crashes when I'm running
> a printer for which I wrote a GPIO driver.
>
> ...
>
> Is there a limit to the size of the
> interrupt routine and its buffers (I'm using a
> 60Kb ring buffer) that I could be exceeding?

Yes, you are exceeding the allowed size for the interrupt
routine. In the GPIO manual (#000959 rev 10) on page 8-2
it says:

"A driver can contain several interrupt routines to handle a device that interrupts
on more than one request line. However, the size of the interrupt module-the
interrupt routine(s) and any other procedures bound with it-must not exceed 32K
bytes, including procedure, data, and debug information."

Don't forget that the DMA buffer for a DN3000 must be page aligned and this could
waste an additional 1K byte of memory.

One additional potential problem: On older DN3000s (pre rev 20 motherboards)
there is a possible contention problem with DMA bus lines. Thus 2 DMA devices
operating "at the same time" on the bus could cause hardware problems. There is only
one Apollo supplied peripheral that uses DMA on the AT bus, the floppy disk drive.
So this problem can only occur in older DN3000s when the floppy disk and the user
added DMA device are active at the same time. Revision 20 (and newer) motherboards
have an ECO that fixes this problem.