Debugging Tools for Windows |
!pci扩展命令用来显示PCI(peripheral component interconnect)总线的当前状态,以及附加到该总线上的任何设备。
Windows 2000 | Kext.dll Kdextx86.dll |
Windows XP和之后 | Kext.dll |
该扩展命令只能对x86目标机使用。
使用!ecb、!ecd、或者!ecw来编辑PCI配置空间(PCI configuration space)。
下面的例子显示了所有总线和它们的设备的列表。该命令需要较长时间来执行。调试器扫描目标系统的PCI总线时,在显示的信息底部可以看到移动的计数器:
PCI Bus 0
00:0 8086:1237.02 Cmd[0106:.mb..s] Sts[2280:.....] Device Host bridge
0d:0 8086:7000.01 Cmd[0007:imb...] Sts[0280:.....] Device ISA bridge
0d:1 8086:7010.00 Cmd[0005:i.b...] Sts[0280:.....] Device IDE controller
0e:0 1011:0021.02 Cmd[0107:imb..s] Sts[0280:.....] PciBridge 0->1-1 PCI-PCI bridge
10:0 102b:0519.01 Cmd[0083:im....] Sts[0280:.....] Device VGA compatible controller
PCI Bus 1
08:0 10b7:9050.00 Cmd[0107:imb..s] Sts[0200:.....] Device Ethernet
09:0 9004:8178.00 Cmd[0117:imb..s] Sts[0280:.....] Device SCSI controller
下面的例子显示primary bus 上设备的详细信息。每行开头的两位数字是设备号(device number),后面跟的一位数字是功能号(function number):
PCI Bus 0
00:0 8086:1237.02 Cmd[0106:.mb..s] Sts[2280:.....] Device Host bridge
cf8:80000000 IntPin:0 IntLine:0 Rom:0 cis:0 cap:0
0d:0 8086:7000.01 Cmd[0007:imb...] Sts[0280:.....] Device ISA bridge
cf8:80006800 IntPin:0 IntLine:0 Rom:0 cis:0 cap:0
0d:1 8086:7010.00 Cmd[0005:i.b...] Sts[0280:.....] Device IDE controller
cf8:80006900 IntPin:0 IntLine:0 Rom:0 cis:0 cap:0
IO[4]:fff1
0e:0 1011:0021.02 Cmd[0107:imb..s] Sts[0280:.....] PciBridge 0->1-1 PCI-PCI bridge
cf8:80007000 IntPin:0 IntLine:0 Rom:0 cap:0 2sts:2280 BCtrl:6 ISA
IO:f000-ffff Mem:fc000000-fdffffff PMem:fff00000-fffff
10:0 102b:0519.01 Cmd[0083:im....] Sts[0280:.....] Device VGA compatible controller
cf8:80008000 IntPin:1 IntLine:9 Rom:80000000 cis:0 cap:0
MEM[0]:fe800000 MPF[1]:fe000008
下面的例子显示bus 0,设备0x0D,功能0x01的更详细一些的信息,包括从地址0x00到0x3F之间的原始DWORD值:
PCI Bus 0
0d:1 8086:7010.00 Cmd[0005:i.b...] Sts[0280:.....] Device IDE controller
cf8:80006900 IntPin:0 IntLine:0 Rom:0 cis:0 cap:0
IO[4]:fff1
00000000: 70108086 02800005 01018000 00002000
00000010: 00000000 00000000 00000000 00000000
00000020: 0000fff1 00000000 00000000 00000000
00000030: 00000000 00000000 00000000 00000000
下面的例子显示segment 1、bus 0、device 1的配置空间:
PCI Configuration Space (Segment:0001 Bus:00 Device:01 Function:00)
Common Header:
00: VendorID 14e4 Broadcom Corporation
02: DeviceID 16c7
04: Command 0146 MemSpaceEn BusInitiate PERREn SERREn
06: Status 02b0 CapList 66MHzCapable FB2BCapable DEVSELTiming:1
.
.
.
5a: MsgCtrl 64BitCapable MultipleMsgEnable:0 (0x1) MultipleMsgCapable:3 (0x8)
5c: MsgAddr 2d4bff00
60: MsgAddrHi 1ae09097
64: MsData 9891
使用命令!pci 602 ffff ff来显示有效节(valid segments)上的所有设备(devices )和总线(buses ):
Scanning the following PCI segments: 0 0x1
PCI Segment 0 Bus 0
01:0 14e4:16c7.10 Cmd[0146:.mb.ps] Sts[02b0:c6...] Ethernet Controller SubID:103c:1321
02:0 1000:0030.08 Cmd[0147:imb.ps] Sts[0230:c6...] LSI SCSI Controller SubID:103c:1323
02:1 1000:0030.08 Cmd[0147:imb.ps] Sts[0230:c6...] LSI SCSI Controller SubID:103c:1323
03:0 1000:0030.08 Cmd[0147:imb.ps] Sts[0230:c6...] LSI SCSI Controller SubID:103c:1323
03:1 1000:0030.08 Cmd[0147:imb.ps] Sts[0230:c6...] LSI SCSI Controller SubID:103c:1323
PCI Segment 0 Bus 0x38
01:0 14e4:1644.12 Cmd[0146:.mb.ps] Sts[02b0:c6...] Ethernet Controller SubID:10b7:1000
PCI Segment 0 Bus 0x54
00:0 103c:403b.00 Cmd[0547:imb.ps] Sts[0010:c....] HP PCI-PCI Bridge 0x54->0x55-0x55
PCI Segment 0 Bus 0x70
00:0 103c:403b.00 Cmd[0547:imb.ps] Sts[0010:c....] HP PCI-PCI Bridge 0x70->0x71-0x71
PCI Segment 0 Bus 0xa9
01:0 8086:b154.00 Cmd[0147:imb.ps] Sts[0ab0:c6.A.] Intel PCI-PCI Bridge 0xa9->0xaa-0xaa
PCI Segment 0 Bus 0xaa
04:0 1033:0035.41 Cmd[0146:.mb.ps] Sts[0210:c....] NEC USB Controller SubID:103c:1293
04:1 1033:0035.41 Cmd[0146:.mb.ps] Sts[0210:c....] NEC USB Controller SubID:103c:aa55
04:2 1033:00e0.02 Cmd[0146:.mb.ps] Sts[0210:c....] NEC USB2 Controller SubID:103c:aa55
05:0 1002:5159.00 Cmd[0187:imb..s] Sts[0290:c....] ATI VGA Compatible Controller SubID:103c:1292
PCI Segment 0 Bus 0xc6
00:0 103c:403b.00 Cmd[0547:imb.ps] Sts[0010:c....] HP PCI-PCI Bridge 0xc6->0xc7-0xc7
PCI Segment 0 Bus 0xe3
00:0 103c:403b.00 Cmd[0547:imb.ps] Sts[0010:c....] HP PCI-PCI Bridge 0xe3->0xe4-0xe4
PCI Segment 0x1 Bus 0
01:0 14e4:16c7.10 Cmd[0146:.mb.ps] Sts[02b0:c6...] Ethernet Controller SubID:103c:1321
02:0 1000:0030.08 Cmd[0147:imb.ps] Sts[0230:c6...] LSI SCSI Controller SubID:103c:1323
02:1 1000:0030.08 Cmd[0147:imb.ps] Sts[0230:c6...] LSI SCSI Controller SubID:103c:1323
03:0 1000:0030.08 Cmd[0147:imb.ps] Sts[0230:c6...] LSI SCSI Controller SubID:103c:1323
03:1 1000:0030.08 Cmd[0147:imb.ps] Sts[0230:c6...] LSI SCSI Controller SubID:103c:1323
PCI Segment 0x1 Bus 0x54
00:0 103c:403b.00 Cmd[0547:imb.ps] Sts[0010:c....] HP PCI-PCI Bridge 0x54->0x55-0x55
PCI Segment 0x1 Bus 0x55
00:0 8086:10b9.06 Cmd[0147:imb.ps] Sts[0010:c....] Intel Ethernet Controller SubID:8086:1083
PCI Segment 0x1 Bus 0x70
00:0 103c:403b.00 Cmd[0547:imb.ps] Sts[0010:c....] HP PCI-PCI Bridge 0x70->0x71-0x71
PCI Segment 0x1 Bus 0xc6
00:0 103c:403b.00 Cmd[0547:imb.ps] Sts[0010:c....] HP PCI-PCI Bridge 0xc6->0xc7-0xc7
PCI Segment 0x1 Bus 0xe3
00:0 103c:403b.00 Cmd[0547:imb.ps] Sts[0010:c....] HP PCI-PCI Bridge 0xe3->0xe4-0xe4
查看Plug and Play调试获得该扩展命令的应用和更多示例。关于PCI总线的信息,查看Windows Driver Kit (WDK)文档。