From owner-freebsd-alpha Sat Oct 24 11:43:02 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA29987 for freebsd-alpha-outgoing; Sat, 24 Oct 1998 11:43:02 -0700 (PDT) (envelope-from owner-freebsd-alpha@FreeBSD.ORG) Received: from dingo.cdrom.com (castles209.castles.com [208.214.165.209]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA29982 for ; Sat, 24 Oct 1998 11:43:00 -0700 (PDT) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (localhost [127.0.0.1]) by dingo.cdrom.com (8.9.1/8.8.8) with ESMTP id LAA05381; Sat, 24 Oct 1998 11:47:00 -0700 (PDT) (envelope-from mike@dingo.cdrom.com) Message-Id: <199810241847.LAA05381@dingo.cdrom.com> X-Mailer: exmh version 2.0.2 2/24/98 To: Thomas Valentino Crimi cc: freebsd-alpha@FreeBSD.ORG Subject: Re: PCI mapping error In-reply-to: Your message of "Sat, 24 Oct 1998 03:27:08 EDT." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 24 Oct 1998 11:47:00 -0700 From: Mike Smith 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? 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