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

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

Reenumerating PCIe device without restart

Hello,

We have an FPGA huins board connected to Windows 7 host machine. To flash the firmware we reset the FPGA board, at this point the PCIe link to the host is off (LED is turned orange). After flashing the firmware to bring the PCIe link up we need to restart the host machine.

However we want to avoid doing a restart, for this we carried out following mechanism

Connected the PCIe slot to an external power source, once the firmware is flashed we switch off the power to the particular PCIe slot and bring the power on, with this approach the PCIe link LED turns green but device is not enumerated on the host

I have following questions wrt this:

1) Is there a way to control power to a PCIe slot without any external power source?

2) How to trigger a reenumeration of the PCIe device? Is there any way to talk to PCIe driver to reenumerate the device connected to the slot?

Info: There is a phy reset button on the FPGA board, with this the link is up and the host is able to reenumerate the device but so far we haven't found a way to issue this reset via some command. Here the host is able to detect the device without restart, however I would like to know is there anything which can be done to do the similar thing from the host side

Thanks.

Comments

  • Before the flash & reset does the FPGA show up as a device on the PCIe port? Or only after you press the PHY reset button on the board?

    Is there a GPIO from the FPGA to the PHY reset that you could drive as part of initializing the controller after reconfiguring it?

    -p

    -----Original Message-----
    From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
    Sent: Tuesday, November 7, 2017 9:47 AM
    To: Windows System Software Devs Interest List <xxxxx@lists.osr.com>
    Subject: [ntdev] Reenumerating PCIe device without restart

    Hello,

    We have an FPGA huins board connected to Windows 7 host machine. To flash the firmware we reset the FPGA board, at this point the PCIe link to the host is off (LED is turned orange). After flashing the firmware to bring the PCIe link up we need to restart the host machine.

    However we want to avoid doing a restart, for this we carried out following mechanism

    Connected the PCIe slot to an external power source, once the firmware is flashed we switch off the power to the particular PCIe slot and bring the power on, with this approach the PCIe link LED turns green but device is not enumerated on the host

    I have following questions wrt this:

    1) Is there a way to control power to a PCIe slot without any external power source?

    2) How to trigger a reenumeration of the PCIe device? Is there any way to talk to PCIe driver to reenumerate the device connected to the slot?

    Info: There is a phy reset button on the FPGA board, with this the link is up and the host is able to reenumerate the device but so far we haven't found a way to issue this reset via some command. Here the host is able to detect the device without restart, however I would like to know is there anything which can be done to do the similar thing from the host side

    Thanks.

    ---
    NTDEV is sponsored by OSR

    Visit the list online at: <https://na01.safelinks.protection.outlook.com/?url=http://www.osronline.com/showlists.cfm?list=ntdev&amp;data=02|01|[email protected]|22e067f1f09841c89a7508d52607b1af|72f988bf86f141af91ab2d7cd011db47|1|0|636456736838170182&amp;sdata=BnXDhATUDakrJU68j2sagtLfqp3QFjA1EKVxlUD79b8=&amp;reserved=0&gt;

    MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
    Details at <https://na01.safelinks.protection.outlook.com/?url=http://www.osr.com/seminars&amp;data=02|01|[email protected]|22e067f1f09841c89a7508d52607b1af|72f988bf86f141af91ab2d7cd011db47|1|0|636456736838170182&amp;sdata=IMpm6jp4tw/GIn2v/9dbYcBhnyqUgcE7b+f//JSe8pE=&amp;reserved=0&gt;

    To unsubscribe, visit the List Server section of OSR Online at <https://na01.safelinks.protection.outlook.com/?url=http://www.osronline.com/page.cfm?name=ListServer&amp;data=02|01|[email protected]|22e067f1f09841c89a7508d52607b1af|72f988bf86f141af91ab2d7cd011db47|1|0|636456736838170182&amp;sdata=1PKPadM++jk0Q3IuX6X79CfJCNbRTPbEo9WAhiPDVIY=&amp;reserved=0&gt;
  • Tim_RobertsTim_Roberts Posts: 12,568
    xxxxx@gmail.com wrote:
    > We have an FPGA huins board connected to Windows 7 host machine. To flash the firmware we reset the FPGA board, at this point the PCIe link to the host is off (LED is turned orange). After flashing the firmware to bring the PCIe link up we need to restart the host machine.
    >
    > However we want to avoid doing a restart, for this we carried out following mechanism
    >
    > Connected the PCIe slot to an external power source, once the firmware is flashed we switch off the power to the particular PCIe slot and bring the power on, with this approach the PCIe link LED turns green but device is not enumerated on the host

    In order for this to work, your BIOS must support PCIExpress hot plug. 
    Almost none of the mainstream BIOSes do so.  You'll find it in some of
    the server machines.

    If you can somehow keep your configuration space valid across the reset,
    you'd stand a chance.


    > I have following questions wrt this:
    > ...
    > 2) How to trigger a reenumeration of the PCIe device? Is there any way to talk to PCIe driver to reenumerate the device connected to the slot?

    It has to be managed by the BIOS.  If the BIOS doesn't do it, there is
    no hope.

     
    > Info: There is a phy reset button on the FPGA board, with this the link is up and the host is able to reenumerate the device but so far we haven't found a way to issue this reset via some command. Here the host is able to detect the device without restart,

    Probably because this reset has not interrupted power, so the
    configuration space is still intact.  With a scope, you ought to be able
    to figure out which FPGA pin this thing is wired to.  Given that, surely
    you can concoct Verilog to tickle the same pin via a register write.


    > however I would like to know is there anything which can be done to do the similar thing from the host side

    We don't have any way to know how your board is wired.

    --
    Tim Roberts, xxxxx@probo.com
    Providenza & Boekelheide, Inc.

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

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!