Subject: more questions: interrupt level, and vtophys() equivalent
To: None <tech-kern@netbsd.org>
From: Jeff Rizzo <riz@redcrowgroup.com>
List: tech-kern
Date: 11/10/2004 13:10:18
So, thanks to the great feedback I've gotten so far, I've been able to
get my driver to attach in a way that at least resembles working, so now
I'm on to some different problems. For those just joining the
conversation, the board in question is an interface to the PSTN to
support asterisk, a
I'm noticing some timeouts on my ethernet card when booting with the new
kernel, so I suspect I may have mis-chosen the interrupt level, or
perhaps I'm doing something wrong in the interrupt handler. My cursory
reading of the literature leads me to believe that FreeBSD 5.2's
interrupt levels (the freebsd driver sets INTR_TYPE_MISC) don't
correspond directly to NetBSD's, so I somewhat arbitrarily chose
IPL_BIO, knowing that in all likelihood I'd need to change it. However,
I can't seem to find a decent guide, so I'm nearly as much in the dark
as before. My next guess would be perhaps IPL_AUDIO, but I probably
shouldn't be stabbing around blindly here. Is there a concise
definition of what levels block what somewhere in the source?
Also, there's one other (obvious) wart in the code right now - the
FreeBSD code uses vtophys() to get the DMA address to write to the
card... I suspect this will _work_, since I'm using an i386 here, but
from what I can glean from the source, it's not allowed for MI code - so
what's the bus_space (or is it bus_dma?) equivalent?
Thanks again for all the help to this point - I've gotten the 'dummy'
driver working thanks to the suggestion to examine dmover_io.c, and the
hardware attachment "working" by loading "zaptel" as a
non-pseudo-device... and I hope to have it actually passing calls with
just a little more work. Then I can start the code cleanup. :-)
+j
--
Jeff Rizzo riz@redcrowgroup.com
Red Crow Group LLC http://www.redcrowgroup.com/
+1 415 550 0310