!pci extensions

Hi,

on my new PC (core i5 sandy bridge) running win 7, Device manager shows the external NVIDIA GPU as attached behind PCI express root port 0 (Device manager reports it as PCI bus 1, device 0, function 0)

Anyway !pci debugging extension does not mention it

lkd> !pci 2 ff
PCI Segment 0 Bus 0
00:0 8086:0104.09 Cmd[0006:.mb…] Sts[2090:c…] Intel Host Bridge SubID:144d:c606
01:0 8086:0101.09 Cmd[0007:imb…] Sts[0010:c…] Intel PCI-PCI Bridge 0->0x1-0x1 <-----
02:0 8086:0126.09 Cmd[0407:imb…] Sts[0090:c…] Intel VGA Compatible Controller SubID:144d:c606
16:0 8086:1c3a.04 Cmd[0006:.mb…] Sts[0010:c…] Intel Other Communications Controller SubID:144d:c606
1a:0 8086:1c2d.04 Cmd[0006:.mb…] Sts[0290:c…] Intel USB2 Controller SubID:144d:c606
1b:0 8086:1c20.04 Cmd[0006:.mb…] Sts[0010:c…] Intel Class:4:3:0 SubID:144d:c606
1c:0 8086:1c10.b4 Cmd[0006:.mb…] Sts[0010:c…] Intel PCI-PCI Bridge 0->0x2-0x2
1c:3 8086:1c16.b4 Cmd[0007:imb…] Sts[0010:c…] Intel PCI-PCI Bridge 0->0x3-0x3
1d:0 8086:1c26.04 Cmd[0006:.mb…] Sts[0290:c…] Intel USB2 Controller SubID:144d:c606
1f:0 8086:1c49.04 Cmd[0007:imb…] Sts[0210:c…] Intel ISA Bridge SubID:144d:c606
1f:2 8086:1c03.04 Cmd[0007:imb…] Sts[02b0:c6…] Intel Class:1:6:1 SubID:144d:c606
1f:3 8086:1c22.04 Cmd[0003:im…] Sts[0280:…] Intel SMBus Controller SubID:144d:c606
PCI Segment 0 Bus 0x2
00:0 8086:08ae.00 Cmd[0006:.mb…] Sts[0010:c…] Intel Other Network Controller SubID:8086:1005
PCI Segment 0 Bus 0x3
00:0 10ec:8168.06 Cmd[0407:imb…] Sts[0010:c…] Realtek Ethernet Controller SubID:144d:c606
1f

Here you can see the virtual PCI-PCI bridge in the root complex (PCI Express root port on-die) but you cannot see any NVIDIA video nor reference to bus 1…

Why ? thanks

try doing dl on the list or try using !pcitree extension

though if you try doing !devext pci as written in docs you may
encounter lot of unknown type refernces in pci.pdb it seems this
devext was tested with full pdb internally and doesnt work with public
symbols

you may need to add these type infos back to pci.pdb for the !devext to work

pci!_PCI_PDO_EXTENSION
pci!PCI_SECONDARY_EXTENSION
pci!PCI_FUNCTION_RESOURCES
pci!PCI_HEADER_TYPE_DEPENDENT
pci!PCI_POWER_STATE
pci!_PCI_DEVICE

lkd> dl pci!PciFdoExtensionListHead
f7534db4 86de9be0 00000000 00000000 00000000
86de9be0 86d1b0d8 69635031 f75349d0 00000101
86d1b0d8 86d1bf10 69635031 f75349d0 00000101
86d1bf10 00000000 69635031 f75349d0 00000101
lkd> !pcitree
Bus 0x0 (FDO Ext 86de9be0)
0600 2a008086 (d=0, f=0) devext 86dabf08 Bridge/HOST to PCI
0300 2a028086 (d=2, f=0) devext 86dabd28 Display Controller/VGA
0380 2a038086 (d=2, f=1) devext 86dabb48 Display Controller/‘Other’
0403 284b8086 (d=1b, f=0) devext 86dab810 Multimedia Device/Unknown Sub Class
0604 283f8086 (d=1c, f=0) devext 86dab4d8 Bridge/PCI to PCI
Bus 0x1 (FDO Ext 86d1b0d8)
0200 001c168c (d=0, f=0) devext 86d1b8e8 Network Controller/Ethernet
0c03 28308086 (d=1d, f=0) devext 86de2db0 Serial Bus Controller/USB
0c03 28318086 (d=1d, f=1) devext 86de2a78 Serial Bus Controller/USB
0c03 28328086 (d=1d, f=2) devext 86de2740 Serial Bus Controller/USB
0c03 28368086 (d=1d, f=7) devext 86de2408 Serial Bus Controller/USB
0604 24488086 (d=1e, f=0) devext 86d1cd28 Bridge/PCI to PCI
Bus 0x2 (FDO Ext 86d1bf10)
0200 813910ec (d=1, f=0) devext 86d1bd40 Network Controller/Ethernet
0601 28158086 (d=1f, f=0) devext 86d990e8 Bridge/PCI to ISA
0101 28288086 (d=1f, f=2) devext 86d99f08 Mass Storage Controller/IDE
0c05 283e8086 (d=1f, f=3) devext 86d99d28 Serial Bus
Controller/Unknown Sub Class
Total PCI Root busses processed = 1

On 1/7/13, xxxxx@alice.it wrote:
> Hi,
>
> on my new PC (core i5 sandy bridge) running win 7, Device manager shows the
> external NVIDIA GPU as attached behind PCI express root port 0 (Device
> manager reports it as PCI bus 1, device 0, function 0)
>
> Anyway !pci debugging extension does not mention it
>
> lkd> !pci 2 ff
> PCI Segment 0 Bus 0
> 00:0 8086:0104.09 Cmd[0006:.mb…] Sts[2090:c…] Intel Host Bridge
> SubID:144d:c606
> 01:0 8086:0101.09 Cmd[0007:imb…] Sts[0010:c…] Intel PCI-PCI Bridge
> 0->0x1-0x1 <-----
> 02:0 8086:0126.09 Cmd[0407:imb…] Sts[0090:c…] Intel VGA Compatible
> Controller SubID:144d:c606
> 16:0 8086:1c3a.04 Cmd[0006:.mb…] Sts[0010:c…] Intel Other
> Communications Controller SubID:144d:c606
> 1a:0 8086:1c2d.04 Cmd[0006:.mb…] Sts[0290:c…] Intel USB2 Controller
> SubID:144d:c606
> 1b:0 8086:1c20.04 Cmd[0006:.mb…] Sts[0010:c…] Intel Class:4:3:0
> SubID:144d:c606
> 1c:0 8086:1c10.b4 Cmd[0006:.mb…] Sts[0010:c…] Intel PCI-PCI Bridge
> 0->0x2-0x2
> 1c:3 8086:1c16.b4 Cmd[0007:imb…] Sts[0010:c…] Intel PCI-PCI Bridge
> 0->0x3-0x3
> 1d:0 8086:1c26.04 Cmd[0006:.mb…] Sts[0290:c…] Intel USB2 Controller
> SubID:144d:c606
> 1f:0 8086:1c49.04 Cmd[0007:imb…] Sts[0210:c…] Intel ISA Bridge
> SubID:144d:c606
> 1f:2 8086:1c03.04 Cmd[0007:imb…] Sts[02b0:c6…] Intel Class:1:6:1
> SubID:144d:c606
> 1f:3 8086:1c22.04 Cmd[0003:im…] Sts[0280:…] Intel SMBus
> Controller SubID:144d:c606
> PCI Segment 0 Bus 0x2
> 00:0 8086:08ae.00 Cmd[0006:.mb…] Sts[0010:c…] Intel Other Network
> Controller SubID:8086:1005
> PCI Segment 0 Bus 0x3
> 00:0 10ec:8168.06 Cmd[0407:imb…] Sts[0010:c…] Realtek Ethernet
> Controller SubID:144d:c606
> 1f
>
> Here you can see the virtual PCI-PCI bridge in the root complex (PCI Express
> root port on-die) but you cannot see any NVIDIA video nor reference to bus
> 1…
>
> Why ? thanks
>
>
> —
> WINDBG is sponsored by OSR
>
> 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
>

lkd> !pcitree
Bus 0x0 (FDO Ext 853a2dc0)
(d=0, f=0) 80860104 devext 0x85c94c10 devstack 0x85c94b58 0600 Bridge/HOST to PCI
(d=1, f=0) 80860101 devext 0x85c94738 devstack 0x85c94680 0604 Bridge/PCI to PCI
Bus 0x1 (FDO Ext 861e7e78)
(d=0, f=0) 10de1051 devext 0x861e8438 devstack 0x861e8380 0302 Display Controller/Unknown Sub Class
(d=2, f=0) 80860126 devext 0x85c950e8 devstack 0x85c95030 0300 Display Controller/VGA
(d=16, f=0) 80861c3a devext 0x85c95c10 devstack 0x85c95b58 0780 Simple Serial Communications Controller/‘Other’
(d=1a, f=0) 80861c2d devext 0x85c95738 devstack 0x85c95680 0c03 Serial Bus Controller/USB
(d=1b, f=0) 80861c20 devext 0x85c9e0e8 devstack 0x85c9e030 0403 Multimedia Device/Unknown Sub Class
(d=1c, f=0) 80861c10 devext 0x85c9ec10 devstack 0x85c9eb58 0604 Bridge/PCI to PCI
Bus 0x2 (FDO Ext 85ca0938)
(d=0, f=0) 808608ae devext 0x85ca8c10 devstack 0x85ca8b58 0280 Network Controller/‘Other’
(d=1c, f=3) 80861c16 devext 0x85c9e738 devstack 0x85c9e680 0604 Bridge/PCI to PCI
Bus 0x3 (FDO Ext 85ca2b88)
(d=0, f=0) 10ec8168 devext 0x85ca8738 devstack 0x85ca8680 0200 Network Controller/Ethernet
(d=1d, f=0) 80861c26 devext 0x85c9f0e8 devstack 0x85c9f030 0c03 Serial Bus Controller/USB
(d=1f, f=0) 80861c49 devext 0x85c9fc10 devstack 0x85c9fb58 0601 Bridge/PCI to ISA
(d=1f, f=2) 80861c03 devext 0x85c9f738 devstack 0x85c9f680 0106 Mass Storage Controller/Unknown Sub Class
(d=1f, f=3) 80861c22 devext 0x85ca00e8 devstack 0x85ca0030 0c05 Serial Bus Controller/Unknown Sub Class
Total PCI Root busses processed = 1
Total PCI Segments processed = 1

lkd> !devext 0x861e8438 pci
PDO Extension, Bus 0x1, Device 0, Function 0.
DevObj 0x861e8380 Parent FDO DevExt 0x861e7e78
Device State = PciStarted
Vendor ID 10de (NVIDIA CORPORATION) Device ID 1051
Subsystem Vendor ID 0000, Subsystem ID C606
Header Type 0, Class Base/Sub 03/02 (Display Controller/Unknown Sub Class)
Programming Interface: 00, Revision: a1, IntPin: 01, RawLine 10
Possible Decodes ((cmd & 7) = 7): BMI Capabilities: Ptr=60, power msi
Logical Device Power State: D3
Device Wake Level: Unspecified
WaitWakeIrp:
Requirements: Alignment Length Minimum Maximum
BAR0 Mem: 01000000 01000000 0000000000000000 00000000ffffffff
BAR1 Mem: 10000000 10000000 0000000000000000 ffffffffffffffff
BAR3 Mem: 02000000 02000000 0000000000000000 ffffffffffffffff
BAR5 Io: 00000080 00000080 0000000000000000 00000000ffffffff
ROM BAR: 00080000 00080000 0000000000000000 00000000ffffffff
Resources: Start Length
BAR0 Mem: 00000000e0000000 01000000
BAR1 Mem: 00000000b0000000 10000000
BAR3 Mem: 00000000c0000000 02000000
BAR5 Io: 0000000000003000 00000080
Interrupt Requirement:
Line Based - Min Vector = 0x0, Max Vector = 0xffffffff
Message Based: Type - Msi, 0x1 messages requested
Interrupt Resource: Type - Line Based, Interrupt Line = 0x10

Now i can see bus 1 and device attached to it (NVIDIA card)…

But does !devext pci dump the PCI configuration space or internal Windows structures related to it ?

thanks

pci configuration space can be viewed by !pci 100 bus device function

atheros network card on bus 1

PCI Configuration Space (Segment:0000 Bus:01 Device:00 Function:00)
Common Header:
00: VendorID 168c http://www.pcidatabase.com/vendor_details.php?id=174
02: DeviceID 001c
04: Command 0147 IOSpaceEn MemSpaceEn BusInitiate PERREn SERREn
06: Status 0010 CapList
08: RevisionID 01
09: ProgIF 00
0a: SubClass 00 Ethernet Controller
0b: BaseClass 02 Network Controller
0c: CacheLineSize 0008 Burst4DW
0d: LatencyTimer 00
0e: HeaderType 00
0f: BIST 00
10: BAR0 51300004
14: BAR1 00000000
18: BAR2 00000000
1c: BAR3 00000000
20: BAR4 00000000
24: BAR5 00000000
28: CBCISPtr 00005001
2c: SubSysVenID 103c
2e: SubSysID 137b
30: ROMBAR 00000000
34: CapPtr 40
3c: IntLine 10
3d: IntPin 01
3e: MinGnt 00
3f: MaxLat 00
Device Private:
40: 01c25001 00000000 00000000 00000000
50: 00006005 00000000 00000000 00000000
60: 00119010 05040cc0 000a2010 00033c11
70: 10110008 00000000 000003c0 00000000
80: 00000000 00000000 00000000 00000000
90: 00000011 00000000 00000000 00000000
a0: 00000004 00000000 00000000 00000000
b0: 00000000 00000000 00000000 00000000
c0: 00000000 00000000 00000000 00000000
d0: 00000000 00000000 00000000 00000000
e0: 00000000 00000000 00000000 00000000
f0: 00000000 00000000 00000000 00000000
Capabilities:
40: CapID 01 PwrMgmt Capability
41: NextPtr 50
42: PwrMgmtCap 01c2 Version=2
44: PwrMgmtCtrl 0000 DataScale:0 DataSel:0 D0

50: CapID 05 MSI Capability
51: NextPtr 60
52: MsgCtrl MultipleMsgEnable:0 (0x1) MultipleMsgCapable:0 (0x1)
54: MsgAddr 0
58: MsData 0

60: CapID 10 PCI Express Capability
61: NextPtr 90
62: Express Caps 0011 Type:LegacyEP
64: Device Caps 05040cc0
68: Device Control 2010 MRR:512 ns ap pf et MP:128 RO ur fe nf ce
6a: Device Status 000a tp ap UR fe NF ce
6c: Link Caps 00033c11
70: Link Control 0008 es cc rl ld RCB:128 ASPM:None
72: Link Status 1011 SCC lt lte NLW:x1 LS:2.5

90: CapID 11 MSI-X Capability
91: NextPtr 00
92: MsgCtrl TableSize:0x000 FuncMask:0 MSIXEnable:0
94: MSIXTable 00000000 ( BIR:0 Offset:0x0 )
98: PBATable 00000000 ( BIR:0 Offset:0x0 )

On 1/10/13, xxxxx@alice.it wrote:
> lkd> !pcitree
> Bus 0x0 (FDO Ext 853a2dc0)
> (d=0, f=0) 80860104 devext 0x85c94c10 devstack 0x85c94b58 0600
> Bridge/HOST to PCI
> (d=1, f=0) 80860101 devext 0x85c94738 devstack 0x85c94680 0604 Bridge/PCI
> to PCI
> Bus 0x1 (FDO Ext 861e7e78)
> (d=0, f=0) 10de1051 devext 0x861e8438 devstack 0x861e8380 0302 Display
> Controller/Unknown Sub Class
> (d=2, f=0) 80860126 devext 0x85c950e8 devstack 0x85c95030 0300 Display
> Controller/VGA
> (d=16, f=0) 80861c3a devext 0x85c95c10 devstack 0x85c95b58 0780 Simple
> Serial Communications Controller/‘Other’
> (d=1a, f=0) 80861c2d devext 0x85c95738 devstack 0x85c95680 0c03 Serial Bus
> Controller/USB
> (d=1b, f=0) 80861c20 devext 0x85c9e0e8 devstack 0x85c9e030 0403 Multimedia
> Device/Unknown Sub Class
> (d=1c, f=0) 80861c10 devext 0x85c9ec10 devstack 0x85c9eb58 0604 Bridge/PCI
> to PCI
> Bus 0x2 (FDO Ext 85ca0938)
> (d=0, f=0) 808608ae devext 0x85ca8c10 devstack 0x85ca8b58 0280 Network
> Controller/‘Other’
> (d=1c, f=3) 80861c16 devext 0x85c9e738 devstack 0x85c9e680 0604 Bridge/PCI
> to PCI
> Bus 0x3 (FDO Ext 85ca2b88)
> (d=0, f=0) 10ec8168 devext 0x85ca8738 devstack 0x85ca8680 0200 Network
> Controller/Ethernet
> (d=1d, f=0) 80861c26 devext 0x85c9f0e8 devstack 0x85c9f030 0c03 Serial Bus
> Controller/USB
> (d=1f, f=0) 80861c49 devext 0x85c9fc10 devstack 0x85c9fb58 0601 Bridge/PCI
> to ISA
> (d=1f, f=2) 80861c03 devext 0x85c9f738 devstack 0x85c9f680 0106 Mass
> Storage Controller/Unknown Sub Class
> (d=1f, f=3) 80861c22 devext 0x85ca00e8 devstack 0x85ca0030 0c05 Serial Bus
> Controller/Unknown Sub Class
> Total PCI Root busses processed = 1
> Total PCI Segments processed = 1
>
> lkd> !devext 0x861e8438 pci
> PDO Extension, Bus 0x1, Device 0, Function 0.
> DevObj 0x861e8380 Parent FDO DevExt 0x861e7e78
> Device State = PciStarted
> Vendor ID 10de (NVIDIA CORPORATION) Device ID 1051
> Subsystem Vendor ID 0000, Subsystem ID C606
> Header Type 0, Class Base/Sub 03/02 (Display Controller/Unknown Sub
> Class)
> Programming Interface: 00, Revision: a1, IntPin: 01, RawLine 10
> Possible Decodes ((cmd & 7) = 7): BMI Capabilities: Ptr=60, power msi
> Logical Device Power State: D3
> Device Wake Level: Unspecified
> WaitWakeIrp:
> Requirements: Alignment Length Minimum Maximum
> BAR0 Mem: 01000000 01000000 0000000000000000 00000000ffffffff
> BAR1 Mem: 10000000 10000000 0000000000000000 ffffffffffffffff
> BAR3 Mem: 02000000 02000000 0000000000000000 ffffffffffffffff
> BAR5 Io: 00000080 00000080 0000000000000000 00000000ffffffff
> ROM BAR: 00080000 00080000 0000000000000000 00000000ffffffff
> Resources: Start Length
> BAR0 Mem: 00000000e0000000 01000000
> BAR1 Mem: 00000000b0000000 10000000
> BAR3 Mem: 00000000c0000000 02000000
> BAR5 Io: 0000000000003000 00000080
> Interrupt Requirement:
> Line Based - Min Vector = 0x0, Max Vector = 0xffffffff
> Message Based: Type - Msi, 0x1 messages requested
> Interrupt Resource: Type - Line Based, Interrupt Line = 0x10
>
> Now i can see bus 1 and device attached to it (NVIDIA card)…
>
> But does !devext pci dump the PCI configuration space or internal
> Windows structures related to it ?
>
> thanks
>
>
>
> —
> WINDBG is sponsored by OSR
>
> OSR is hiring!! Info at 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
>

> pci configuration space can be viewed by !pci 100 bus device function

and why I can’t view the PCI compatible configuration space (the first 256 bytes) of the PCI express NVIDIA card ? (bus 1 device 0 function 0 as shown by !pcitree) ?

On 1/10/2013 5:57 AM, xxxxx@alice.it wrote:

But does !devext pci dump the PCI configuration space or internal Windows structures related to it ?

Internal Windows structures.