Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Jul 1998 17:45:44 -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:  <199807290045.RAA14001@tarsier.ca.sandia.gov>
In-Reply-To: Your message of "Tue, 28 Jul 1998 22:24:28 -0000." <199807282224.PAA20070@usr04.primenet.com> 

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

>> >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.)
>
>PCI does not support 64 address lines, only 32.
>
>There is a move to extend the PCI specification, but it has yet to
>be ratified as a standard, AFAIK.

I'm pretty sure that the 2.1 spec allows 64 bit 66MHz busses.  Or at least
this book in front of me says so. :)

>> 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_32BI
T){
>>                 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?
>
>If it was supported, then yes, it would need to, from my knowledge of
>experimental 64 bit PCI implementations by Intel and another vendor
>with a competing connector and lead arrangement.
>
>Is there a particular reason you are trying to do this in 64 bit mode
>instead of 32 bit mode?

The low few bits are part of the PCI base mem register, and can't be
changed, AFAIK.  It simply says that the memory *can* be mapped anywhere
in a 64 bit addr space, not that it has to be.  So, when the card is used
ini 32 bit mode, it will just have to live with the limitation of using
the first 4GB. :)

Actually, I had a typo and once the above check was fixed, it now works.
A diff for the 2.2 branch follows.  This is not entirely correct, but
should work.

>Do you have one of these experimental extended bus connectors that you
>are using?

We have some alphas that have 64bit PCI.

[...]

>Sorry about the hand; I broke the pinky of my right hand a while
>ago, and typing was a bugger (I'm right handed, as well).  Very
>quick route to tendonitus in the other hand.  8-(.

Me too. :(  It is extremely frustrating, and I already have tendonitis
to some degree as well.  Ugh.

Chris Csanady


*** /sys/pci/pci.c.old  Tue Jul 28 16:23:39 1998
--- /sys/pci/pci.c      Tue Jul 28 16:27:46 1998
***************
*** 1087,1093 ****
  
        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);
--- 1087,1094 ----
  
        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
!           && (data & PCI_MAP_MEMORY_TYPE_MASK) != PCI_MAP_MEMORY_TYPE_64BIT){
                printf ("pci_map_mem failed: bad memory type=0x%x\n",
                        (unsigned) data);
                return (0);




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?199807290045.RAA14001>