31st article:!pci of WINDBG

Source: Internet
Author: User

Just looking at the WinDbg in the hardware debugging of what the extended command, let me recall a job in the actual transaction.


In the development process of XHCI usb3.0/3.1 IP project, we need to obtain the PCIe configuration space information similar to the actual product for the comparison reference.

At the time, the XHCI host controller for similar products was connected to the SOC system through a PCIe port, and the bare metal code of the arm SOC was written to read the PCIe configuration space for each production port.


Now found, WinDbg in kernel mode (dual machine and local) support with PCI, PCIe command:! Pci! PCItree.

With this command, you can quickly and easily read the configuration space information of the Pci/pcie EP device on the x86/x64 system.

For specific command parameters, please refer to WinDbg help.


Here is a list of the configuration space information for the two XHCI controllers on my lab platform:

0:kd>!pcitree
Bus 0x0 (FDO Ext fffffa8006bc97e0)
(D=0, f=0) 80860150 devext 0xfffffa8006bc39d0 devstack 0xfffffa8006bc3880 0600 bridge/host to PCI
(d=2, f=0) 80860162 devext 0xfffffa8006bc21b0 devstack 0xfffffa8006bc2060 0300 Display CONTROLLER/VGA
(d=14, f=0) 80861e31 devext 0xfffffa8006bc29d0 devstack 0xfffffa8006bc2880 0c03 Serial Bus Controller/usb
(D=16, f=0) 80861e3a devext 0xfffffa8006bc11b0 devstack 0xfffffa8006bc1060 0780 simple Serial Communications controller/' Other '
(d=19, f=0) 80861503 devext 0xfffffa8006bc19d0 devstack 0xfffffa8006bc1880 0200 Network controller/ethernet
(D=1A, f=0) 80861e2d devext 0xfffffa8006bb01b0 devstack 0xfffffa8006bb0060 0c03 Serial Bus Controller/usb
(d=1b, f=0) 80861e20 devext 0xfffffa8006bb09d0 devstack 0xfffffa8006bb0880 0403 multimedia Device/unknown Sub Class
(d=1c, f=0) 80861e10 devext 0xfffffa8006bf11b0 devstack 0xfffffa8006bf1060 0604 BRIDGE/PCI to PCI
Bus 0x1 (FDO Ext fffffa8006beb190)
(D=0, f=0) 19120015 devext 0xfffffa8006be11b0 devstack 0xfffffa8006be1060 0c03 Serial Bus Controller/usb
(d=1c, f=7) 80861e1e devext 0xfffffa8006bf19d0 devstack 0xfffffa8006bf1880 0604 BRIDGE/PCI to PCI
Bus 0x2 (FDO Ext fffffa8006beb830)
(D=0, f=0) 12838892 devext 0xfffffa8006bbd1b0 devstack 0xfffffa8006bbd060 0604 BRIDGE/PCI to PCI
Bus 0x3 (FDO Ext fffffa8006bbdce0)
No devices has been enumerated on this bus.
(d=1d, f=0) 80861e26 devext 0xfffffa8006bf01b0 devstack 0xfffffa8006bf0060 0c03 Serial Bus Controller/usb
(d=1f, f=0) 80861e44 devext 0xfffffa8006bf09d0 devstack 0xfffffa8006bf0880 0601 Bridge/pci to ISA
(d=1f, f=2) 80861e02 devext 0xfffffa8006bef1b0 devstack 0xfffffa8006bef060 0106 Mass Storage controller/unknown Sub Class
(d=1f, f=3) 80861e22 devext 0xfffffa8006bef9d0 devstack 0xfffffa8006bef880 0c05 Serial Bus controller/unknown Sub Class
Total PCI Root Busses processed = 1
Total PCI segments processed = 1


0:kd>!pci 0x101 0 0x14 0


PCI Configuration Space (segment:0000 bus:00 device:14 function:00)
Common Header:
00:vendorid 8086 Intel Corporation
02:deviceid 1e31
04:command 0406 Memspaceen businitiate Interruptdis
06:status 0290 caplist fb2bcapable devseltiming:1
08:revisionid 04
09:progif 30
0a:subclass 03
0b:baseclass 0c
0c:cachelinesize 0000
0d:latencytimer 00
0e:headertype 00
0f:bist 00
10:bar0 f7d20004
14:bar1 00000000
18:bar2 00000000
1c:bar3 00000000
20:BAR4 00000000
24:bar5 00000000
28:cbcisptr 00000000
2c:subsysvenid 8086
2e:subsysid 2030
30:rombar 00000000
34:capptr 70
3c:intline 00
3d:intpin 01
3e:mingnt 00
3f:maxlat 00
Device Private:
40:800E07FD 8003c239 00000000 00000000
50:00000017 00000000 00000000 00000000
60:00002030 00000000 00000000 00000000
70:c1c28001 00000008 00000000 00000000
80:00b70005 fee0f00c 00000000 000049b8
90:00000000 00000000 00000000 00000000
A0:00000000 00000000 00000000 00000000
B0:0000008f 00000000 00000000 00000000
C0:00000C03 00000000 00000000 00000000
d0:0000000f 0000000f 0000000f 0000000f
E0:00000000 00000000 00000000 00000000
F0:00000000 00000000 08040f87 00000000
Capabilities:
70:capid Pwrmgmt Capability
71:NEXTPTR 80
72:pwrmgmtcap c1c2 pmed3hot pmed3cold version=2
74:pwrmgmtctrl 0008 datascale:0 datasel:0 D0


80:capid MSI Capability
81:nextptr 00
82:msgctrl 64BitCapable msienable multiplemsgenable:3 (0x8) multiplemsgcapable:3 (0x8)
84:msgaddr fee0f00c
88:msgaddrhi 0
8c:msdata 49b8



0:kd>!pci 0x100 1 0x0 0


PCI Configuration Space (segment:0000 bus:01 device:00 function:00)
Common Header:
00:vendorid 1912 Renesas Electronics Corp.
02:deviceid 0015
04:command 0406 Memspaceen businitiate Interruptdis
06:status 0010 Caplist
08:revisionid 02
09:progif 30
0a:subclass 03
0b:baseclass 0c
0c:cachelinesize 0010 burstdisabled
0d:latencytimer 00
0e:headertype 00
0f:bist 00
10:bar0 f7c00004
14:bar1 00000000
18:bar2 00000000
1c:bar3 00000000
20:BAR4 00000000
24:bar5 00000000
28:cbcisptr 00000000
2c:subsysvenid 0000
2e:subsysid 0000
30:rombar 00000000
34:CAPPTR 50
3c:intline 00
3d:intpin 01
3e:mingnt 00
3f:maxlat 00
Device Private:
40:00000000 00000000 00000000 00000000
50:c9c37001 00000008 00000000 00000000
60:00002030 00000000 00000000 00201809
70:00869005 00000000 00000000 00000000
80:00000000 00000000 00000000 00000000
90:8007a011 00001000 00001080 00000000
a0:00020010 00008fc0 00102000 0007EC12
B0:10120043 00000000 00000000 00000000
c0:00000000 00000810 00000000 00000000
D0:00000002 00000000 00000000 00000000
e0:00000000 00030000 05010000 00c22210
f0:00000500 80000000 00000000 00000000
Capabilities:
50:capid Pwrmgmt Capability
51:nextptr 70
52:pwrmgmtcap c9c3 PMED0 pmed3hot pmed3cold version=3
54:pwrmgmtctrl 0008 datascale:0 datasel:0 D0


70:capid MSI Capability
71:NEXTPTR 90
72:msgctrl 64BitCapable multiplemsgenable:0 (0x1) Multiplemsgcapable:3 (0x8)
74:MSGADDR 0
78:msgaddrhi 0
7c:msdata 0


90:capid Msi-x Capability
91:nextptr A0
92:msgctrl tablesize:0x007 funcmask:0 Msixenable:1
94:msixtable 00001000 (bir:0 offset:0x1000)
98:pbatable 00001080 (bir:0 offset:0x1080)


A0:capid PCI Express Capability
a1:nextptr 00
A2:express Caps 0002 (ver. 2) type:endpoint
A4:device Caps 00008fc0
A8:device Control mrr:512 NS ap pf et mp:128 ro ur fe nf CE
Aa:device Status 0010 tp AP ur fe nf CE
Ac:link Caps 0007EC12
B0:link Control 0043 es CC RL ld rcb:64 ASPM:L0S&L1
B2:link Status 1012 SCC Lt LTE nlw:x1 ls:2.5
C4:DEVICECAPS2 00000810 ctr:0 Ctdis arifwd AOR aoc32 aoc64 cas128 Noro LTR tph:0 obff:0 extfmt EETLP eetlpmax:0
c8:devicecontrol2 0000 ctval:0 Ctdis ARIFWD AOR aoeb idoreq idocom ltr obff:0 EETLP


Enhanced capabilities:
100:capid 0001 Advanced Error Reporting Capability
Version 1
Nextptr 150
104:uncorrectableerrorstatus 00000000 Dlpe sde PTLP FCPE ct ca mtlp ecrc ur acsv uie mcbtlp AEB TPB
108:uncorrectableerrormask 00000000 Dlpe sde PTLP FCPE ct ca mtlp ecrc ur acsv uie mcbtlp AEB TPB
10c:uncorrectableerrorseverity 00062030 dlpe SDE PTLP FCPE ct ca mtlp ecrc ur acsv uie mcbtlp AEB TPB
110:correctableerrorstatus 00000000 Re BTLP BDLLP RnR RTT anfe CIE Hlo
114:correctableerrormask 00002000 re BTLP BDLLP RnR RTT anfe CIE Hlo
118:capabilitiesandcontrol 00000000 firsterr:0 ecrcgcap ecrcgen ecrcccap ecrccen mhrcap mhren TPLP


150:capid 0018 Latency Tolerance Reporting (LTR) Capability
Version 1
Nextptr 000
Latency 00000000 maxsnoopvalue:0 maxsnoopscale:0 maxnosnoopvalue:0 maxnosnoopscale:0

31st article:!pci of WINDBG

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.