Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Oct 1998 09:05:11 +0000 (GMT)
From:      Doug Rabson <dfr@nlsystems.com>
To:        Thomas Valentino Crimi <tcrimi+@andrew.cmu.edu>
Cc:        mjacob@feral.com, freebsd-alpha@FreeBSD.ORG
Subject:   Re: PCI mapping error
Message-ID:  <Pine.BSF.4.01.9810260901340.366-100000@herring.nlsystems.com>
In-Reply-To: <sqAZ3ES00YUq0dDlk0@andrew.cmu.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.01.9810260901340.366-100000>