Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Oct 1998 11:47:00 -0700
From:      Mike Smith <mike@smith.net.au>
To:        Thomas Valentino Crimi <tcrimi+@andrew.cmu.edu>
Cc:        freebsd-alpha@FreeBSD.ORG
Subject:   Re: PCI mapping error 
Message-ID:  <199810241847.LAA05381@dingo.cdrom.com>
In-Reply-To: Your message of "Sat, 24 Oct 1998 03:27:08 EDT." <QqAM5AG00YUq0Oi0U0@andrew.cmu.edu> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 
>   I am working on a driver for the DEC 21030, ZXLp-E[123] card.  I've
> been stumbling on mapping and accessing it's memory.  The following is
> the trial code I am using to do it;
> 
> void
> tga_attach(pcici_t tag, int unit)
> {
>      /* lets have some fun with the card */
> 
>     vm_offset_t     va, pa;
>     
>     if(!pci_mem_map(tag, 0x10, &va, &pa))  {
>           printf("tga: memory map failed!\n");
>           return;
>     }
> 
>    writel(va+ TGA_MEM_CORE, 0); /* doesn't make a difference */
>    printf("location = %#lx\n", readl(va + TGA_MEM_CORE));
> }
> 
>   my readl of many locations within the cardspace that I have tried
> always come up 0xffffffff.  The docs that i have on the card state that
> memory mapping is the only method of access.
> 
>   Now then, I've tried many variations of this code, I've called
> pci_mem_dense and bwx instead of map_mem just for kicks, ran readl
> through a loop through many mem locations, each turns up the same thing.
>  I also inserted a similar printf right after the pci_map_mem call in
> the if_de driver and found it to return a satisfatory number and can't
> see what I'm doing wrong.  I've also tried many variations of variable
> types for va and pa.  Can anyone shed any light on this? 

Sounds weird.  To start with, what's the verbose probe output for the 
device look like?  What sort of values are you getting back in pa/va?

Is this on an Alpha, or do you have one of these cards in a PC?  If the 
former, can you move it to the latter?

-- 
\\  Sometimes you're ahead,       \\  Mike Smith
\\  sometimes you're behind.      \\  mike@smith.net.au
\\  The race is long, and in the  \\  msmith@freebsd.org
\\  end it's only with yourself.  \\  msmith@cdrom.com



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?199810241847.LAA05381>