📄 initunlo.cod
字号:
00242 e8 00 00 00 00 call _SerialCancelTimer@8
; 558 :
; 559 : //
; 560 : // Stop servicing DPC's
; 561 : //
; 562 :
; 563 : SerialRemoveQueueDpc(&PDevExt->CompleteWriteDpc, PDevExt);
00247 8b 3d 00 00 00
00 mov edi, DWORD PTR __imp__KeRemoveQueueDpc@4
0024d 8d 86 ec 01 00
00 lea eax, DWORD PTR [esi+492]
00253 50 push eax
00254 ff d7 call edi
00256 84 c0 test al, al
00258 5b pop ebx
00259 74 0c je SHORT $L15053
0025b 8d 8e 30 06 00
00 lea ecx, DWORD PTR [esi+1584]
00261 ff 15 00 00 00
00 call DWORD PTR __imp_@InterlockedDecrement@4
$L15053:
; 564 : SerialRemoveQueueDpc(&PDevExt->CompleteReadDpc, PDevExt);
00267 8d 86 0c 02 00
00 lea eax, DWORD PTR [esi+524]
0026d 50 push eax
0026e ff d7 call edi
00270 84 c0 test al, al
00272 74 0c je SHORT $L15054
00274 8d 8e 30 06 00
00 lea ecx, DWORD PTR [esi+1584]
0027a ff 15 00 00 00
00 call DWORD PTR __imp_@InterlockedDecrement@4
$L15054:
; 565 : SerialRemoveQueueDpc(&PDevExt->TotalReadTimeoutDpc, PDevExt);
00280 8d 86 2c 02 00
00 lea eax, DWORD PTR [esi+556]
00286 50 push eax
00287 ff d7 call edi
00289 84 c0 test al, al
0028b 74 0c je SHORT $L15055
0028d 8d 8e 30 06 00
00 lea ecx, DWORD PTR [esi+1584]
00293 ff 15 00 00 00
00 call DWORD PTR __imp_@InterlockedDecrement@4
$L15055:
; 566 : SerialRemoveQueueDpc(&PDevExt->IntervalReadTimeoutDpc, PDevExt);
00299 8d 86 4c 02 00
00 lea eax, DWORD PTR [esi+588]
0029f 50 push eax
002a0 ff d7 call edi
002a2 84 c0 test al, al
002a4 74 0c je SHORT $L15056
002a6 8d 8e 30 06 00
00 lea ecx, DWORD PTR [esi+1584]
002ac ff 15 00 00 00
00 call DWORD PTR __imp_@InterlockedDecrement@4
$L15056:
; 567 : SerialRemoveQueueDpc(&PDevExt->TotalWriteTimeoutDpc, PDevExt);
002b2 8d 86 6c 02 00
00 lea eax, DWORD PTR [esi+620]
002b8 50 push eax
002b9 ff d7 call edi
002bb 84 c0 test al, al
002bd 74 0c je SHORT $L15057
002bf 8d 8e 30 06 00
00 lea ecx, DWORD PTR [esi+1584]
002c5 ff 15 00 00 00
00 call DWORD PTR __imp_@InterlockedDecrement@4
$L15057:
; 568 : SerialRemoveQueueDpc(&PDevExt->CommErrorDpc, PDevExt);
002cb 8d 86 8c 02 00
00 lea eax, DWORD PTR [esi+652]
002d1 50 push eax
002d2 ff d7 call edi
002d4 84 c0 test al, al
002d6 74 0c je SHORT $L15058
002d8 8d 8e 30 06 00
00 lea ecx, DWORD PTR [esi+1584]
002de ff 15 00 00 00
00 call DWORD PTR __imp_@InterlockedDecrement@4
$L15058:
; 569 : SerialRemoveQueueDpc(&PDevExt->CompleteImmediateDpc, PDevExt);
002e4 8d 86 cc 02 00
00 lea eax, DWORD PTR [esi+716]
002ea 50 push eax
002eb ff d7 call edi
002ed 84 c0 test al, al
002ef 74 0c je SHORT $L15059
002f1 8d 8e 30 06 00
00 lea ecx, DWORD PTR [esi+1584]
002f7 ff 15 00 00 00
00 call DWORD PTR __imp_@InterlockedDecrement@4
$L15059:
; 570 : SerialRemoveQueueDpc(&PDevExt->TotalImmediateTimeoutDpc, PDevExt);
002fd 8d 86 ec 02 00
00 lea eax, DWORD PTR [esi+748]
00303 50 push eax
00304 ff d7 call edi
00306 84 c0 test al, al
00308 74 0c je SHORT $L15060
0030a 8d 8e 30 06 00
00 lea ecx, DWORD PTR [esi+1584]
00310 ff 15 00 00 00
00 call DWORD PTR __imp_@InterlockedDecrement@4
$L15060:
; 571 : SerialRemoveQueueDpc(&PDevExt->CommWaitDpc, PDevExt);
00316 8d 86 ac 02 00
00 lea eax, DWORD PTR [esi+684]
0031c 50 push eax
0031d ff d7 call edi
0031f 84 c0 test al, al
00321 74 0c je SHORT $L15061
00323 8d 8e 30 06 00
00 lea ecx, DWORD PTR [esi+1584]
00329 ff 15 00 00 00
00 call DWORD PTR __imp_@InterlockedDecrement@4
$L15061:
; 572 : SerialRemoveQueueDpc(&PDevExt->XoffCountTimeoutDpc, PDevExt);
0032f 8d 86 0c 03 00
00 lea eax, DWORD PTR [esi+780]
00335 50 push eax
00336 ff d7 call edi
00338 84 c0 test al, al
0033a 74 0c je SHORT $L15062
0033c 8d 8e 30 06 00
00 lea ecx, DWORD PTR [esi+1584]
00342 ff 15 00 00 00
00 call DWORD PTR __imp_@InterlockedDecrement@4
$L15062:
; 573 : SerialRemoveQueueDpc(&PDevExt->XoffCountCompleteDpc, PDevExt);
00348 8d 86 2c 03 00
00 lea eax, DWORD PTR [esi+812]
0034e 50 push eax
0034f ff d7 call edi
00351 84 c0 test al, al
00353 74 0c je SHORT $L15063
00355 8d 8e 30 06 00
00 lea ecx, DWORD PTR [esi+1584]
0035b ff 15 00 00 00
00 call DWORD PTR __imp_@InterlockedDecrement@4
$L15063:
; 574 : SerialRemoveQueueDpc(&PDevExt->StartTimerLowerRTSDpc, PDevExt);
00361 8d 86 4c 03 00
00 lea eax, DWORD PTR [esi+844]
00367 50 push eax
00368 ff d7 call edi
0036a 84 c0 test al, al
0036c 74 0c je SHORT $L15064
0036e 8d 8e 30 06 00
00 lea ecx, DWORD PTR [esi+1584]
00374 ff 15 00 00 00
00 call DWORD PTR __imp_@InterlockedDecrement@4
$L15064:
; 575 : SerialRemoveQueueDpc(&PDevExt->PerhapsLowerRTSDpc, PDevExt);
0037a 8d 86 6c 03 00
00 lea eax, DWORD PTR [esi+876]
00380 50 push eax
00381 ff d7 call edi
00383 84 c0 test al, al
00385 74 0c je SHORT $L15065
00387 8d 8e 30 06 00
00 lea ecx, DWORD PTR [esi+1584]
0038d ff 15 00 00 00
00 call DWORD PTR __imp_@InterlockedDecrement@4
$L15065:
; 576 :
; 577 :
; 578 :
; 579 : //
; 580 : // If necessary, unmap the device registers.
; 581 : //
; 582 :
; 583 : if (PDevExt->UnMapRegisters) {
00393 80 be 9e 01 00
00 00 cmp BYTE PTR [esi+414], 0
0039a 8b 3d 00 00 00
00 mov edi, DWORD PTR __imp__MmUnmapIoSpace@8
003a0 74 0e je SHORT $L15066
; 584 : MmUnmapIoSpace(PDevExt->Controller, PDevExt->SpanOfController);
003a2 ff b6 44 01 00
00 push DWORD PTR [esi+324]
003a8 ff b6 98 00 00
00 push DWORD PTR [esi+152]
003ae ff d7 call edi
$L15066:
; 585 : }
; 586 :
; 587 : if (PDevExt->UnMapStatus) {
003b0 80 be 9f 01 00
00 00 cmp BYTE PTR [esi+415], 0
003b7 74 0e je SHORT $L15068
; 588 : MmUnmapIoSpace(PDevExt->InterruptStatus,
; 589 : PDevExt->SpanOfInterruptStatus);
003b9 ff b6 48 01 00
00 push DWORD PTR [esi+328]
003bf ff b6 9c 00 00
00 push DWORD PTR [esi+156]
003c5 ff d7 call edi
$L15068:
; 590 : }
; 591 :
; 592 : SerialDump(SERTRACECALLS,("SERIAL: Leave SerialReleaseResources\n"));
003c7 f6 05 00 00 00
00 40 test BYTE PTR _SerialDebugLevel, 64 ; 00000040H
003ce 5f pop edi
003cf 5e pop esi
003d0 74 0b je SHORT $L15069
003d2 68 00 00 00 00 push OFFSET FLAT:$SG15074
003d7 e8 00 00 00 00 call _DbgPrint
003dc 59 pop ecx
$L15069:
; 593 : }
003dd 5d pop ebp
003de c2 04 00 ret 4
_SerialReleaseResources@4 ENDP
PAGESRP0 ENDS
PUBLIC _SerialKillPendingIrps@4
PUBLIC _SerialPrepareRemove@4
EXTRN __imp__KeWaitForSingleObject@20:NEAR
EXTRN __imp__PoSetPowerState@12:NEAR
EXTRN _SerialSetDeviceFlags@16:NEAR
; COMDAT _SerialPrepareRemove@4
_TEXT SEGMENT
$SG15090 DB 'EX: Pageable code called at IRQL %d', 0aH, 00H
ORG $+3
$SG15093 DB 'f:\w2ddk\src\kernel\serial\initunlo.c', 00H
ORG $+2
$SG15094 DB 'FALSE', 00H
ORG $+2
$SG15101 DB 'SERIAL: Enter SerialPrepareRemove', 0aH, 00H
; Function compile flags: /Ogs
_PDevObj$ = 8
_SerialPrepareRemove@4 PROC NEAR ; COMDAT
; 614 : {
0007b 55 push ebp
0007c 8b ec mov ebp, esp
; 615 : PSERIAL_DEVICE_EXTENSION pDevExt
; 616 : = (PSERIAL_DEVICE_EXTENSION)PDevObj->DeviceExtension;
0007e 8b 45 08 mov eax, DWORD PTR _PDevObj$[ebp]
00081 56 push esi
00082 57 push edi
; 617 : POWER_STATE state;
; 618 : ULONG pendingIRPs;
; 619 :
; 620 : PAGED_CODE();
00083 8b 3d 00 00 00
00 mov edi, DWORD PTR __imp__KeGetCurrentIrql@0
00089 8b 70 28 mov esi, DWORD PTR [eax+40]
0008c ff d7 call edi
0008e 3c 01 cmp al, 1
00090 76 2c jbe SHORT $L16547
00092 ff d7 call edi
00094 0f b6 c0 movzx eax, al
00097 50 push eax
00098 68 00 00 00 00 push OFFSET FLAT:$SG15090
0009d e8 00 00 00 00 call _DbgPrint
000a2 59 pop ecx
000a3 33 ff xor edi, edi
000a5 59 pop ecx
000a6 57 push edi
000a7 68 6c 02 00 00 push 620 ; 0000026cH
000ac 68 00 00 00 00 push OFFSET FLAT:$SG15093
000b1 68 00 00 00 00 push OFFSET FLAT:$SG15094
000b6 ff 15 00 00 00
00 call DWORD PTR __imp__RtlAssert@16
000bc eb 02 jmp SHORT $L15095
$L16547:
000be 33 ff xor edi, edi
$L15095:
; 621 :
; 622 : SerialDump(SERTRACECALLS,("SERIAL: Enter SerialPrepareRemove\n"));
000c0 f6 05 00 00 00
00 40 test BYTE PTR _SerialDebugLevel, 64 ; 00000040H
000c7 74 0b je SHORT $L15096
000c9 68 00 00 00 00 push OFFSET FLAT:$SG15101
000ce e8 00 00 00 00 call _DbgPrint
000d3 59 pop ecx
$L15096:
; 623 :
; 624 : //
; 625 : // Mark as not accepting requests
; 626 : //
; 627 :
; 628 : SerialSetAccept(pDevExt, SERIAL_PNPACCEPT_REMOVING);
000d4 6a 01 push 1
000d6 8d 86 cc 04 00
00 lea eax, DWORD PTR [esi+1228]
000dc 6a 01 push 1
000de 50 push eax
000df 56 push esi
000e0 e8 00 00 00 00 call _SerialSetDeviceFlags@16
; 629 :
; 630 : //
; 631 : // Complete all pending requests
; 632 : //
; 633 :
; 634 : SerialKillPendingIrps(PDevObj);
000e5 ff 75 08 push DWORD PTR _PDevObj$[ebp]
000e8 e8 00 00 00 00 call _SerialKillPendingIrps@4
; 635 :
; 636 : //
; 637 : // Wait for any pending requests we raced on.
; 638 : //
; 639 :
; 640 : pendingIRPs = InterlockedDecrement(&pDevExt->PendingIRPCnt);
000ed 8d 8e c8 04 00
00 lea ecx, DWORD PTR [esi+1224]
000f3 ff 15 00 00 00
00 call DWORD PTR __imp_@InterlockedDecrement@4
; 641 :
; 642 : if (pendingIRPs) {
000f9 85 c0 test eax, eax
000fb 74 11 je SHORT $L15108
; 643 : KeWaitForSingleObject(&pDevExt->PendingIRPEvent, Executive, KernelMode,
; 644 : FALSE, NULL);
000fd 57 push edi
000fe 57 push edi
000ff 57 push edi
00100 81 c6 d0 04 00
00 add esi, 1232 ; 000004d0H
00106 57 push edi
00107 56 push esi
00108 ff 15 00 00 00
00 call DWORD PTR __imp__KeWaitForSingleObject@20
$L15108:
; 645 : }
; 646 :
; 647 : state.DeviceState = PowerDeviceD3;
0010e 6a 04 push 4
00110 58 pop eax
; 648 :
; 649 : PoSetPowerState(PDevObj, DevicePowerState, state);
00111 50 push eax
00112 6a 01 push 1
00114 ff 75 08 push DWORD PTR _PDevObj$[ebp]
00117 ff 15 00 00 00
00 call DWORD PTR __imp__PoSetPowerState@12
; 650 :
; 651 : return TRUE;
0011d 33 c0 xor eax, eax
0011f 5f pop edi
00120 40 inc eax
00121 5e pop esi
; 652 : }
00122 5d pop ebp
00123 c2 04 00 ret 4
_SerialPrepareRemove@4 ENDP
_TEXT ENDS
PUBLIC _SerialDisableInterfacesResources@8
EXTRN __imp__IoWMIRegistrationControl@8:NEAR
EXTRN __imp__WRITE_PORT_UCHAR@8:NEAR
EXTRN _SerialUndoExternalNaming@4:NEAR
; COMDAT _SerialDisableInterfacesResources@8
_TEXT SEGMENT
$SG15118 DB 'EX: Pageable code called at IRQL %d', 0aH, 00H
ORG $+3
$SG15121 DB 'f:\w2ddk\src\kernel\serial\initunlo.c', 00H
ORG $+2
$SG15122 DB 'FALSE', 00H
ORG $+2
$SG15129 DB 'SERIAL: Enter SerialDisableInterfaces', 0aH, 00H
ORG $+1
$SG15152 DB 'SERIAL: Exit SerialDisableInterfaces', 0aH, 00H
; Function compile flags: /Ogs
_PDevObj$ = 8
_DisableUART$ = 12
_SerialDisableInterfacesResources@8 PROC NEAR ; COMDAT
; 658 : {
000a6 55 push ebp
000a7 8b ec mov ebp, esp
; 659 : PSERIAL_DEVICE_EXTENSION pDevExt
; 660 : = (PSERIAL_DEVICE_EXTENSION)PDevObj->DeviceExtension;
000a9 8b 45 08 mov eax, DWORD PTR _PDevObj$[ebp]
000ac 56 push esi
; 661 :
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -