Re: Accessing PCI device behind a non-transparent bridge.



Maybe you need your own driver for non-transparent PCI bridge, not reuse
PCI.SYS for it. I have major doubts that PCI.SYS have a well-developed support
for non-transparent bridges.

Such a driver of your own should have implemented the DMA interface and the
DMA adapter object of your own.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@xxxxxxxxxxxxxxxx
http://www.storagecraft.com

"rksaripalli@xxxxxxxxxxx" <rksaripalli@xxxxxxxxxxx@discussions.microsoft.com>
wrote in message news:87CE020E-7864-45F9-A6D4-5363FEB6871D@xxxxxxxxxxxxxxxx
I have some questions on accessing a PCI device behind a non-transparent
bridge.

I have a PCI bridge that originates a PCI like bus on its secondary device.
This bridge connects to the host through the PCI slot(32-bit 33Mhz). The
bridge, though, is a non-transparent bridge. This secondary bus allows
regular PCI devices to be plugged into the bus. I have a PCI device that sits
on the secondary bus. I have a driver for this device that works if the PCI
device is plugged into the host's PCI bus. I am thinking that the same driver
does not work when the PCI device is plugged to the secondary bus. In
particular, since the bridge terminates all memory transactions on the
secondary bus (including MSI and interrupt transactions) and does not forward
to the primary interface, the driver as it is will not work.

SO I have the following solution.

Write a bus driver that talks to the bridge through the host PCI interface.
This bus driver enumerates the PCI-like bus on the secondary side , will
detect my device and initialize it. So far so good. The device I/F is such
that its DMA ranges are programmed using configuration accesses. This is
where the driver model breaks down. Even if my bus driver takes the config
accesses and forwards them to the secondary side as configuration accesses on
the secondary side, because the driver programs the ranges as host ranges
which cannot be reached from the secondary side. THis means I cannot reuse
the driver.

Ideally, I want to be able to have the same driver binary in both PCI and
secondary bus case. In the secondary bridge case, I want to be able to
allocate shadow ranges on the host side that get filled in when the PCI
device does DMA (or copied from) on the secondary side.

I have another related question. Windows claims to run on architectures with
non-transparent bridges(such as from Intel or DEC). If a PCI-to-PCI bridge is
nontransparent can Windows reuse the same driver as in the traditional PCI
case?. If so, how is this done especially if the secondary side cannot access
the host memory ranges.

Thank you,
RK

.



Relevant Pages

  • aic7xxx problem on sparc64 (2.6)
    ... PCI: Probing for controllers. ... PCI0: Bus running at 33MHz ... Uniform Multi-Platform E-IDE driver Revision: ... CMD646: IDE controller at PCI slot 0000:01:03.0 ...
    (Linux-Kernel)
  • Re: Nvidia MCP55 Machine reboots on ixgb driver load
    ... There are some serious hardware compatibility issues with the ixgb mixing it with other cards on the same PCI-X bus, ... loading the driver with debug does not appear to produce ... 02:00.0 PCI bridge: NEC Corporation uPD720400 PCI Express - PCI/PCI-X Bridge ... ACPI: Power Button ...
    (Linux-Kernel)
  • EXT3 causes system crash using dvgrab...
    ... the grabbing proceedure quits with a "bus error". ... PCI: PCI BIOS revision 2.10 entry at 0xfb5a0, ... PCI Interrupt Link enabled at IRQ 10 ... Serial driver version 5.05c with HUB-6 MANY_PORTS MULTIPORT ...
    (comp.os.linux.development.system)
  • Sound stopped working a month ago!
    ... bus master, 66MHz, fast devsel, latency 64 ... bus: PCI ... driver: intel-rng ... deviceId: 244e ...
    (comp.os.linux.misc)
  • dazu die /var/log/dmesg
    ... ACPI: Looking for DSDT ... ... ACPI: bus type pci registered ... RAMDISK driver initialized: 16 RAM disks of 65536K size ...
    (de.comp.os.unix.apps.kde)