现在6466桥片设置的是透明模式,p_vio,s_vio都是3.3,设备是正常设备。
在tornado 2.2, vxworks 5.5下,现在桥配置如下:
-> pciDeviceShow
Scanning function 0 of each PCI device on bus 0
Using configuration mechanism 0
bus device function vendorID deviceID class
00000000 00000000 00000000 00001057 00000012 000b2000
00000000 00000015 00000000 000010b5 00006540 00060400
00000000 00000016 00000000 000010b5 00006540 00060400
00000000 00000017 00000000 000010e3 00000148 00068000
value = 0 = 0x0
-> pciHeaderShow 0,0x15
vendor ID = 0x10b5
device ID = 0x6540
command register = 0x0007
status register = 0x02b0
revision ID = 0xcb
class code = 0x06
sub class code = 0x04
programming interface = 0x00
cache line = 0x08
latency time = 0x40
header type = 0x01
BIST = 0x00
base address 0 = 0x00000000
base address 1 = 0x00000000
primary bus number = 0x00
secondary bus number = 0x01
subordinate bus number = 0x01
secondary latency timer = 0x40
IO base = 0x01
IO limit = 0x81
secondary status = 0x22a0
memory base = 0x9000
memory limit = 0x9100
prefetch memory base = 0xc001
prefetch memory limit = 0xc101
prefetch memory base upper = 0x00000000
prefetch memory limit upper = 0x00000000
IO base upper 16 bits = 0x0000
IO limit upper 16 bits = 0x0000
expansion ROM base address = 0x00000000
interrupt line = 0x00
interrupt pin = 0x00
bridge control = 0x0000
value = 0 = 0x0
我访问 prefetch memory base 发现这个空间是可以访问的,但数据都是错的。
-> d 0xc0000000
c0000000: ffff ffff ffff ffff ffff ffff ffff ffff *................*
c0000010: ffff ffff ffff ffff ffff ffff ffff ffff *................*
c0000020: ffff ffff ffff ffff ffff ffff ffff ffff *................*
c0000030: ffff ffff ffff ffff ffff ffff ffff ffff *................*
c0000040: ffff ffff ffff ffff ffff ffff ffff ffff *................*
c0000050: ffff ffff ffff ffff ffff ffff ffff ffff *................*
c0000060: ffff ffff ffff ffff ffff ffff ffff ffff *................*
c0000070: ffff ffff ffff ffff ffff ffff ffff ffff *................*
c0000080: ffff ffff ffff ffff ffff ffff ffff ffff *................*
c0000090: ffff ffff ffff ffff ffff ffff ffff ffff *................*
c00000a0: ffff ffff ffff ffff ffff ffff ffff ffff *................*
c00000b0: ffff ffff ffff ffff ffff ffff ffff ffff *................*
c00000c0: ffff ffff ffff ffff ffff ffff ffff ffff *................*
c00000d0: ffff ffff ffff ffff ffff ffff ffff ffff *................*
c00000e0: ffff ffff ffff ffff ffff ffff ffff ffff *................*
c00000f0: ffff ffff ffff ffff ffff ffff ffff ffff *................*
value = 21 = 0x15
我用pciDeviceShow (0\1\2...255),都看了,没有设备。
希望大家帮我看看,让我的pci设备能正常运行。
------解决方案--------------------------------------------------------
个人建议:
1. 如果是X86平台,建议先在windows平台下,用WinDriver之类的工具先查看一下,能不能识别,识别后的地址空间是什么样的?以前我刚接触PCI驱动开发时,就是这样整的!
2. 另外还可以联系 PCI 6466的技术支持!
------解决方案--------------------------------------------------------
转发:
环境:
os:tornado2.2, vxworks5.5
cpu :ppc
桥芯片:PI7C8150B
透明桥PI7C8150B可以带8个pci设备,而21152只能带4个设备,所以选了pi7c8150.
配置过程主要是对桥的配置寄存器进行写操作。下面我给出我的大概的思路,其实桥的配置
比较复杂,我只是做了一个基本能用的。希望对你有帮助
首先:配置3个总线号。第一总线,第二总线和下级总线。