Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

PCIe Multi Function Device

msrmsr Member Posts: 342
edited November 22 in NTDEV

Hi

Below from archives

>>
If your device has multiple interfaces, for example multiple ports in a NIC, you'll need to split that out so that Windows perceives your adapter as multiple devices. 
You can either do that 
1) using the PCI spec, exposing multiple functions in which case Microsoft's PCI.sys will be the bus driver that exposes multiple device, or 
2) do it by exposing a single function to PCI.sys and then supplying your own bus driver which further splits your adapter up into different logical devices.

If you choose to use Microsoft's bus driver, then you've got to conform to 
a) all the picayune details of the PCI and PCI Express specs for multi-function devices and 
b) all the things implied by those specs within Microsoft's driver model.
<<

[A] Why is [b] needed if device already satisfies [a] ?
[B] Can I use MF.sys with below
- No registers overlap

  • Uses MSI or possibly MSI-X
  • Probably each driver can Dx/reset/upgrade itself without affecting the other.

Thanks

Comments

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 13,158

    Are you trying to design a new device here? If you conform to the PCIe multifunction spec, then each device gets its own configuration space, and everything is managed by the PCI bus driver, just like a multi-interface USB device. MF.SYS is for devices that have one function (in PCI terms). Have you been through this pages and the pages following?

    https://docs.microsoft.com/en-us/windows-hardware/drivers/multifunction/using-the-system-supplied-multifunction-bus-driver

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • msrmsr Member Posts: 342

    Tim
    Yes, looking at requirements for a true multifunc pcie device eventually.
    But as initial next step looking at using using MF.sys. I went through those later pages as well now, looks like I could use those resource maps with MSIX, need to see if I can use those with MSI as well.
    Thanks

  • Pavel_APavel_A Member Posts: 2,691
    edited November 25

    Do the functions require non trivial custom drivers? Then maybe make a bus driver, and manage the resources in it.
    But if you plan to reuse in-box drivers, sharing MSI interrupts with them may be a problem.
    -- pa

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
Writing WDF Drivers 21 Oct 2019 OSR Seminar Space & ONLINE
Internals & Software Drivers 18 Nov 2019 Dulles, VA
Kernel Debugging 30 Mar 2020 OSR Seminar Space
Developing Minifilters 27 Apr 2020 OSR Seminar Space & ONLINE