From owner-freebsd-hackers Tue Jul 28 15:08:48 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA29232 for freebsd-hackers-outgoing; Tue, 28 Jul 1998 15:08:48 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from tarsier.ca.sandia.gov (tarsier.ca.sandia.gov [146.246.246.124]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA29136 for ; Tue, 28 Jul 1998 15:08:31 -0700 (PDT) (envelope-from cc@tarsier.ca.sandia.gov) Received: from tarsier.ca.sandia.gov (localhost [127.0.0.1]) by tarsier.ca.sandia.gov (8.8.8/8.8.8) with ESMTP id PAA13462; Tue, 28 Jul 1998 15:09:12 -0700 (PDT) (envelope-from cc@tarsier.ca.sandia.gov) Message-Id: <199807282209.PAA13462@tarsier.ca.sandia.gov> X-Mailer: exmh version 2.0.2 2/24/98 To: Terry Lambert cc: hackers@FreeBSD.ORG Subject: Re: pci_map_mem() failing.. In-reply-to: Your message of "Tue, 28 Jul 1998 21:52:25 -0000." <199807282152.OAA18723@usr04.primenet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 28 Jul 1998 15:09:12 -0700 From: "Chris Csanady" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >> Anyways.. I am working on a device driver, and so far have not been able to >> get this seemingly simple aspect of it to work. I am getting the following >> error: >> pci_map_mem failed: bad memory type=0xfffff004 >> >> It seems that the pci code does not know how to handle 64bit cards. If >> I yank the lines in pci.c that check the memory type, it produces no >> errors, although the mapping still does not work. What am I missing >> here? > >Information about how you intend to latch a 64 bit address onto a 32 >bit bus? > >Or do you mean "64 bit" the way the video card manufacturers mean >it, which is internal data path between video memory and the graphics >engine on the card itself? The card actually is actuall a 64 bit card, so it is possible to address the memory in an alpha or such. The second and third bit of the base address register (0xfffff004) in this case say that the memory mapping may be anywhere in the 64 bit address space. (For 32 bit, they should be zero.) The following case in pci/pci.c throws out all 64 bit cards it seems: /* ** check the type */ if (!((data & PCI_MAP_MEMORY_TYPE_MASK) == PCI_MAP_MEMORY_TYPE_32BIT_1M && (paddr & ~0xfffff) == 0) && (data & PCI_MAP_MEMORY_TYPE_MASK) != PCI_MAP_MEMORY_TYPE_32BIT){ printf ("pci_map_mem failed: bad memory type=0x%x\n", (unsigned) data); return (0); }; Is this correct? After removing this, it still does not seem to work. Does the pci code need to play with the next 32 bits of the base address register too? I noticed that the current code is much different, although I am not set up to do developement on current now. It is painful enough typing one handed, so I am looking for the quick and dirty solution. Chris To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message