Hi list,
I’m porting a PCI driver for a PCI express card, but I have an issue with remote wakeup feature.
This driver follow guidelines about WAKE_WAIT IRP, and work well with a PCI device (XP and Vista64).
But with PCI express device, no remotewakeup occur (the option “Allow this device to wake the computer”
is set).
So I checked with a protocol analyser, the device send Power Management Events well, but nor
windows XP - SP2 neither Vista64 does even read or reset PM register.
Even if device is still powered during standy mode (S1 + D3 hot), system does not react !
The only documents I found on the internet specifies Vista handle PME, but don’t specify how !
Documentation of my computer host bridge (ICH7R) specify a full compliance with remote wakeup feature.
Does someone here is able to remote wakeup windows from a PCI express device ?
Does any document about remote wakeup from a PCI express device exist ?
Any clue ?
Thanks
Benedict
Benedict,
Remote wakeup on XP is handled through the firmware, both for PCI and PCI Express. It is the firmware’s responsibility to notice the event and issue a notification to the OS. Of course the hardware handling of PME is very different between PCI and PCIe, so the firmware’s job is very different as well. My guess is that your firmware does not support wake from PCIe, or that it is not enabled in the BIOS setup.
To verify this, you’d have to do the following. PCIe PME messages are sent upstream to the root port, where they are trapped. There are registers in the root port (the format of which is documented in the PCIe Base Specification) that indicate that a PME was received and the bus/device/function of the sending device. You can check these to make sure that the PME actually made it to the chipset. I would guess that it did. If it did, then you could try to look in the ICH7 manual to find the registers that describe how this PME gets routed to an ACPI GPE. You can check to see if this GPE appears to be enabled, and if the BIOS appears to contain support for it.
Dave
Dave,
Thanks for reply :o)
My guess is that your firmware does not support
wake from PCIe, or that it is not enabled in the BIOS setup.
Sorry, but you guesses are wrong.
The device is compliant PCIe 1.1 and firmware handle PME events.
I checked tests computer, and “wakeup on PME#” option is enabled…
PCIe PME messages are sent upstream to the root port, where they are trapped.
Right, with a protocol analyser, I able to “see” PME message from my device to the host.
The host only “ack” thoses messages, but don’t react at all.
I checked device’s PMC and PMCSR regsiters, they are correct (according to PCIe 2.0 and PM-PCI 2.2).
There are registers in the root port …
…
You can check to see if this GPE appears to be enabled,
and if the BIOS appears to contain support for it.
This is a valuable advice, thanks, I’ll try it ASAP !
But it seem a bit “rough”, is there a mean to know how vista handle PME# and if it detect this capability for the device ?
Like MSI, is there a registry key, I should add in the “inf” file to inform vista this capability ?
Regards
Benedict
Benedict,
If Vista or XP detected that PME wasn’t supported for your device, your IRP_MN_WAIT_WAKE IRP would be immediately completed with an error status code. If it is pended properly in the OS, we believe PME is supported by both your device and the system. That leaves problems in the “implemented improperly” category, which is why investigating will be a little rough.
Dave
Hi Dave,
PCIe PME messages are sent upstream to the root port, where they are trapped.
There are registers in the root port (…) that indicate that a PME was
received and the bus/device/function of the sending device.
I think you talk about Root Status Register in PCI Express Capability Structure.
Thank to PCI-SIG PCI Express Capability Structure is located in first 256 Bytes.
So I’m able to visualise it with a common tool like pciview.
Sadly, this register if alway set to 0. I guess it is due to the fact my device
does not wakeup the system and I must wake system with another device (keyboard).
Now, I’d like to dump my device’s root port config space in my device driver,
while system wakeup (and hope to see some usefull info).
The only way I know, is to send a IRP_MN_READ_CONFIG IRP to the PCI bus
driver, but I need parent’s device PDO (it is easy to get device’s PDO). I
don’t know how to get it :o(
Any clue ?
If it did, then you could try to look in the ICH7 manual to find the registers
that describe how this PME gets routed to an ACPI GPE. You can check to see if
this GPE appears to be enabled, and if the BIOS appears to contain support for it.
As far as I know, this is the operating system task to handle those registers,
I’m very surprised that no tool exist to dump them.
I did not look at ICH7 manual yet but, Again, when I will get thoses registers names
(and maybe offset), I don’t know how to read them :
- are they located in config space ?
- are they memory mapped ?
- which address ?
- does the system lock their access ?
- etc ?
Again do you have any clue to do this ?
Thanks
Benedict