i8042prt!I8042KeyboardInterruptService到i8042prt!I8042KeyboardIsrDpc

i8042prt!I8042KeyboardInterruptService到i8042prt!I8042KeyboardIsrDpc

1: kd> g

i8042 isr (kb): enter

i8042 isr (kb): scanCode 0x1d

i8042 isr (kb): real scan code

i8042 isr (kb): MAKE code

Breakpoint 60 hit

eax=898ac7ac ebx=00000000 ecx=ffffffff edx=00000000 esi=898ac5c0 edi=898ac508

eip=80a36484 esp=f789ed44 ebp=f789ed60 iopl=0 nv up ei ng nz na pe nc

cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000286

nt!KeInsertQueueDpc:

80a36484 55 push ebp

0: kd> kc

00 nt!KeInsertQueueDpc

01 i8042prt!I8xQueueCurrentKeyboardInput

02 i8042prt!I8042KeyboardInterruptService

03 nt!KiInterruptDispatch

04 nt!IopfCompleteRequest

05 USBPORT!USBPORT_CompleteTransfer

06 USBPORT!USBPORT_DoneTransfer

07 USBPORT!USBPORT_FlushDoneTransferList

08 USBPORT!USBPORT_DpcWorker

09 USBPORT!USBPORT_IsrDpcWorker

0a USBPORT!USBPORT_IsrDpc

0b nt!KiRetireDpcList

0c nt!KiDispatchInterrupt

WARNING: Frame IP not in any known module. Following frames may be wrong.

0d 0x0

0: kd> kv

ChildEBP RetAddr Args to Child

00 f789ed40 bafe4e4d 898ac7ac 00000000 00000000 nt!KeInsertQueueDpc (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\ke\dpcobj.c @ 246]

01 f789ed60 bafe55cf 898ac508 894fe978 898ac5c8 i8042prt!I8xQueueCurrentKeyboardInput+0x8b (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\drivers\input\pnpi8042\kbddep.c @ 2189]

02 f789eda0 80b003ed 894fe978 898ac508 00010009 i8042prt!I8042KeyboardInterruptService+0x57d (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\drivers\input\pnpi8042\kbddep.c @ 609]

03 f789eda0 80a26a01 894fe978 898ac508 00010009 nt!KiInterruptDispatch+0x8d (FPO: [0,2] TrapFrame @ f789edc4) [d:\srv03rtm\base\ntos\ke\i386\intsup.asm @ 777]

04 f789ee38 bae9aa07 898d4030 89485cd8 80b019e8 nt!IopfCompleteRequest+0x1 (FPO: [Non-Fpo]) (CONV: fastcall) [d:\srv03rtm\base\ntos\io\iomgr\iosubs.c @ 3400]

05 f789eeac bae9f23e 43504974 02707269 898d4724 USBPORT!USBPORT_CompleteTransfer+0x5af (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\drivers\wdm\usb\hcd\usbport\core.c @ 1238]

06 f789eee0 baea0ca7 8979d3c0 898d40e8 f789ef28 USBPORT!USBPORT_DoneTransfer+0x252 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\drivers\wdm\usb\hcd\usbport\core.c @ 997]

07 f789ef10 baea3c3a 898d4030 898d40e8 898d40e8 USBPORT!USBPORT_FlushDoneTransferList+0x281 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\drivers\wdm\usb\hcd\usbport\core.c @ 2228]

08 f789ef40 baed70cc 898d4030 898d40e8 89845220 USBPORT!USBPORT_DpcWorker+0x4d0 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\drivers\wdm\usb\hcd\usbport\core.c @ 3865]

09 f789ef78 baed77bc 898d4030 00000001 ffdff980 USBPORT!USBPORT_IsrDpcWorker+0x7c8 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\drivers\wdm\usb\hcd\usbport\int.c @ 257]

0a f789ef9c 80a41432 898d4608 898d4030 00000000 USBPORT!USBPORT_IsrDpc+0x266 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\drivers\wdm\usb\hcd\usbport\int.c @ 333]

0b f789eff4 80b00756 ba1b0bf8 00000000 00000000 nt!KiRetireDpcList+0xd6 (FPO: [Non-Fpo]) (CONV: fastcall) [d:\srv03rtm\base\ntos\ke\dpcsup.c @ 1076]

0c f789eff8 ba1b0bf8 00000000 00000000 00000000 nt!KiDispatchInterrupt+0x36 (FPO: [Uses EBP] [0,0,1]) [d:\srv03rtm\base\ntos\ke\i386\ctxswap.asm @ 226]

WARNING: Frame IP not in any known module. Following frames may be wrong.

0d 80b00756 00000000 00000009 bb837775 00000128 0xba1b0bf8

windbg> .open -a ffffffffbafe4e4d

0: kd> dv

Dpc = 0x898ac7ac

SystemArgument1 = 0x00000000

SystemArgument2 = 0x00000000

OldIrql = 0x00 ''

Inserted = 0x89 ''

0: kd> dx -r1 ((ntkrnlmp!_KDPC *)0x898ac7ac)

((ntkrnlmp!_KDPC *)0x898ac7ac) : 0x898ac7ac [Type: _KDPC *]

+0x000\] Type : 19 \[Type: short

+0x002\] Number : 0x0 \[Type: unsigned char

+0x003\] Importance : 0x1 \[Type: unsigned char

+0x004\] DpcListEntry \[Type: _LIST_ENTRY

+0x00c\] DeferredRoutine : 0xbafe4310 \[Type: void (\*)(_KDPC \*,void \*,void \*,void \*)

+0x010\] DeferredContext : 0x898ac508 \[Type: void \*

+0x014\] SystemArgument1 : 0x0 \[Type: void \*

+0x018\] SystemArgument2 : 0x0 \[Type: void \*

+0x01c\] DpcData : 0xffdff980 \[Type: void \*

0: kd> u bafe4310

i8042prt!I8042KeyboardIsrDpc [d:\srv03rtm\drivers\input\pnpi8042\kbdcmn.c @ 69]:

bafe4310 55 push ebp

bafe4311 8bec mov ebp,esp

bafe4313 83ec40 sub esp,40h

bafe4316 53 push ebx

bafe4317 56 push esi

bafe4318 57 push edi

bafe4319 33ff xor edi,edi

bafe431b f60541a3feba20 test byte ptr [i8042prt!Globals+0x1 (bafea341)],20h

VOID

I8xQueueCurrentKeyboardInput(

IN PDEVICE_OBJECT DeviceObject

)

{

PPORT_KEYBOARD_EXTENSION deviceExtension;

deviceExtension = DeviceObject->DeviceExtension;

。。。。。。

} else {

//

// Queue the ISR DPC.

//

KeInsertQueueDpc(

&deviceExtension->KeyboardIsrDpc,

DeviceObject->CurrentIrp,

NULL

);

}

}

0: kd> dt i8042prt!_DEVICE_OBJECT 898ac508

+0x000 Type : 0n3

+0x002 Size : 0x398

+0x004 ReferenceCount : 0n0

+0x008 DriverObject : 0x89626598 _DRIVER_OBJECT

+0x00c NextDevice : (null)

+0x010 AttachedDevice : 0x895cb038 _DEVICE_OBJECT

+0x014 CurrentIrp : (null)

+0x018 Timer : (null)

+0x01c Flags : 0x2004

+0x020 Characteristics : 0

+0x024 DoNotUse1 : (null)

+0x028 DeviceExtension : 0x898ac5c0 Void

+0x02c DeviceType : 0x27

+0x030 StackSize : 5 ''

+0x034 Queue : __unnamed

+0x05c AlignmentRequirement : 0

+0x060 DeviceQueue : _KDEVICE_QUEUE

+0x074 Dpc : _KDPC

+0x094 ActiveThreadCount : 0

+0x098 SecurityDescriptor : (null)

+0x09c DeviceLock : _KEVENT

+0x0ac SectorSize : 0

+0x0ae Spare1 : 1

+0x0b0 DeviceObjectExtension : 0x898ac8a0 _DEVOBJ_EXTENSION

+0x0b4 Reserved : (null)

0: kd> dt i8042prt!_PORT_KEYBOARD_EXTENSION 0x898ac5c0

+0x000 Self : 0x898ac508 _DEVICE_OBJECT

+0x004 InterruptObject : 0x894fe978 _KINTERRUPT

+0x008 InterruptSpinLock : 0x895f2a79

+0x00c TopOfStack : 0x894edf18 _DEVICE_OBJECT

+0x010 PDO : 0x894edf18 _DEVICE_OBJECT

+0x018 RemoveLock : _IO_REMOVE_LOCK

+0x070 OutstandingPowerIrp : (null)

+0x074 PowerState : 1 ( PowerDeviceD0 )

+0x078 SystemState : 0 ( PowerSystemUnspecified )

+0x07c ShutdownType : 0 ( PowerActionNone )

+0x080 InputCount : 0x58

+0x084 EnableCount : 0n1

+0x088 DataConsumptionTimer : _KTIMER

+0x0b0 RetriesExceededDpc : _KDPC

+0x0d0 ErrorLogDpc : _KDPC

+0x0f0 TimeOutDpc : _KDPC

+0x110 ResetDpc : _KDPC

+0x130 SequenceNumber : 3

+0x134 ConnectData : _CONNECT_DATA

+0x13c WmiLibInfo : _WMILIB_CONTEXT

+0x15c CurrentOutput : _OUTPUT_PACKET

+0x16c InterruptDescriptor : _CM_PARTIAL_RESOURCE_DESCRIPTOR

+0x17c PnpDeviceState : 0

+0x180 ResendCount : 0n0

+0x182 OkayToLogOverflow : 0x1 ''

+0x183 Initialized : 0x1 ''

+0x184 IsIsrActivated : 0x1 ''

+0x185 IsKeyboard : 0x1 ''

+0x186 Started : 0x1 ''

+0x188 PowerCaps : 0 ''

+0x189 PowerEvent : 0 ''

+0x18a CurrentScanCode : 0x1d ''

+0x18b LastScanCode : 0x1d ''

+0x18c SysButtonEventIrp : (null)

+0x190 SysButtonEventDpc : _KDPC

+0x1b0 SysButtonSpinLock : 0

+0x1b4 SysButtonInterfaceName : _UNICODE_STRING ""

+0x1bc KeyboardAttributes : _KEYBOARD_ATTRIBUTES

+0x1d8 KeyboardIdentifierEx : _KEYBOARD_ID_EX

+0x1e0 KeyRepeatCurrent : _KEYBOARD_TYPEMATIC_PARAMETERS

+0x1e6 KeyboardIndicators : _KEYBOARD_INDICATOR_PARAMETERS
+0x1ec KeyboardIsrDpc : _KDPC +0x1ec KeyboardIsrDpc : _KDPC

+0x20c KeyboardIsrDpcRetry : _KDPC

+0x22c DpcInterlockKeyboard : 0n-1

+0x230 InputData : 0x89784008 _KEYBOARD_INPUT_DATA

+0x234 DataIn : 0x897843bc _KEYBOARD_INPUT_DATA

+0x238 DataOut : 0x8978444c _KEYBOARD_INPUT_DATA

+0x23c DataEnd : 0x897844b8 _KEYBOARD_INPUT_DATA

+0x240 CurrentInput : _KEYBOARD_INPUT_DATA

+0x24c CurrentScanState : 0 ( Normal )

+0x250 InitializationHookCallback : (null)

+0x254 IsrHookCallback : (null)

+0x258 HookContext : (null)

+0x25c CrashFlags : 0n0

+0x260 CurrentCrashFlags : 0n0

+0x264 CrashScanCode : 0 ''

+0x265 CrashScanCode2 : 0 ''

+0x266 FailedReset : 0x1 ''

+0x1ec KeyboardIsrDpc : _KDPC

0: kd> dx -id 0,0,8954e020 -r1 (*((i8042prt!_KDPC *)0x898ac7ac)) 0x898ac7ac

(*((i8042prt!_KDPC *)0x898ac7ac)) [Type: _KDPC]

+0x000\] Type : 19 \[Type: short

+0x002\] Number : 0x0 \[Type: unsigned char

+0x003\] Importance : 0x1 \[Type: unsigned char

+0x004\] DpcListEntry \[Type: _LIST_ENTRY

+0x00c\] DeferredRoutine : 0xbafe4310 \[Type: void (\*)(_KDPC \*,void \*,void \*,void \*)

+0x010\] DeferredContext : 0x898ac508 \[Type: void \*

+0x014\] SystemArgument1 : 0x0 \[Type: void \*

+0x018\] SystemArgument2 : 0x0 \[Type: void \*

+0x01c\] DpcData : 0xffdff980 \[Type: void \*

0: kd> kv

ChildEBP RetAddr Args to Child

00 f789ed40 bafe4e4d 898ac7ac 00000000 00000000 nt!KeInsertQueueDpc (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\ke\dpcobj.c @ 246]

01 f789ed60 bafe55cf 898ac508 894fe978 898ac5c8 i8042prt!I8xQueueCurrentKeyboardInput+0x8b (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\drivers\input\pnpi8042\kbddep.c @ 2189]

相关推荐
sitelist11 天前
从nt!KiInterruptDispatch到i8042prt!I8042KeyboardInterruptService看键盘中断
i8042prt·i8042keyboard·interruptservi