nt!PiQueryAndAllocateBootResources函数分析和LogConf下BootConfig值的关系
PiQueryAndAllocateBootResources(DeviceNode, logConfKey);
0: kd> kc
#
00 nt!PiQueryAndAllocateBootResources
01 nt!PiProcessNewDeviceNode
02 nt!PipProcessDevNodeTree
03 nt!PipDeviceActionWorker
04 nt!PipRequestDeviceAction
05 nt!IopInitializeBootDrivers
06 nt!IoInitSystem
07 nt!Phase1Initialization
08 nt!PspSystemThreadStartup
09 nt!KiThreadStartup
0: kd> dv
DeviceNode = 0x894ffea8
LogConfKey = 0x800001e8
status = 0n0
if (DeviceNode->BootResources == NULL) {
status = IopQueryDeviceResources(
DeviceNode->PhysicalDeviceObject,
QUERY_RESOURCE_LIST,
&cmResource,
&cmLength);
0: kd> kc
#
00 nt!IopQueryDeviceResources
01 nt!PiQueryAndAllocateBootResources
02 nt!PiProcessNewDeviceNode
03 nt!PipProcessDevNodeTree
04 nt!PipDeviceActionWorker
05 nt!PipRequestDeviceAction
06 nt!IopInitializeBootDrivers
07 nt!IoInitSystem
08 nt!Phase1Initialization
09 nt!PspSystemThreadStartup
0a nt!KiThreadStartup
0: kd> dv
DeviceObject = 0x899050e8 Device for "\Driver\ACPI"
ResourceType = 0
Resource = 0xf789a2cc
Length = 0xf789a2c8
} else {
irpSp.MinorFunction = IRP_MN_QUERY_RESOURCES;
irpSp.MajorFunction = IRP_MJ_PNP;
status = IopSynchronousCall(DeviceObject, &irpSp, (PULONG_PTR)Resource);
if (status == STATUS_NOT_SUPPORTED) {
0: kd> kc
#
00 nt!IopSynchronousCall
01 nt!IopQueryDeviceResources
02 nt!PiQueryAndAllocateBootResources
03 nt!PiProcessNewDeviceNode
04 nt!PipProcessDevNodeTree
05 nt!PipDeviceActionWorker
06 nt!PipRequestDeviceAction
07 nt!IopInitializeBootDrivers
08 nt!IoInitSystem
09 nt!Phase1Initialization
0a nt!PspSystemThreadStartup
0b nt!KiThreadStartup
0: kd> dv
DeviceObject = 0x899050e8 Device for "\Driver\ACPI"
0: kd> kc
#
00 ACPI!ACPIBusIrpQueryResources
01 ACPI!ACPIDispatchIrp
02 nt!IofCallDriver
03 nt!IopSynchronousCall
04 nt!IopQueryDeviceResources
05 nt!PiQueryAndAllocateBootResources
06 nt!PiProcessNewDeviceNode
07 nt!PipProcessDevNodeTree
08 nt!PipDeviceActionWorker
09 nt!PipRequestDeviceAction
0a nt!IopInitializeBootDrivers
0b nt!IoInitSystem
0c nt!Phase1Initialization
0d nt!PspSystemThreadStartup
0e nt!KiThreadStartup
0: kd> dv
DeviceObject = 0x899050e8 Device for "\Driver\ACPI"
Irp = 0x89905220
ioList = 0x00000008
0: kd> t
Breakpoint 67 hit
eax=f789a19c ebx=8990520a ecx=00000008 edx=80a3d105 esi=899c0d58 edi=00000000
eip=f74076b8 esp=f789a15c ebp=f789a1b0 iopl=0 nv up ei pl zr na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000246
ACPI!ACPIGet:
f74076b8 55 push ebp
0: kd> dv
Target = 0x899c0d58
ObjectID = 0x4154535f
Flags = 0x20040802
SimpleArgument = 0x00000000
SimpleArgumentSize = 0
CallBackRoutine = 0x00000000
CallBackContext = 0x00000000
Buffer = 0xf789a19c
BufferSize = 0x00000000
completionRoutine = 0xf74076b8
status = 0n537135106
argument = struct _ObjData
argumentPtr = 0x899c0d58
acpiObject = 0x899c0d58
deviceExtension = 0xf789a1b0
async = 0x00 ''
argumentCount = 0
0: kd> db f789a15c
f789a15c 6b e0 43 f7 58 0d 9c 89-5f 53 54 41 02 08 04 20 k.C.X..._STA...
0: kd> g
Breakpoint 67 hit
eax=f789a1a8 ebx=00000000 ecx=00000000 edx=00400000 esi=899c0d58 edi=00000000
eip=f74076b8 esp=f789a15c ebp=f789a1b0 iopl=0 nv up ei pl zr na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000246
ACPI!ACPIGet:
f74076b8 55 push ebp
0: kd> kc
#
00 ACPI!ACPIGet
01 ACPI!ACPIBusIrpQueryResources
02 ACPI!ACPIDispatchIrp
03 nt!IofCallDriver
04 nt!IopSynchronousCall
05 nt!IopQueryDeviceResources
06 nt!PiQueryAndAllocateBootResources
07 nt!PiProcessNewDeviceNode
08 nt!PipProcessDevNodeTree
09 nt!PipDeviceActionWorker
0a nt!PipRequestDeviceAction
0b nt!IopInitializeBootDrivers
0c nt!IoInitSystem
0d nt!Phase1Initialization
0e nt!PspSystemThreadStartup
0f nt!KiThreadStartup
0: kd> kv
# ChildEBP RetAddr Args to Child
00 f789a158 f743e0cd 899c0d58 5352435f 20010008 ACPI!ACPIGet (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\busdrv\acpi\driver\nt\get.c @ 76]
01 f789a1b0 f740410e 899050e8 89905220 899050e8 ACPI!ACPIBusIrpQueryResources+0xdf (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\busdrv\acpi\driver\nt\bus.c @ 2219]
02 f789a1e4 80a2675c 899050e8 89905220 899052b4 ACPI!ACPIDispatchIrp+0x19e (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\busdrv\acpi\driver\nt\dispatch.c @ 690]
03 f789a200 80c95e00 899050e8 f789a2cc 00000000 nt!IofCallDriver+0x62 (FPO: [Non-Fpo]) (CONV: fastcall) [d:\srv03rtm\base\ntos\io\iomgr\iosubs.c @ 2237]
04 f789a230 80c97fb4 00000000 f789a250 f789a2cc nt!IopSynchronousCall+0x1aa (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpirp.c @ 258]
05 f789a29c 80c90a2f 899050e8 00000000 f789a2cc nt!IopQueryDeviceResources+0xc4 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpirp.c @ 1232]
06 f789a2d0 80c945dc 894ffea8 800001e8 00000001 nt!PiQueryAndAllocateBootResources+0x65 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpenum.c @ 1436]
07 f789a38c 80c94ce9 004ffea8 00000000 00000000 nt!PiProcessNewDeviceNode+0xd5a (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpenum.c @ 2037]
08 f789a5d4 80a2dde9 899c5ac8 00000000 899c4100 nt!PipProcessDevNodeTree+0x15b (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpenum.c @ 4606]
09 f789a618 80a2e161 00000000 00000000 800836b0 nt!PipDeviceActionWorker+0xcd (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpenum.c @ 710]
0a f789a630 80e69358 00000000 00000005 00000000 nt!PipRequestDeviceAction+0x139 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpenum.c @ 598]
0b f789a694 80e655c7 80077000 f789a7dc 00034000 nt!IopInitializeBootDrivers+0x392 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpinit.c @ 1440]
0c f789a838 80e632fd 80077000 00000000 899a1020 nt!IoInitSystem+0x70b (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\iomgr\ioinit.c @ 665]
0d f789adac 80d391f0 80077000 00000000 00000000 nt!Phase1Initialization+0x9b3 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\init\init.c @ 2221]
0e f789addc 80b00d52 80e6294a 80077000 00000000 nt!PspSystemThreadStartup+0x2e (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\ps\create.c @ 2213]
0f 00000000 00000000 00000000 00000000 00000000 nt!KiThreadStartup+0x16 [d:\srv03rtm\base\ntos\ke\i386\threadbg.asm @ 81]
windbg> .open -a ffffffff80c90a2f
windbg> .open -a ffffffff80c97fb4
windbg> .open -a fffffffff743e0cd
0: kd> db f789a15c
f789a15c cd e0 43 f7 58 0d 9c 89-5f 43 52 53 08 00 01 20 ..C.X..._CRS...
1: kd> g
Breakpoint 51 hit
eax=00000000 ebx=89455708 ecx=00000100 edx=899b0190 esi=00000000 edi=00000000
eip=804f25ee esp=f791abdc ebp=f791ac48 iopl=0 nv up ei pl zr na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000246
hal!HalGetBusDataByOffset:
804f25ee 55 push ebp
1: kd> dv
BusDataType = PCIConfiguration (0n4)
BusNumber = 0
SlotNumber = 0
Buffer = 0x89565eac
Offset = 0x70
Length = 4
bus = struct _BUS_HANDLER
1: kd> gu
eax=00000004 ebx=89455708 ecx=00000000 edx=00000cf8 esi=00000000 edi=00000000
eip=f740d8c7 esp=f791abf8 ebp=f791ac48 iopl=0 nv up ei pl nz na po nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000202
ACPI!PciConfigSpaceHandlerWorker+0x29b:
f740d8c7 8bf0 mov esi,eax
1: kd> db 0x89565eac
89565eac 00 00 08 00 20 00 00 00-18 00 00 00 01 00 00 00 .... ...........
0: kd> g
Breakpoint 51 hit
eax=00000000 ebx=899293b0 ecx=00000100 edx=899b0190 esi=00000000 edi=00000000
eip=804f25ee esp=f791abdc ebp=f791ac48 iopl=0 nv up ei pl zr na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000246
hal!HalGetBusDataByOffset:
804f25ee 55 push ebp
1: kd> dv
BusDataType = PCIConfiguration (0n4)
BusNumber = 0
SlotNumber = 0
Buffer = 0x89565e44
Offset = 0x58
Length = 4
bus = struct _BUS_HANDLER
1: kd> gu
eax=00000004 ebx=899293b0 ecx=00000000 edx=00000cf8 esi=00000000 edi=00000000
eip=f740d8c7 esp=f791abf8 ebp=f791ac48 iopl=0 nv up ei pl nz na po nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000202
ACPI!PciConfigSpaceHandlerWorker+0x29b:
f740d8c7 8bf0 mov esi,eax
1: kd> db 0x89565e44
89565e44 03 10 11 01 08 00 00 00-10 00 00 00 08 00 00 00 ................
1: kd> g
Breakpoint 51 hit
eax=00000000 ebx=89455708 ecx=00000100 edx=899b0190 esi=00000000 edi=00000000
eip=804f25ee esp=f791abdc ebp=f791ac48 iopl=0 nv up ei pl zr na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000246
hal!HalGetBusDataByOffset:
804f25ee 55 push ebp
1: kd> dv
BusDataType = PCIConfiguration (0n4)
BusNumber = 0
SlotNumber = 0
Buffer = 0x89565e44
Offset = 0x5c
Length = 4
bus = struct _BUS_HANDLER
1: kd> gu
eax=00000004 ebx=89455708 ecx=00000000 edx=00000cf8 esi=00000000 edi=00000000
eip=f740d8c7 esp=f791abf8 ebp=f791ac48 iopl=0 nv up ei pl nz na po nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000202
ACPI!PciConfigSpaceHandlerWorker+0x29b:
f740d8c7 8bf0 mov esi,eax
1: kd> db 0x89565e44
89565e44 00 30 33 11 0c 00 00 00-00 00 00 00 08 00 00 00 .03.............
0: kd> g
Breakpoint 89 hit
eax=00000000 ebx=00000000 ecx=04e90001 edx=04e80000 esi=899c0d58 edi=00000000
eip=f743e0cd esp=f789a184 ebp=f789a1b0 iopl=0 nv up ei pl zr na po cy
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000243
ACPI!ACPIBusIrpQueryResources+0xdf:
f743e0cd 8bd8 mov ebx,eax
0: kd> dv
DeviceObject = 0x899050e8 Device for "\Driver\ACPI"
Irp = 0x89905220
ioList = 0x00000000
deviceStatus = 0xf
minorFunction = 0x0a ''
cmList = 0x00000000
crsBuf = 0xe12a7008 "???"
crsBufSize = 0x1e5
0: kd> db 0xe12a7008
e12a7008 88 0e 00 02 0c 00 00 00-00 00 7f 00 00 00 80 00 ................
e12a7018 00 87 18 00 00 0c 03 00-00 00 00 00 00 0a 00 ff ................
e12a7028 ff 0b 00 00 00 00 00 00-00 02 00 00 87 18 00 00 ................
e12a7038 0c 02 00 00 00 00 00 00-0c 00 ff 3f 0c 00 00 00 ...........?....
e12a7048 00 00 00 00 00 00 00 87-18 00 00 0c 02 00 00 00 ................
e12a7058 00 00 40 0c 00 ff 7f 0c-00 00 00 00 00 00 00 00 ..@.............
e12a7068 00 00 87 18 00 00 0c 02-00 00 00 00 00 80 0c 00 ................
e12a7078 ff bf 0c 00 00 00 00 00-00 00 00 00 00 87 18 00 ................
0: kd> db 0xe12a7008+80
e12a7088 00 0c 03 00 00 00 00 00-c0 0c 00 ff ff 0c 00 00 ................
e12a7098 00 00 00 00 40 00 00 00-87 18 00 00 0c 03 00 00 ....@...........
e12a70a8 00 00 00 00 0d 00 ff 3f-0d 00 00 00 00 00 00 40 .......?.......@
e12a70b8 00 00 00 87 18 00 00 0c-03 00 00 00 00 00 40 0d ..............@.
e12a70c8 00 ff 7f 0d 00 00 00 00-00 00 40 00 00 00 87 18 ..........@.....
e12a70d8 00 00 0c 03 00 00 00 00-00 80 0d 00 ff bf 0d 00 ................
e12a70e8 00 00 00 00 00 40 00 00-00 87 18 00 00 0c 03 00 .....@..........
e12a70f8 00 00 00 00 c0 0d 00 ff-ff 0d 00 00 00 00 00 00 ................
0: kd> db 0xe12a7008+80*2
e12a7108 00 00 00 00 87 18 00 00-0c 03 00 00 00 00 00 00 ................
e12a7118 0e 00 ff 3f 0e 00 00 00-00 00 00 00 00 00 00 87 ...?............
e12a7128 18 00 00 0c 03 00 00 00-00 00 40 0e 00 ff 7f 0e ..........@.....
e12a7138 00 00 00 00 00 00 00 00-00 00 87 18 00 00 0c 02 ................
e12a7148 00 00 00 00 00 80 0e 00-ff bf 0e 00 00 00 00 00 ................
e12a7158 00 00 00 00 00 87 18 00-00 0c 02 00 00 00 00 00 ................
e12a7168 c0 0e 00 ff ff 0e 00 00-00 00 00 00 00 00 00 00 ................
e12a7178 87 18 00 00 0c 03 00 00-00 00 00 00 00 80 ff ff ................
0: kd> db 0xe12a7008+80*3
e12a7188 bf fe 00 00 00 00 00 00-c0 7e 00 8a 2b 00 00 0c .........~..+...
e12a7198 03 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
e12a71a8 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
e12a71b8 00 00 00 00 00 00 00 00-00 47 01 f8 0c f8 0c 01 .........G......
e12a71c8 08 88 0e 00 01 0c 03 00-00 00 00 f7 0c 00 00 f8 ................
e12a71d8 0c 00 88 0e 00 01 0c 03-00 00 00 0d ff fe 00 00 ................
e12a71e8 00 f2 00 79 00 00 00 00-3e 08 c2 01 00 00 00 00 ...y....>.......
e12a71f8 f9 de 9c 89 f9 de 9c 89-00 00 00 00 00 00 00 00 ................
//
// Build a IO_RESOURCE_REQUIREMENT_LISTS
//
status = PnpBiosResourcesToNtResources(
crsBuf,
(deviceExtension->Flags & DEV_CAP_PCI ?
PNP_BIOS_TO_IO_NO_CONSUMED_RESOURCES : 0),
&ioList );
0: kd> gu
eax=00000000 ebx=00000000 ecx=00170001 edx=00160000 esi=899c0d58 edi=00000000
eip=f743e10e esp=f789a184 ebp=f789a1b0 iopl=0 nv up ei pl zr na pe cy
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000247
ACPI!ACPIBusIrpQueryResources+0x120:
f743e10e 57 push edi
0: kd> dv ioList
ioList = 0xe12a7db8
0: kd> dx -r1 ((ACPI!_IO_RESOURCE_REQUIREMENTS_LIST *)0xe12a7db8)
((ACPI!_IO_RESOURCE_REQUIREMENTS_LIST *)0xe12a7db8) : 0xe12a7db8 [Type: _IO_RESOURCE_REQUIREMENTS_LIST *]
[<Raw View>] [Type: _IO_RESOURCE_REQUIREMENTS_LIST]
[0x1] : 0xe12a7dd8 [Type: _IO_RESOURCE_LIST *]
0: kd> dx -r1 -nv (*((ACPI!_IO_RESOURCE_REQUIREMENTS_LIST *)0xe12a7db8))
(*((ACPI!_IO_RESOURCE_REQUIREMENTS_LIST *)0xe12a7db8)) [Type: _IO_RESOURCE_REQUIREMENTS_LIST]
[+0x000] ListSize : 0x248 [Type: unsigned long]
[+0x004] InterfaceType : PNPBus (15) [Type: _INTERFACE_TYPE]
[+0x008] BusNumber : 0x0 [Type: unsigned long]
[+0x00c] SlotNumber : 0x0 [Type: unsigned long]
[+0x010] Reserved [Type: unsigned long [3]]
[+0x01c] AlternativeLists : 0x1 [Type: unsigned long]
[+0x020] List [Type: _IO_RESOURCE_LIST [1]]
0: kd> dx -r1 (*((ACPI!_IO_RESOURCE_LIST (*)[1])0xe12a7dd8))
(*((ACPI!_IO_RESOURCE_LIST (*)[1])0xe12a7dd8)) [Type: _IO_RESOURCE_LIST [1]]
[0] [Type: _IO_RESOURCE_LIST]
0: kd> dx -r1 (*((ACPI!_IO_RESOURCE_LIST *)0xe12a7dd8))
(*((ACPI!_IO_RESOURCE_LIST *)0xe12a7dd8)) [Type: _IO_RESOURCE_LIST]
[<Raw View>] [Type: _IO_RESOURCE_LIST]
[0] : Bus Number Resource [Type: _IO_RESOURCE_DESCRIPTOR]
[1] : Memory Resource: 0xa0000 - 0xbffff of length 0x20000 and alignment 0x1 [Type: _IO_RESOURCE_DESCRIPTOR]
[2] : Private Device Resource [Type: _IO_RESOURCE_DESCRIPTOR]
[3] : Memory Resource: 0xcc000 - 0xcffff of length 0x4000 and alignment 0x1 [Type: _IO_RESOURCE_DESCRIPTOR]
[4] : Private Device Resource [Type: _IO_RESOURCE_DESCRIPTOR]
[5] : Memory Resource: 0xd0000 - 0xd3fff of length 0x4000 and alignment 0x1 [Type: _IO_RESOURCE_DESCRIPTOR]
[6] : Private Device Resource [Type: _IO_RESOURCE_DESCRIPTOR]
[7] : Memory Resource: 0xd4000 - 0xd7fff of length 0x4000 and alignment 0x1 [Type: _IO_RESOURCE_DESCRIPTOR]
[8] : Private Device Resource [Type: _IO_RESOURCE_DESCRIPTOR]
[9] : Memory Resource: 0xd8000 - 0xdbfff of length 0x4000 and alignment 0x1 [Type: _IO_RESOURCE_DESCRIPTOR]
[10] : Private Device Resource [Type: _IO_RESOURCE_DESCRIPTOR]
[11] : Memory Resource: 0x80000000 - 0xfebfffff of length 0x7ec00000 and alignment 0x1 [Type: _IO_RESOURCE_DESCRIPTOR]
[12] : Private Device Resource [Type: _IO_RESOURCE_DESCRIPTOR]
[13] : Port Resource: 0x0 - 0xcf7 of length 0xcf8 and alignment 0x1 [Type: _IO_RESOURCE_DESCRIPTOR]
[14] : Private Device Resource [Type: _IO_RESOURCE_DESCRIPTOR]
[15] : Port Resource: 0xd00 - 0xfeff of length 0xf200 and alignment 0x1 [Type: _IO_RESOURCE_DESCRIPTOR]
[16] : Private Device Resource [Type: _IO_RESOURCE_DESCRIPTOR]
0: kd> gu
eax=00000000 ebx=8990520a ecx=80ae0dfa edx=80b18958 esi=f743dfee edi=00000000
eip=f740410e esp=f789a1c0 ebp=f789a1e4 iopl=0 nv up ei ng nz ac pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000296
ACPI!ACPIDispatchIrp+0x19e:
f740410e ff75fc push dword ptr [ebp-4] ss:0010:f789a1e0=899c0d58
0: kd> gu
eax=00000000 ebx=00000000 ecx=899c0e74 edx=80b18958 esi=89905220 edi=899050e8
eip=80a2675c esp=f789a1f4 ebp=f789a200 iopl=0 nv up ei pl nz na po nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000202
nt!IofCallDriver+0x62:
80a2675c 5f pop edi
0: kd> gu
eax=00000000 ebx=899050e8 ecx=899c0e74 edx=80b18958 esi=f789a274 edi=899052b4
eip=80c95e00 esp=f789a208 ebp=f789a230 iopl=0 nv up ei pl nz na po nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000202
nt!IopSynchronousCall+0x1aa:
80c95e00 8bf0 mov esi,eax
0: kd> gu
eax=00000000 ebx=00000000 ecx=e128ec68 edx=80b18958 esi=f789a2cc edi=899050e8
eip=80c97fb4 esp=f789a244 ebp=f789a29c iopl=0 nv up ei ng nz ac po cy
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000293
nt!IopQueryDeviceResources+0xc4:
80c97fb4 8bf8 mov edi,eax
} else {
irpSp.MinorFunction = IRP_MN_QUERY_RESOURCES;
irpSp.MajorFunction = IRP_MJ_PNP;
status = IopSynchronousCall(DeviceObject, &irpSp, (PULONG_PTR)Resource);
if (status == STATUS_NOT_SUPPORTED) {
0: kd> dv Resource
Resource = 0xf789a2cc
0: kd> dx -r1 ((ntkrnlmp!void * *)0xf789a2cc)
((ntkrnlmp!void * *)0xf789a2cc) : 0xf789a2cc [Type: void * *]
0xe128ec68 [Type: void *]
0: kd> dt CM_RESOURCE_LIST 0xe128ec68
nt!CM_RESOURCE_LIST
+0x000 Count : 1
+0x004 List : [1] _CM_FULL_RESOURCE_DESCRIPTOR
0: kd> dx -id 0,0,899a2278 -r1 (*((ntkrnlmp!_CM_FULL_RESOURCE_DESCRIPTOR (*)[1])0xe128ec6c))
(*((ntkrnlmp!_CM_FULL_RESOURCE_DESCRIPTOR (*)[1])0xe128ec6c)) [Type: _CM_FULL_RESOURCE_DESCRIPTOR [1]]
[0] [Type: _CM_FULL_RESOURCE_DESCRIPTOR]
0: kd> dx -id 0,0,899a2278 -r1 (*((ntkrnlmp!_CM_FULL_RESOURCE_DESCRIPTOR *)0xe128ec6c))
(*((ntkrnlmp!_CM_FULL_RESOURCE_DESCRIPTOR *)0xe128ec6c)) [Type: _CM_FULL_RESOURCE_DESCRIPTOR]
[<Raw View>] [Type: _CM_FULL_RESOURCE_DESCRIPTOR]
[0] : Bus Number Resource [Type: _CM_PARTIAL_RESOURCE_DESCRIPTOR]
[1] : Private Device Resource [Type: _CM_PARTIAL_RESOURCE_DESCRIPTOR]
[2] : Memory Resource: 0xa0000 of length 0x20000 [Type: _CM_PARTIAL_RESOURCE_DESCRIPTOR]
[3] : Private Device Resource [Type: _CM_PARTIAL_RESOURCE_DESCRIPTOR]
[4] : Private Device Resource [Type: _CM_PARTIAL_RESOURCE_DESCRIPTOR]
[5] : Private Device Resource [Type: _CM_PARTIAL_RESOURCE_DESCRIPTOR]
[6] : Memory Resource: 0xcc000 of length 0x4000 [Type: _CM_PARTIAL_RESOURCE_DESCRIPTOR]
[7] : Private Device Resource [Type: _CM_PARTIAL_RESOURCE_DESCRIPTOR]
[8] : Private Device Resource [Type: _CM_PARTIAL_RESOURCE_DESCRIPTOR]
[9] : Private Device Resource [Type: _CM_PARTIAL_RESOURCE_DESCRIPTOR]
[10] : Memory Resource: 0xd0000 of length 0x4000 [Type: _CM_PARTIAL_RESOURCE_DESCRIPTOR]
[11] : Private Device Resource [Type: _CM_PARTIAL_RESOURCE_DESCRIPTOR]
[12] : Private Device Resource [Type: _CM_PARTIAL_RESOURCE_DESCRIPTOR]
[13] : Private Device Resource [Type: _CM_PARTIAL_RESOURCE_DESCRIPTOR]
[14] : Memory Resource: 0xd4000 of length 0x4000 [Type: _CM_PARTIAL_RESOURCE_DESCRIPTOR]
[15] : Private Device Resource [Type: _CM_PARTIAL_RESOURCE_DESCRIPTOR]
[16] : Private Device Resource [Type: _CM_PARTIAL_RESOURCE_DESCRIPTOR]
[17] : Private Device Resource [Type: _CM_PARTIAL_RESOURCE_DESCRIPTOR]
[18] : Memory Resource: 0xd8000 of length 0x4000 [Type: _CM_PARTIAL_RESOURCE_DESCRIPTOR]
[19] : Private Device Resource [Type: _CM_PARTIAL_RESOURCE_DESCRIPTOR]
[20] : Private Device Resource [Type: _CM_PARTIAL_RESOURCE_DESCRIPTOR]
[21] : Private Device Resource [Type: _CM_PARTIAL_RESOURCE_DESCRIPTOR]
[22] : Memory Resource: 0x80000000 of length 0x7ec00000 [Type: _CM_PARTIAL_RESOURCE_DESCRIPTOR]
[23] : Private Device Resource [Type: _CM_PARTIAL_RESOURCE_DESCRIPTOR]
[24] : Private Device Resource [Type: _CM_PARTIAL_RESOURCE_DESCRIPTOR]
[25] : Private Device Resource [Type: _CM_PARTIAL_RESOURCE_DESCRIPTOR]
[26] : Port Resource: 0x0 of length 0xcf8 [Type: _CM_PARTIAL_RESOURCE_DESCRIPTOR]
[27] : Private Device Resource [Type: _CM_PARTIAL_RESOURCE_DESCRIPTOR]
[28] : Private Device Resource [Type: _CM_PARTIAL_RESOURCE_DESCRIPTOR]
[29] : Private Device Resource [Type: _CM_PARTIAL_RESOURCE_DESCRIPTOR]
[30] : Port Resource: 0xd00 of length 0xf200 [Type: _CM_PARTIAL_RESOURCE_DESCRIPTOR]
[31] : Private Device Resource [Type: _CM_PARTIAL_RESOURCE_DESCRIPTOR]
[32] : Private Device Resource [Type: _CM_PARTIAL_RESOURCE_DESCRIPTOR]
[33] : Private Device Resource [Type: _CM_PARTIAL_RESOURCE_DESCRIPTOR]
if (NT_SUCCESS(status)) {
*Length = IopDetermineResourceListSize((PCM_RESOURCE_LIST)*Resource);
}
return status;
0: kd> p
eax=00000000 ebx=00000000 ecx=f789a2c8 edx=e128ee9c esi=894ffea8 edi=00000000
eip=80c98354 esp=f789a250 ebp=f789a29c iopl=0 nv up ei pl zr na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000246
nt!IopQueryDeviceResources+0x464:
80c98354 c9 leave
0: kd> p
eax=00000000 ebx=00000000 ecx=f789a2c8 edx=e128ee9c esi=894ffea8 edi=00000000
eip=80c90a2f esp=f789a2b4 ebp=f789a2d0 iopl=0 nv up ei pl zr na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000246
nt!PiQueryAndAllocateBootResources+0x65:
80c90a2f 3bc7 cmp eax,edi
status = IopQueryDeviceResources(
DeviceNode->PhysicalDeviceObject,
QUERY_RESOURCE_LIST,
&cmResource,
&cmLength);
if (!NT_SUCCESS(status)) {
0: kd> dv cmLength
cmLength = 0x234
0: kd> dv cmResource
cmResource = 0xe128ec68
0: kd> dx -r1 ((ntkrnlmp!_CM_RESOURCE_LIST *)0xe128ec68)
((ntkrnlmp!_CM_RESOURCE_LIST *)0xe128ec68) : 0xe128ec68 [Type: _CM_RESOURCE_LIST *]
[<Raw View>] [Type: _CM_RESOURCE_LIST]
[0x1] : 0xe128ec6c [Type: _CM_FULL_RESOURCE_DESCRIPTOR *]
0: kd> dx -r1 -nv (*((ntkrnlmp!_CM_RESOURCE_LIST *)0xe128ec68))
(*((ntkrnlmp!_CM_RESOURCE_LIST *)0xe128ec68)) [Type: _CM_RESOURCE_LIST]
[+0x000] Count : 0x1 [Type: unsigned long]
[+0x004] List [Type: _CM_FULL_RESOURCE_DESCRIPTOR [1]]
0: kd> dt ntkrnlmp!_CM_PARTIAL_RESOURCE_DESCRIPTOR -v
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR, 4 elements, 0x10 bytes
+0x000 Type : UChar
+0x001 ShareDisposition : UChar
+0x002 Flags : Uint2B
+0x004 u : union __unnamed, 8 elements, 0xc bytes
0: kd> dt ntkrnlmp!_CM_PARTIAL_RESOURCE_DESCRIPTOR 0xe128ec7c -r
+0x000 Type : 0x6 ''
+0x001 ShareDisposition : 0x3 ''
+0x002 Flags : 0
+0x004 u : __unnamed
+0x000 Generic : __unnamed
+0x000 Start : _LARGE_INTEGER 0x00000080`00000000
+0x008 Length : 0
+0x000 Port : __unnamed
+0x000 Start : _LARGE_INTEGER 0x00000080`00000000
+0x008 Length : 0
+0x000 Interrupt : __unnamed
+0x000 Level : 0
+0x004 Vector : 0x80
+0x008 Affinity : 0
+0x000 Memory : __unnamed
+0x000 Start : _LARGE_INTEGER 0x00000080`00000000
+0x008 Length : 0
+0x000 Dma : __unnamed
+0x000 Channel : 0
+0x004 Port : 0x80
+0x008 Reserved1 : 0
+0x000 DevicePrivate : __unnamed
+0x000 Data : [3] 0
+0x000 BusNumber : __unnamed
+0x000 Start : 0
+0x004 Length : 0x80
+0x008 Reserved : 0
+0x000 DeviceSpecificData : __unnamed
+0x000 DataSize : 0
+0x004 Reserved1 : 0x80
+0x008 Reserved2 : 0
0: kd> ?22*10
Evaluate expression: 544 = 00000220
0: kd> dt ACPI!_IO_RESOURCE_DESCRIPTOR -v
struct _IO_RESOURCE_DESCRIPTOR, 7 elements, 0x20 bytes
+0x000 Option : UChar
+0x001 Type : UChar
+0x002 ShareDisposition : UChar
+0x003 Spare1 : UChar
+0x004 Flags : Uint2B
+0x006 Spare2 : Uint2B
+0x008 u : union __unnamed, 8 elements, 0x18 bytes