From owner-freebsd-alpha Thu Oct 21 19: 0:17 1999 Delivered-To: freebsd-alpha@freebsd.org Received: from sstar.com (sstar.com [209.102.160.1]) by hub.freebsd.org (Postfix) with ESMTP id 2AA3814D0F for ; Thu, 21 Oct 1999 19:00:14 -0700 (PDT) (envelope-from king@sstar.com) Received: from MAROON ([134.132.228.8]) by sstar.com with ESMTP (IPAD 2.5s/64) id 2170600; Thu, 21 Oct 1999 21:00:11 -0500 Message-Id: <4.2.0.58.19991021205744.01706ca8@mail.sstar.com> X-Sender: king@mail.sstar.com X-Mailer: QUALCOMM Windows Eudora Pro Version 4.2.0.58 Date: Thu, 21 Oct 1999 21:00:10 -0500 To: Terry Lambert , gallatin@cs.duke.edu (Andrew Gallatin) From: Jim King Subject: Re: ata busmaster i/o port on alpha Cc: freebsd-alpha@FreeBSD.ORG In-Reply-To: <199910220140.SAA05716@usr07.primenet.com> References: <14348.40785.536064.278837@grasshopper.cs.duke.edu> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; format=flowed Content-Transfer-Encoding: quoted-printable Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org At 01:40 AM 10/22/1999 +0000, Terry Lambert wrote: > > S=F8ren, > > > > 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. > > > > The problem is with where the "Bios" (aka the SRM console) puts the > > busmaster address: > > > > <12:45pm>opal/root:~#pciconf -r 'pci0:13:0' 0x20 > > 0x00010111 > > > > 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 > > 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. > > > > 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!). And of course, just to get really arcane and off topic, let's not forget=20 that the original IBM PC speced that I/O cards were to only pay attention=20 to the lower *10* bits of the I/O space, which is why all those ISA cards=20 try to cram into 0x3ff and below. Jim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message