Hello,
I have been developing a PCIe driver for an FPGA based board.
I have installed the board on a different PCIe slot and discovered that the device path is different per slot:
L"\\?\pci#ven_10ee&dev_7024&subsys_702410ee&rev_00#4&BBAB1DF&0&00E0#{5ca803a8-c2a1-46d7-946d-89b9edbbd363}\DATA1"
on another slot or another PC:
L"\\?\pci#ven_10ee&dev_7024&subsys_702410ee&rev_00#4&333454e6&0&0030#{5ca803a8-c2a1-46d7-946d-89b9edbbd363}\DATA1"
My question is, how is a generic application (user mode) is expected to access the device?
Igal
-
If there can be only one such device in the system at any time - then usermode application enumerates all instances and uses the 1st found one.
-
Implement a “serial number” capability to the fpga.
https://msdn.microsoft.com/en-us/library/windows/hardware/ff537558(v=vs.85).aspx
regards,
– pa
THe proper way for an application to use device interfaces is to enumerate them using the appropriate SetupDi* functions.
I think the real question is how to do the enumeration. I have a program which enumerates devices supported by my driver by using the API:
“SetupDiGetClassDevs” in setupapi.dll
* Bob
? Bob Ammerman
? xxxxx@ramsystems.biz
716.864.8337
138 Liston St
Buffalo, NY 14223
www.ramsystems.biz
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:bounce-620242-
xxxxx@lists.osr.com] On Behalf Of xxxxx@fastmail.fm
Sent: Wednesday, November 23, 2016 10:54 AM
To: Windows System Software Devs Interest List
> Subject: RE:[ntdev] Access multiple PCIe interfaces
>
> 1. If there can be only one such device in the system at any time - then
> usermode application enumerates all instances and uses the 1st found one.
>
> 2. Implement a “serial number” capability to the fpga.
>
> https://msdn.microsoft.com/en-
> us/library/windows/hardware/ff537558(v=vs.85).aspx
>
> regards,
> – pa
>
>
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list online at: http:
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and
> software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at
> http:</http:></http:></http:>
xxxxx@gmail.com wrote:
I have been developing a PCIe driver for an FPGA based board.
I have installed the board on a different PCIe slot and discovered that the device path is different per slot:
L"\\?\pci#ven_10ee&dev_7024&subsys_702410ee&rev_00#4&BBAB1DF&0&00E0#{5ca803a8-c2a1-46d7-946d-89b9edbbd363}\DATA1"
on another slot or another PC:
L"\\?\pci#ven_10ee&dev_7024&subsys_702410ee&rev_00#4&333454e6&0&0030#{5ca803a8-c2a1-46d7-946d-89b9edbbd363}\DATA1"
My question is, how is a generic application (user mode) is expected to access the device?
Well, you certainly don’t hardcode the hardware ID. Some parts of that
are randomized.
This is what device interfaces are for. The user mode application uses
the SetupDi APIs to enumerate all of the devices that support a
particular device interface. SetupDiEnumDeviceInterfaces returns the
set of the devices that implement an interface.
SetupDiGetDeviceInterfaceDetail then returns the actual file name you
need. There are lots of examples on the web.
My guess is that you probably already have an interface:
{5ca803a8-c2a1-47d8-946d-89b9edbbd363}.
By the way, you need to change the vendor and device ID before you ship
that hardware. You shouldn’t release a device into the wild using
Xilinx’s numbers.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.