From owner-freebsd-alpha Sat Oct 24 00:28:39 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id AAA22876 for freebsd-alpha-outgoing; Sat, 24 Oct 1998 00:28:39 -0700 (PDT) (envelope-from owner-freebsd-alpha@FreeBSD.ORG) Received: from po6.andrew.cmu.edu (PO6.ANDREW.CMU.EDU [128.2.10.106]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id AAA22868 for ; Sat, 24 Oct 1998 00:28:38 -0700 (PDT) (envelope-from tcrimi+@andrew.cmu.edu) Received: (from postman@localhost) by po6.andrew.cmu.edu (8.8.5/8.8.2) id DAA18231 for freebsd-alpha@freebsd.org; Sat, 24 Oct 1998 03:28:01 -0400 (EDT) Received: via switchmail; Sat, 24 Oct 1998 03:28:01 -0400 (EDT) Received: from unix14.andrew.cmu.edu via qmail ID ; Sat, 24 Oct 1998 03:27:10 -0400 (EDT) Received: from unix14.andrew.cmu.edu via qmail ID ; Sat, 24 Oct 1998 03:27:08 -0400 (EDT) Received: from mms.4.60.Jun.27.1996.03.02.53.sun4.51.EzMail.2.0.CUILIB.3.45.SNAP.NOT.LINKED.unix14.andrew.cmu.edu.sun4m.54 via MS.5.6.unix14.andrew.cmu.edu.sun4_51; Sat, 24 Oct 1998 03:27:08 -0400 (EDT) Message-ID: Date: Sat, 24 Oct 1998 03:27:08 -0400 (EDT) From: Thomas Valentino Crimi To: freebsd-alpha@FreeBSD.ORG Subject: PCI mapping error Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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