Porting to linux-pmac: how to check that iobase is correct?

Randy Gobbel gobbel at andrew.cmu.edu
Sat Feb 14 22:42:11 PST 1998


I'm working on getting the aic7xxx driver to work in linux-pmac on the
Macintosh G3.  The driver has already been ported to some other Mac clone
systems, starting from the driver in Linux 2.1.24, so hopefully once I get
past my current snag, I won't have too far to go.  That snag is: the value
I get for iobase (p->base) by reading from PCI_BASE_ADDRESS_0, is 1.  This
value is obviously completely bogus (presumably the result of the
Mac-specific firmware on the card--yes?).  Looking at various other
possible addresses gleaned from Mac-specific machinery associated with the
card, I have four possible addresses for iobase and mbase, but so far I
have not been able to get anything reasonable to happen using any of the
four addresses as iobase.

Is there some register, or set of registers, that I can read from the card
that I can use to tell that it's really there?  What happens now is that
the driver goes through all the code to download the sequencer, and starts
scanning the bus, then goes into an infinite loop trying to reset, because
nothing ever comes back.  I need something that I can use as a simple
sanity check to see that I have the right address for both iobase and mbase.

Any suggestions for how I might do this would be appreciated.  Also: any
pointers to some basic PCI tutorials would also be appreciated, I must
admit I am getting very confused about all the various types of memory and
types of addresses involved, even without getting into the baroque schemes
used to set up all this stuff on the Mac--like, when do I need to call
virt_to_bus & friends?  I am assuming that iobase is supposed to be a
virtual address which is used to address a bunch of registers on the card,
and which should comprise a fairly small area of memory, and that mbase is
a virtual address for some memory which is used for actually moving data
around (I'm more vague about mbase, since the driver hasn't actually gotten
far enough for it to be an issue).  PLEASE! correct any misconceptions in
any of this.  If there happen to be any Mac wizards out there, I'm also
completely unfamiliar with Mac driver conventions, so I could use some help
on that front as well.

Thanks in advance,
-Randy



To Unsubscribe: send mail to majordomo at FreeBSD.org
with "unsubscribe aic7xxx" in the body of the message



More information about the aic7xxx mailing list