From owner-freebsd-alpha Mon Oct 26 01:04:41 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA19703 for freebsd-alpha-outgoing; Mon, 26 Oct 1998 01:04:41 -0800 (PST) (envelope-from owner-freebsd-alpha@FreeBSD.ORG) Received: from nlsystems.com (nlsys.demon.co.uk [158.152.125.33]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id BAA19695 for ; Mon, 26 Oct 1998 01:04:37 -0800 (PST) (envelope-from dfr@nlsystems.com) Received: from herring.nlsystems.com (herring.nlsystems.com [10.0.0.2]) by nlsystems.com (8.9.1/8.8.5) with SMTP id JAA18382; Mon, 26 Oct 1998 09:05:11 GMT Date: Mon, 26 Oct 1998 09:05:11 +0000 (GMT) From: Doug Rabson To: Thomas Valentino Crimi cc: mjacob@feral.com, freebsd-alpha@FreeBSD.ORG Subject: Re: PCI mapping error In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Sat, 24 Oct 1998, Thomas Valentino Crimi wrote: > > Excerpts from mail: 24-Oct-98 Re: PCI mapping error by Matthew > Jacob@feral.com > > > >Which platform this is would be helpful. > > I've been working on an AlphaStation 200 4/233. On the PCI bus are > also ncr and de drivers, which are working just fine. > > To answer one of Mike Smith's questions, va and pa are both set to > 0x88000000, I also double checked the mem-map register on the card at > one point. I'm going to be grabbing a PC with PCI support later on > tonight and see what pops up. > > Oh, another note. Before I tried out the read/write functions, I > tried using direct memory access, this paniced the kernel: > manual retype: > > fatal kernel trap: > > trap entry = 0x2 (memory management fault) > a0 = 88400000 > a1 = 0x1 > a2 = 0x1 > ... > > If this is a more telling than read/write, I'll do a full register > dump and whatever else may help (show map gives another fault, unaligned > access) > > On a note, this card worked under AlphaLinux-XWindows before I got to > thinking it should do more than just be an X display. For important architectural reasons, the 'va' from pci_map_mem() is the physical address and the readx/writex macros translate it to a virtual address in a chipset-specific way. The addresses supplied by pci_map_dense() and pci_map_bwx() (you probably want pci_map_dense()) are normal virtual addresses but you should be aware that an 8 bit or 16 bit access will generate a larger access to the device (64 bits I think). This is fine for framebuffers but not for memory mapped registers. -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 951 1891 Fax: +44 181 381 1039 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message