PCIe slot power limit

Per standard forum protocol, I have searched the archives and Google, but haven’t found what I need.

I have inherited a WDM driver that needs to be modified for the next generation of PCIe hardware. The new hardware requires up to 60W, which is more than the motherboard is required to supply, though the motherboard may supply up to 75W. Because of this, we need to query the system to see how much power the slot provides, in order to choose low or high power mode. To complicate matters, the new hardware has a switch chip, which means we must traverse the PCIe device tree, in order to get to the slot.

Can anyone point me to relevant documentation/forum posts/etc. that can show me how to traverse the tree and get the information I need?

For full disclosure, I am not a Windows driver programmer by background, but I’ve tried to glean what I can from “Programming the WDM, 2nd ed.” in researching this.

Thanks in advance.

Chad

The power hogs such as video cards usually have an auxiliary power connector. It provides 12 V supply.

Alex,

This is true, but this card does not have an auxiliary power connector. This is not a problem for the card, however performance is reduced in low power mode, so the driver needs to know which mode to tell the card to run in.

xxxxx@aha.com wrote:

I have inherited a WDM driver that needs to be modified for the next generation of PCIe hardware. The new hardware requires up to 60W, which is more than the motherboard is required to supply, though the motherboard may supply up to 75W. Because of this, we need to query the system to see how much power the slot provides, in order to choose low or high power mode.

How do you expect to find out that information? I’m not aware of any
interface that will tell you the maximum power available to a PCIe slot.


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

On 19-Dec-2014 00:27, cdaniels wrote:

how to traverse the tree and get the information I need?

If the relevant bits are in the config space of the PCIe root port
(like, the Power budget register in Enhanced capability block,
or Slot status registers in PCIe capability block),
the driver may be able to get this as described here:

http://msdn.microsoft.com/en-us/library/windows/hardware/ff536890(v=vs.85).aspx

– pa

First off, thank you for your responses.

@Tim Roberts: The switch chip has a “downstream port” that gets configured with this information by the BIOS at boot. In Linux we simply take our PCIe device object, and traverse the object tree until we get the device object for the downstream port, and then read its configuration. As stated, I’m not a Windows driver programmer by background, so I’m trying to find the correct mechanism to access this information in a Windows driver.

@Pavel A: Thanks for the link. I’ll take a look.