Date: Sat, 24 Oct 1998 03:27:08 -0400 (EDT) From: Thomas Valentino Crimi <tcrimi+@andrew.cmu.edu> To: freebsd-alpha@FreeBSD.ORG Subject: PCI mapping error Message-ID: <QqAM5AG00YUq0Oi0U0@andrew.cmu.edu>
next 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? 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?QqAM5AG00YUq0Oi0U0>