Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Jul 1998 15:09:12 -0700
From:      "Chris Csanady" <cc@tarsier.ca.sandia.gov>
To:        Terry Lambert <tlambert@primenet.com>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: pci_map_mem() failing.. 
Message-ID:  <199807282209.PAA13462@tarsier.ca.sandia.gov>
In-Reply-To: Your message of "Tue, 28 Jul 1998 21:52:25 -0000." <199807282152.OAA18723@usr04.primenet.com> 

next in thread | previous in thread | raw e-mail | index | archive | help

>> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199807282209.PAA13462>