From owner-aic7xxx Sat Feb 14 22:42:11 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA08274 for aic7xxx-outgoing; Sat, 14 Feb 1998 22:42:11 -0800 (PST) (envelope-from owner-aic7xxx@FreeBSD.ORG) Received: from cmu1.acs.cmu.edu (CMU1.ACS.CMU.EDU [128.2.35.186]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA08269 for ; Sat, 14 Feb 1998 22:42:09 -0800 (PST) (envelope-from gobbel@andrew.cmu.edu) Received: from [192.168.1.2] (CREAMOFWHEAT-6.SLIP.ANDREW.CMU.EDU [128.2.120.6]) by cmu1.acs.cmu.edu (8.8.5/8.8.5) with ESMTP id BAA22618 for ; Sun, 15 Feb 1998 01:42:02 -0500 (EST) X-Sender: gobbel@zakros.ucsd.edu Message-Id: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Sun, 15 Feb 1998 01:40:53 -0500 To: AIC7xxx@FreeBSD.ORG From: Randy Gobbel Subject: Porting to linux-pmac: how to check that iobase is correct? Sender: owner-aic7xxx@FreeBSD.ORG Precedence: bulk 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@FreeBSD.org with "unsubscribe aic7xxx" in the body of the message