My client has two varieties of boards, one with a single device that
connects directly to the PCIe slot connector, and another with two devices
that uses a PLX PCIe switch between the devices and the PCIe slot connector.
The problem has been observed on both versions of the board. I happen to be
testing on a two chip version of the board.
So, to answer your question, for the single chip version of the board, the
chip itself would be the only device behind the PCIe root port connected to
the slot into which the board is inserted, and for the dual chip version of
the board, each chip is the only device behind each of the downstream ports
of the PLX PCIe switch.
I don’t personally have a PCIe bus analyze, which is why I haven’t (yet)
posted a log. My client, however, is going to capture one with theirs, and
hopefully I can then post a log. At this point I’m still waiting to get a
log from them. However, what I do have at this point is the log of debug
output from the checked build of pci.sys.
Here is an edited debug log with all the entries relevant to the two devices
in my system:
// This is before sleeping
00000031 0.00099816 PCI: PDO(b=0x3, d=0x0, f=0x0)<-QUERY_POWER
00000033 0.00100412 PCI: PDO(b=0x4, d=0x0, f=0x0)<-QUERY_POWER
00000133 0.00537817 PCI: PDO(b=0x3, d=0x0, f=0x0)<-SET_POWER
00000135 0.00539108 PCI: PDO(b=0x4, d=0x0, f=0x0)<-SET_POWER
// These reads are actually the driver capturing the PCI config space in
EvtDeviceD0Exit
00000139 0.00545862 PCI: External Config Read
00000140 0.00546292 PCI: Config Read - (3,0,0) offset 0 length
100 buffer FFFFF88000E81440
00000141 0.00557449 PCI: PDO(b=0x3, d=0x0, f=0x0)<-SET_POWER
00000157 0.00579928 PCI: External Config Read
00000158 0.00580259 PCI: Config Read - (4,0,0) offset 0 length
100 buffer FFFFF88000E81440
00000159 0.00590853 PCI: PDO(b=0x4, d=0x0, f=0x0)<-SET_POWER
// This is after the system wakes
00001666 34.98833466 PCI: PDO(b=0x3, d=0x0, f=0x0)<-SET_POWER
00001668 34.98833847 PCI: PDO(b=0x4, d=0x0, f=0x0)<-SET_POWER
00001707 34.98848343 PCI: PDO(b=0x3, d=0x0, f=0x0)<-SET_POWER
00001709 34.98848724 PCI: Config Read - (3,0,0) offset 0 length 2
buffer FFFFF880009E88A0
00001711 34.98849106 PCI: Config Read - (3,0,0) offset 2 length 2
buffer FFFFF880009E88A2
00001713 34.98850250 PCI: Config Read - (3,0,0) offset 8 length 1
buffer FFFFF880009E88A4
00001715 34.98850632 PCI: Config Read - (3,0,0) offset 9 length 1
buffer FFFFF880009E88A5
00001716 34.98851013 PCI: PDO(b=0x4, d=0x0, f=0x0)<-SET_POWER
00001718 34.98851013 PCI: Config Read - (3,0,0) offset a length 1
buffer FFFFF880009E88A6
00001719 34.98851013 PCI: Config Read - (4,0,0) offset 0 length 2
buffer FFFFF88003CE28A0
00001721 34.98851395 PCI: Config Read - (3,0,0) offset b length 1
buffer FFFFF880009E88A7
00001722 34.98851776 PCI: Config Read - (4,0,0) offset 2 length 2
buffer FFFFF88003CE28A2
00001724 34.98851776 PCI: Config Read - (3,0,0) offset e length 1
buffer FFFFF880009E88AC
00001725 34.98851776 PCI: Config Read - (4,0,0) offset 8 length 1
buffer FFFFF88003CE28A4
00001728 34.98852539 PCI: Config Read - (4,0,0) offset 9 length 1
buffer FFFFF88003CE28A5
00001730 34.98852921 PCI: Config Read - (4,0,0) offset a length 1
buffer FFFFF88003CE28A6
00001732 34.98853683 PCI: Config Read - (4,0,0) offset b length 1
buffer FFFFF88003CE28A7
00001734 34.98854446 PCI: Config Read - (4,0,0) offset e length 1
buffer FFFFF88003CE28AC
00001875 35.13643265 PCI: Config Read - (3,0,0) offset 0 length 2
buffer FFFFF880031CB578
00001877 35.13643646 PCI: Config Read - (3,0,0) offset 0 length 2
buffer FFFFF880031CB588
00001878 35.13644409 PCI: Config Read - (3,0,0) offset 2 length 2
buffer FFFFF880031CB58A
00001879 35.13645172 PCI: Config Read - (3,0,0) offset 8 length 1
buffer FFFFF880031CB58C
00001880 35.13645554 PCI: Config Read - (3,0,0) offset 9 length 1
buffer FFFFF880031CB58D
00001881 35.13645935 PCI: Config Read - (3,0,0) offset a length 1
buffer FFFFF880031CB58E
00001882 35.13646698 PCI: Config Read - (3,0,0) offset b length 1
buffer FFFFF880031CB58F
00001883 35.13647079 PCI: Config Read - (3,0,0) offset e length 1
buffer FFFFF880031CB594
00001884 35.13647842 PCI: Config Read - (3,0,0) offset 2c length
2 buffer FFFFF880031CB590
00001885 35.13648224 PCI: Config Read - (3,0,0) offset 2e length
2 buffer FFFFF880031CB592
00001929 35.13666153 PCI: PDO(b=0x3, d=0x0,
f=0x0)<-QUERY_DEVICE_RELATIONS
00001936 35.13668442 PCI: Config Read - (4,0,0) offset 0 length 2
buffer FFFFF880031CB578
00001938 35.13669205 PCI: Config Read - (4,0,0) offset 0 length 2
buffer FFFFF880031CB588
00001939 35.13669586 PCI: Config Read - (4,0,0) offset 2 length 2
buffer FFFFF880031CB58A
00001940 35.13670349 PCI: Config Read - (4,0,0) offset 8 length 1
buffer FFFFF880031CB58C
00001941 35.13670731 PCI: Config Read - (4,0,0) offset 9 length 1
buffer FFFFF880031CB58D
00001942 35.13671112 PCI: Config Read - (4,0,0) offset a length 1
buffer FFFFF880031CB58E
00001943 35.13671494 PCI: Config Read - (4,0,0) offset b length 1
buffer FFFFF880031CB58F
00001944 35.13671875 PCI: Config Read - (4,0,0) offset e length 1
buffer FFFFF880031CB594
00001945 35.13672638 PCI: Config Read - (4,0,0) offset 2c length
2 buffer FFFFF880031CB590
00001946 35.13673019 PCI: Config Read - (4,0,0) offset 2e length
2 buffer FFFFF880031CB592
00001990 35.13692856 PCI: PDO(b=0x4, d=0x0,
f=0x0)<-QUERY_DEVICE_RELATIONS
// These writes are actually the driver restoring the PCI config space in
EvtDeviceD0Entry (this is my workaround)
00001992 35.99947357 PCI: External Config Write
00001993 35.99948120 PCI: Config Write - (3,0,0) offset 0 length
100 buffer FFFFF88000E81440
00001994 35.99949265 PCI: External Config Write
00001995 35.99958038 PCI: Config Write - (4,0,0) offset 0 length
100 buffer FFFFF88000E81440
Note that other than my driver reading the PCI config space, there are no
other reads of PCI config space by pci.sys prior to the system sleeping.
The same is true if the driver is uninstalled, so it’s not like it’s simply
caching the data that was read by my driver. The PCI config state is thus
not being saved by pci.sys when going from D0->D3.
Upon awakening, pci.sys reads a number of fields from the PCI config space
for each device, but does not perform any writes to restore their PCI config
state. The only writes are those done by my driver in EvtDeviceDoEntry where
the driver actually restores the PCI config state as a workaround to the
fact that it’s not getting restored by pci.sys.
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:bounce-530010-
xxxxx@lists.osr.com] On Behalf Of xxxxx@osr.com
Sent: Thursday, March 28, 2013 8:04 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] PCI config space uninitialized after resuming from S3
The failing device isn’t the only one behind a given bridge, is it? Just
checking.
I’ve asked this before, but since we’re grasping at straws I’ll ask it
again.
What, exactly, do you see on the PCIe bus trace for your device? What
accesses are performed on your device around the power state transitions?
What do you see at the D0->D3 transition? What do you see on the D3->D0
transition?
Specifically… do you see the state of the device being saved on D0->D3?
Do you see the VID/DID being read on D3->D0, and coming back correctly?
Do you see any additional accesses on D3->D0?
Note that Mr. Guan – who I know to be a very clever engineer with an
excellent hardware background – has asked you to post the analyzer log
someplace so he (and whoever else may have time) can take a look. You
might want to do that (or at least acknowledge his offer).
It *really* seems to me that you could discern a lot from the analyzer
log…
Peter
OSR
NTDEV is sponsored by OSR
OSR is HIRING!! See http://www.osr.com/careers
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer