Hi,
We are working on developing our own PCI and CPCI cards using PLX
Technologies’ PCI chip sets. One nice feature of these devices is that they
are very configurable with regards to amount of PCI resources required. It
also allows for setting the device class, device & vendor ids, etc. This
configuration information is stored in a EEPROM for configuration at
powerup.
This EEPROM can be configured through the PCI configuration space of the
device except for the need for a couple accesses to PCI address block 0.
Now, our problem is that we have boards with blank, unprogrammed EEPROMs
that need to be programmed. The PLX chip is working and its configuration
space is accessible, but, we cannot get access to PCI address block 0. The
PCI server does not report that the device has any address blocks associated
with it, even though we know for sure (hard coded in the PLX chip) that it
does.
We think that the problem is that the PCI servers treat bridge devices
differently than other devices. Unconfigured PLX chips use the “other
bridge” class code.
We verified our findings using a PCI card for with we have a DOS program
that allows us to configure the PLX chip. We do not have this option
currently available to us on the CPCI platform. We plugged in a propperly
configured PCI card and got the following output from our driver. This
information matches with “pci -v” but this output also includes the actual
PCI configuration space registers.
Attaching to the PCI server.
devc-csp.c:PCI Interface: VERSION 528
devc-csp.c: PCI Bus: 0-3
devc-csp.c: HW Support: 0x0
Looking for PCI card: Vendor 0x10B5, device 0x9050.
devc-csp.c:PCI Configuration
devc-csp.c:=================
devc-csp.c:0x905010B5 0x02800003 0x11800002 0x00000008
devc-csp.c:0xF4800000 0x0000B401 0xF4000000 0xF3800000
devc-csp.c:0xE0000000 0xF7000008 0x00000000 0x905010B5
devc-csp.c:0x00000000 0x00000000 0x00000000 0x00000105
devc-csp.c:Memory bank 0 mapped to address 40100000.
devc-csp.c:Memory bank 2 mapped to address 40101000.
devc-csp.c:Memory bank 3 mapped to address 40102000.
devc-csp.c:Memory bank 4 mapped to address 40202000.
devc-csp.c:Memory bank 5 mapped to address 50202000.
Found 6 address blocks.
DeviceId: 0x9050
VendorId: 0x10B5
SubsystemId: 0x9050
SubsystemVendorId: 0x10B5
BusNumber: 2
DevFunc: 88
Revision: 2
Class: 0x118000
Irq: 5
CpuIoTranslation: 0x0000000000000000
CpuMemTranslation: 0x0000000000000000
CpuISaTranslation: 0x0000000000000000
CpuBmstrTranslation: 0x0000000000000000
PciBaseAddress 0: 0x00000000F4800000
CpuBaseAddress 0: 0x00000000F4800000
BaseAddressSize 0: 128
PciBaseAddress 1: 0x000000000000B401
CpuBaseAddress 1: 0x000000000000B401
BaseAddressSize 1: 128
PciBaseAddress 2: 0x00000000F4000000
CpuBaseAddress 2: 0x00000000F4000000
BaseAddressSize 2: 4096
PciBaseAddress 3: 0x00000000F3800000
CpuBaseAddress 3: 0x00000000F3800000
BaseAddressSize 3: 1048576
PciBaseAddress 4: 0x00000000E0000000
CpuBaseAddress 4: 0x00000000E0000000
BaseAddressSize 4: 268435456
PciBaseAddress 5: 0x00000000F7000008
CpuBaseAddress 5: 0x00000000F7000008
BaseAddressSize 5: 1048576
PciRom: 0x0000000000000000
CpuRom: 0x0000000000000000
RomSize: 0
As you can see, all 6 address blocks are available and configured.
Then we changed the class code on this card to be “other bridge” to match an
unconfigured card. No other configuration information was changed. The
following is the output from the driver after this change.
Attaching to the PCI server.
devc-csp.c:PCI Interface: VERSION 528
devc-csp.c: PCI Bus: 0-3
devc-csp.c: HW Support: 0x0
Looking for PCI card: Vendor 0x10B5, device 0x9050.
devc-csp.c:PCI Configuration
devc-csp.c:=================
devc-csp.c:0x905010B5 0x02800003 0x06800002 0x00000008
devc-csp.c:0xF4800000 0x0000B401 0xF4000000 0xF3800000
devc-csp.c:0xE0000000 0xF7000008 0x00000000 0x905010B5
devc-csp.c:0x00000000 0x00000000 0x00000000 0x00000105
Found 0 address blocks.
DeviceId: 0x9050
VendorId: 0x10B5
SubsystemId: 0x0000
SubsystemVendorId: 0x0000
BusNumber: 2
DevFunc: 88
Revision: 2
Class: 0x68000 Bridge-other
Irq: 255
CpuIoTranslation: 0x0000000000000000
CpuMemTranslation: 0x0000000000000000
CpuISaTranslation: 0x0000000000000000
CpuBmstrTranslation: 0x0000000000000000
PciRom: 0x0000000000000000
CpuRom: 0x0000000000000000
RomSize: 0
No address blocks exist on this device.
Notice that the PCI server did not report any address blocks to the driver.
Again this is verified with “pci -v”. Looking at the PCI configuration
registers, we see that the address blocks were configured though.
Without getting access to address block 0, we can’t program the EEPROM.
Without a programmed EEPROM, we can’t access address block 0. Catch-22!
Is there any reason why the PCI server does not report the address block to
the drivers for “other bridge” devices? We get the same results using
pci-bios on an x86 PC and pci-raven on a PPC board.
Can we get this fixed?
Thanks,
Wayne Fisher