From owner-freebsd-alpha Thu Oct 21 18:40:23 1999 Delivered-To: freebsd-alpha@freebsd.org Received: from smtp02.primenet.com (smtp02.primenet.com [206.165.6.132]) by hub.freebsd.org (Postfix) with ESMTP id B123B14D0F; Thu, 21 Oct 1999 18:40:21 -0700 (PDT) (envelope-from tlambert@usr07.primenet.com) Received: (from daemon@localhost) by smtp02.primenet.com (8.8.8/8.8.8) id SAA12988; Thu, 21 Oct 1999 18:40:17 -0700 (MST) Received: from usr07.primenet.com(206.165.6.207) via SMTP by smtp02.primenet.com, id smtpd012978; Thu Oct 21 18:40:10 1999 Received: (from tlambert@localhost) by usr07.primenet.com (8.8.5/8.8.5) id SAA05716; Thu, 21 Oct 1999 18:40:08 -0700 (MST) From: Terry Lambert Message-Id: <199910220140.SAA05716@usr07.primenet.com> Subject: Re: ata busmaster i/o port on alpha To: gallatin@cs.duke.edu (Andrew Gallatin) Date: Fri, 22 Oct 1999 01:40:08 +0000 (GMT) Cc: sos@FreeBSD.ORG, freebsd-alpha@FreeBSD.ORG In-Reply-To: <14348.40785.536064.278837@grasshopper.cs.duke.edu> from "Andrew Gallatin" at Oct 19, 99 01:02:14 pm X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by usr07.primenet.com id SAA05716 Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > S=F8ren, >=20 > I'm trying to get the on-board IDE controllers in some AlphaServer > DS10 machines working well w/FreeBSD-current. They use the Acer > AladdinV IDE controller in combination with a FUJITSU MPD3108AT ATA-4 > disk. >=20 > The problem is with where the "Bios" (aka the SRM console) puts the > busmaster address: >=20 > <12:45pm>opal/root:~#pciconf -r 'pci0:13:0' 0x20 > 0x00010111 >=20 > When you read the bus master address you mask off the upper 16 bits > entirely and we see the address as 0x110 where as it should really be=20 > 0x10110. When this happens, the disk is of course unusable. After > 5 retries, I see I/O errors when I try to access the disk. >=20 > If I apply the following patch, DMA works: [ ... ] > So, my question: Is are you loosing the upper 16 bits for a reason, > or is it valid to look at the upper 16 bits on all platforms? It's truly cool to see that there are people with more Alpha knowledge than x86 knowledge who are FreeBSD junkies. 8-). This masking is a bit of historical arcanum dating back to the IBM PC AT. On x86, the I/O address space wraps. Some code depends on this behaviour. This masking should probably be done in a (platform changeable) macro, in any case. The reason for making it a macro is to allow the macro to be used in the PnP case, when the (unwrapped) address space has been exhausted. A bigger address space may be a problem, if the ISA interface only connects 16 bits (yes, some PC's do this!). Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message