host mastered 64 bit wide transfers to 64 bit PCI slot?

host mastered 64 bit wide transfers to 64 bit PCI slot?

Post by Galen Seit » Thu, 09 May 2002 02:30:13



I have a custom 64 bit wide PCI card installed in a 64 bit slot.  The card has
an 8 MB prefetchable memory window available via BAR 0.  Memory accesses work
(/dev/mem and mmap), but I'm not seeing 64 bit wide transfers (req64, ack64
aren't toggling).  How can I get the host/northbridge to generate 64 bit wide
transfers?  

I'm currently trying to do my testing from user space.  Here's a snippet
of code.  The code leading up to this just reads from /proc/bus/pci/devices
to get the BAR info.  I run this code while holding a scope probe on /REQ64.
Note that this is strictly a question about the width of data transfers.
I'm not doing 64 bit addressing (no DAC cycles).  Host info follows the
code.

TIA,
galen

  if ((memfd = open("/dev/mem", O_RDWR)) < 0)
    perror("open /dev/mem");

  function = 0;
  i = 0;
  pmem = mmap(0, size[function][i], PROT_READ | PROT_WRITE, MAP_SHARED, memfd,
       bar[function][i] & PCI_BASE_ADDRESS_MEM_MASK);
  if (pmem == MAP_FAILED)
    perror("mmap");
  else
    printf("pmem = %08x\n", pmem);

  memset(pmem, 0, size[function][i]);
  if (msync(pmem,  size[function][i], MS_SYNC))
    perror("msync");

  for (offset = 0; offset < size[function][i]; offset += 8)
    {
      *(unsigned long long *)(pmem + offset) = offset;
    }

  if (msync(pmem,  size[function][i], MS_SYNC))
    perror("msync");

  for (offset = 0; offset < size[function][i]; offset += 8)
    {
      if (*(unsigned long long *)(pmem + offset) != offset)
        {
          printf("Error at %04x\n", offset);
          exit(1);
        }
    }

  if (msync(pmem,  size[function][i], MS_SYNC))
    perror("msync");

  if (munmap(0, size[function][i]))
    perror("munmap");

  if (close(memfd))
    perror("close");

The host is an ASUS A7M266-D motherboard (AMD 762 chipset) with a single
800 MHz Duron, and 256 MB DDR.

oz:/home/galens/jobs/45th/sw/pci# cat /proc/version

2.96 20000731 (Red Hat Linux 7.1 2.96-98)) #1 Tue Oct 30 19:32:27 EST 2001

oz:/home/galens/jobs/45th/sw/pci# /sbin/lspci
00:00.0 Host bridge: Advanced Micro Devices [AMD]: Unknown device 700c (rev 11)
00:01.0 PCI bridge: Advanced Micro Devices [AMD]: Unknown device 700d
00:07.0 ISA bridge: Advanced Micro Devices [AMD]: Unknown device 7440 (rev 04)
00:07.1 IDE interface: Advanced Micro Devices [AMD]: Unknown device 7441 (rev
04)
00:07.3 Bridge: Advanced Micro Devices [AMD]: Unknown device 7443 (rev 03)
00:09.0 Memory controller: Galileo Technology Ltd.: Unknown device 6430 (rev
10)
00:09.1 Memory controller: Galileo Technology Ltd.: Unknown device 6430 (rev
10)
00:09.2 Memory controller: Galileo Technology Ltd.: Unknown device 6430 (rev
10)
00:09.3 Memory controller: Galileo Technology Ltd.: Unknown device 6430 (rev
10)
00:09.4 Memory controller: Galileo Technology Ltd.: Unknown device 6430 (rev
10)
00:09.5 Memory controller: Galileo Technology Ltd.: Unknown device 6430 (rev
10)
00:09.6 Memory controller: Galileo Technology Ltd.: Unknown device 6430 (rev
10)
00:09.7 Memory controller: Galileo Technology Ltd.: Unknown device 6430 (rev
10)
00:10.0 PCI bridge: Advanced Micro Devices [AMD]: Unknown device 7448 (rev 04)
01:05.0 VGA compatible controller: S3 Inc. Trio 64 3D (rev 01)
02:08.0 Ethernet controller: 3Com Corporation 3c900B-TPO [Etherlink XL TPO]
(rev 04)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

1. 64 bit Unix (esp. 64 bit IO)

Hi

we are planning to install a large db & file server this year.
All the OS tends to go in the 64 bit direction, so it would
be nice to know a bit what's available today
(or the near future).

I'd be very pleased if you could provide me with some information
about the major plattforms
(AIX,Solaris,HP-UX,IRIX,Digital Unix,SCO, ...
 and WinNT <hope this is not blasphemy :-) >

Filesystem Type (log based or not, ...)
Max. FilesystemSize
Max. FileSize
Max. Virtual Memory Size
True 64-bit (or IO only)

Many thanks
and I'll summarize if there is an interest.

S.Gattert
sni hannover - vt storage solutions

--

2. NFS: mount subdirectory of exported one?

3. Best Build machine: KT333 w/ 32 bit PCI or KT266 w/ 64 bit pci

4. Xfree and my toshiba 300cds

5. performance of runing 32/64 bit program in 64 bit kernel.

6. ANSI Prompt

7. HALstation (64-bit processor running 64-bit Solaris) as webserver

8. Unix Programming FAQ (v1.31)

9. Is 64-bit Linux "true" 64 bit thru-and-thru??

10. IBM announces 64-bit mainframes and 64-bit Linux for S/390

11. 64-bit PCI slots??

12. Determine if card is in 32 or 64 bit PCI slot?

13. 16 bit vs. 64 bit PCI NIC