Quick Question (Ignore the rest depending on the answer):
Is there a known problem with QRTP PCI and the DEC 21150-AA bridge
chip?
Is there a known problem with PCI bridges in general?
Summary:
Card works on PCI bus 0 but not 2 or 3. May be the bridge chip, or PCI
SW problems using bridge chip.
Details:
My system consists of a Pentium CPU card plugged into a ‘passive’
backplane with 12 PCI slots. It also has ISA slots, but that is beside
th epoint here.) The CPU card has all standard PC peripherals on it. The
PCI slots on the backplane are divided among three PCI bus segments.
One, bus 0, is connected directly to the host bridge chip on the CPU
card, an Intel 440. The other two bus segments are 5-slots each conected
to the first bus (bus 0) by DEC 21150-AA bridge chips.
I have a PCI card: a Bancomm bc635pci time processor. It has two memory
areas available on the PCI bus. I have some simple code to attach and
map the two areas into process address space, and read some basic data
from them.
The code works a fine when the card is plugged into my first PCI bus
(bus 0), attached to the host-PCI Intel bridge chip. The attach works,
the mmap_device_memory() works, and I can access card resources when
I use the process addresses returned by the mmap_device_memory() calls.
However, when I plug the card into any other bus, connected to the
first with a DEC 21150-AA bridge, it works as before up until I try to
use the mapped address. The process addresses returned by the
mmap_device_memory() call return 0xffffffff when used, so the same code
does not work.
Bus 0 is connected to the processor by an Intel 440 host-PCI bridge.
However, the other off-board buses are connected to bus 0 with a
DEC21150-AA chip.
Clues:
When QRTP boots up and the board is in one of these other buses
(connected by the DEC 21150 chip), the message " Range check failed: MEM
vendor = 0x12e2, device = 0x4013" (or something like it.) is displayed
twice (I presume once for each memory area on the card.)
The base addresses in the info structure are different when the card is
plugged into different slots.
Code Fragment:
phdl = pci_attach(0);
if (phdl == -1) {
perror(“pci_attach”);
exit(EXIT_FAILURE);
}
memset(&info, 0, sizeof(info));
/* Device index: which PCI card with this vendor and device id
*/
pidx = 0;
/*
- Look up Bancomm bc635pci by vendor and device
*/
info.VendorId = BC635PCI_VENDORID;
info.DeviceId = BC635PCI_DEVICEID;
/*
- Do pci_attach_device() to find device, and create handle
*/
hdl = pci_attach_device(NULL, PCI_SHARE | PCI_SEARCH_VENDEV |
PCI_INIT_AL
pidx, &info);
if (hdl == NULL) {
fprintf(std err, “pci_attach_device() failed.\n”);
exit(EXIT_FAILURE);
}
register_base = mmap_device_memory(NULL,
info.BaseAddressSize[0],
PROT_WRITE | PROT_READ | PROT_NOCACHE,
MAP_TYPE,
info.CpuBaseAddress[0]);
nvram_base = mmap_device_memory(NULL, info.BaseAddressSize[1],
PROT_WRITE | PROT_READ | PROT_NOCACHE,
MAP_TYPE,
info.CpuBaseAddress[1]);
/* Print first some 32-bit words of card registers */
printf(“ACK Register : 0x%08x\n”, register_base[5]);
printf(“Control Register: 0x%08x\n”, register_base[4]);
printf(“Interrupt mask : 0x%08x\n”, register_base[6]);
printf(“Interrupt Status: 0x%08x\n”, register_base[7]);
/* Strobe time reguest and print time */
strobe = register_base[0];