Subject: Re: RBV interrupt handling
To: Julian Bean <jules@mailbox.co.uk>
From: Allen Briggs <briggs@puma.bevd.blacksburg.va.us>
List: port-mac68k
Date: 03/10/1996 23:27:16
> Well, I'm poring over this code, trying to make sense of it.

Good luck.  ;-)

> What appears to be happening is that as soon as interrupts get turned on, I
> am being hit hard by an interrupt which keeps coming back as it is not
> being handled by anything (and is not being correctly cleared either).

Yes.  Most likely, it's from the video...

> Something about the code bothers me, though.  Why is it that sometimes you
> access a given RBV register like this:
> via2_reg(rIEF) /* replace rIEF with rIRF in some cases */
> and sometimes like this
> via2_reg(vIEF+rIEF)

Heh.  That's IER and IFR (Interrupt Enable Register and Interrupt Flag
Register).  The reason that I'm accessing them like that is that it
worked for me on the IIsi.  If you can get it to work otherwise, please
do.  Ideally, the RBV and VIA2 code wouldn't be different, but it
appears that it has to be.  I expect that some of the address lines
flag a write access and some flag a read.  It's been a while since I
looked at the code, and the actual RBV is not really documented beyond,
"It handles the functions that the VIA2 handles in models that contain
a VIA2."

> The information w.r.t which slot is generating the interrupt is not being
> correctly received (I think this is likely - the current code seems to
> think we are getting an interrupt on bit 6 (mask 64) - i.e. slot f, which
> doesn't exist)

That's probably the internal video interrupt.

> Or, we are hanging on video interrupts.  In principle, w.r.t. these, can we
> just mark the interrupt as clear and not actually do anything with it?

Sure, if you can figure out how to clear it.  The real solution, I
think, is to load at least part of the NuBus card drivers from the
cards and get them to install their own interrupt handlers--or at
least give us access to them.  This is not a trivial undertaking,
but it does have other benefits.  We could reuse the same code to
load in the parts of the video drivers that allow us to change video
modes, load the color lookup tables, etc.  That would mean that color
X would be right around the corner.

> Roughly what systems/cards is the RBV code 'known good'?

I know that it works for the IIsi, and I've been told that it works in
the IIci, IIvx, IIvi (I think), and perhaps a few others.  The IIvx and
vi require the cards to be in a certain configuration to work, though.
I forget the details off-hand, but they're in my mail folder somewhere...

-allen

-- 
  Allen Briggs - end killing - briggs@bev.net ** MacBSD == NetBSD/mac68k **
   Where does all my time go?  <a href="http://www.netbsd.org/">Guess.</a>