📄 immediat.cod
字号:
00187 59 pop ecx
$L14995:
; 379 :
; 380 : SerialCompleteRequest(Extension, OldIrp, IO_SERIAL_INCREMENT);
00188 8b 4d 08 mov ecx, DWORD PTR _OldIrp$[ebp]
0018b b2 02 mov dl, 2
0018d ff 15 00 00 00
00 call DWORD PTR __imp_@IofCompleteRequest@8
00193 57 push edi
00194 e8 00 00 00 00 call _SerialIRPEpilogue@4
00199 5f pop edi
0019a 5e pop esi
0019b 5b pop ebx
; 381 : }
0019c c9 leave
0019d c2 14 00 ret 20 ; 00000014H
_SerialGetNextImmediate@20 ENDP
PAGESER ENDS
; COMDAT _SerialCancelImmediate@8
PAGESER SEGMENT
$SG15014 DB 'SERIAL: Pageable code called at IRQL %d without lock ', 0aH
DB 00H
ORG $+1
$SG15017 DB 'f:\w2ddk\src\kernel\serial\immediat.c', 00H
ORG $+2
$SG15018 DB 'FALSE', 00H
; Function compile flags: /Ogs
_DeviceObject$ = 8
_Irp$ = 12
_SerialCancelImmediate@8 PROC NEAR ; COMDAT
; 408 : {
00066 55 push ebp
00067 8b ec mov ebp, esp
; 409 :
; 410 : PSERIAL_DEVICE_EXTENSION Extension = DeviceObject->DeviceExtension;
00069 8b 45 08 mov eax, DWORD PTR _DeviceObject$[ebp]
0006c 53 push ebx
0006d 56 push esi
0006e 57 push edi
; 411 : SERIAL_LOCKED_PAGED_CODE();
0006f 8b 3d 00 00 00
00 mov edi, DWORD PTR __imp__KeGetCurrentIrql@0
00075 8b 70 28 mov esi, DWORD PTR [eax+40]
00078 ff d7 call edi
0007a 33 db xor ebx, ebx
0007c 3c 01 cmp al, 1
0007e 76 30 jbe SHORT $L15015
00080 39 1d 14 00 00
00 cmp DWORD PTR _SerialGlobals+20, ebx
00086 75 28 jne SHORT $L15015
00088 ff d7 call edi
0008a 0f b6 c0 movzx eax, al
0008d 50 push eax
0008e 68 00 00 00 00 push OFFSET FLAT:$SG15014
00093 e8 00 00 00 00 call _DbgPrint
00098 59 pop ecx
00099 59 pop ecx
0009a 53 push ebx
0009b 68 9b 01 00 00 push 411 ; 0000019bH
000a0 68 00 00 00 00 push OFFSET FLAT:$SG15017
000a5 68 00 00 00 00 push OFFSET FLAT:$SG15018
000aa ff 15 00 00 00
00 call DWORD PTR __imp__RtlAssert@16
$L15015:
; 412 :
; 413 : SerialTryToCompleteCurrent(
; 414 : Extension,
; 415 : SerialGrabImmediateFromIsr,
; 416 : Irp->CancelIrql,
; 417 : STATUS_CANCELLED,
; 418 : &Extension->CurrentImmediateIrp,
; 419 : NULL,
; 420 : NULL,
; 421 : &Extension->ImmediateTotalTimer,
; 422 : NULL,
; 423 : SerialGetNextImmediate,
; 424 : SERIAL_REF_CANCEL
; 425 : );
000b0 6a 02 push 2
000b2 68 00 00 00 00 push OFFSET FLAT:_SerialGetNextImmediate@20
000b7 8d 86 28 04 00
00 lea eax, DWORD PTR [esi+1064]
000bd 53 push ebx
000be 50 push eax
000bf 53 push ebx
000c0 8d 86 d8 00 00
00 lea eax, DWORD PTR [esi+216]
000c6 53 push ebx
000c7 50 push eax
000c8 8b 45 0c mov eax, DWORD PTR _Irp$[ebp]
000cb 68 20 01 00 c0 push -1073741536 ; c0000120H
000d0 8a 40 25 mov al, BYTE PTR [eax+37]
000d3 50 push eax
000d4 68 00 00 00 00 push OFFSET FLAT:_SerialGrabImmediateFromIsr@4
000d9 56 push esi
000da e8 00 00 00 00 call _SerialTryToCompleteCurrent@44
000df 5f pop edi
000e0 5e pop esi
000e1 5b pop ebx
; 426 :
; 427 : }
000e2 5d pop ebp
000e3 c2 08 00 ret 8
_SerialCancelImmediate@8 ENDP
PAGESER ENDS
EXTRN __imp__WRITE_PORT_UCHAR@8:NEAR
; COMDAT _SerialGiveImmediateToIsr@4
PAGESER SEGMENT
$SG15028 DB 'SERIAL: Pageable code called at IRQL %d without lock ', 0aH
DB 00H
ORG $+1
$SG15031 DB 'f:\w2ddk\src\kernel\serial\immediat.c', 00H
ORG $+2
$SG15032 DB 'FALSE', 00H
ORG $+2
$SG15042 DB 'f:\w2ddk\src\kernel\serial\immediat.c', 00H
ORG $+2
$SG15043 DB '!(*_arg4 & _refType)', 00H
; Function compile flags: /Ogs
_Context$ = 8
_SerialGiveImmediateToIsr@4 PROC NEAR ; COMDAT
; 459 : {
000a5 55 push ebp
000a6 8b ec mov ebp, esp
000a8 53 push ebx
000a9 56 push esi
; 460 :
; 461 : PSERIAL_DEVICE_EXTENSION Extension = Context;
; 462 : SERIAL_LOCKED_PAGED_CODE();
000aa 8b 35 00 00 00
00 mov esi, DWORD PTR __imp__KeGetCurrentIrql@0
000b0 57 push edi
000b1 ff d6 call esi
000b3 8b 1d 00 00 00
00 mov ebx, DWORD PTR __imp__RtlAssert@16
000b9 3c 01 cmp al, 1
000bb 76 2e jbe SHORT $L15029
000bd 83 3d 14 00 00
00 00 cmp DWORD PTR _SerialGlobals+20, 0
000c4 75 25 jne SHORT $L15029
000c6 ff d6 call esi
000c8 0f b6 c0 movzx eax, al
000cb 50 push eax
000cc 68 00 00 00 00 push OFFSET FLAT:$SG15028
000d1 e8 00 00 00 00 call _DbgPrint
000d6 59 pop ecx
000d7 59 pop ecx
000d8 6a 00 push 0
000da 68 ce 01 00 00 push 462 ; 000001ceH
000df 68 00 00 00 00 push OFFSET FLAT:$SG15031
000e4 68 00 00 00 00 push OFFSET FLAT:$SG15032
000e9 ff d3 call ebx
$L15029:
; 463 :
; 464 : Extension->TransmitImmediate = TRUE;
000eb 8b 7d 08 mov edi, DWORD PTR _Context$[ebp]
; 465 : Extension->ImmediateChar =
; 466 : *((UCHAR *)
; 467 : (Extension->CurrentImmediateIrp->AssociatedIrp.SystemBuffer));
000ee 8b 87 d8 00 00
00 mov eax, DWORD PTR [edi+216]
000f4 c6 87 a1 01 00
00 01 mov BYTE PTR [edi+417], 1
000fb 8b 48 0c mov ecx, DWORD PTR [eax+12]
000fe 8a 09 mov cl, BYTE PTR [ecx]
00100 88 8f d8 01 00
00 mov BYTE PTR [edi+472], cl
; 468 :
; 469 : //
; 470 : // The isr now has a reference to the irp.
; 471 : //
; 472 :
; 473 : SERIAL_SET_REFERENCE(
; 474 : Extension->CurrentImmediateIrp,
; 475 : SERIAL_REF_ISR
; 476 : );
00106 8b 70 60 mov esi, DWORD PTR [eax+96]
00109 83 c6 10 add esi, 16 ; 00000010H
0010c f6 06 01 test BYTE PTR [esi], 1
0010f 74 13 je SHORT $L15040
00111 6a 00 push 0
00113 68 dc 01 00 00 push 476 ; 000001dcH
00118 68 00 00 00 00 push OFFSET FLAT:$SG15042
0011d 68 00 00 00 00 push OFFSET FLAT:$SG15043
00122 ff d3 call ebx
$L15040:
00124 83 0e 01 or DWORD PTR [esi], 1
; 477 :
; 478 : //
; 479 : // Check first to see if a write is going on. If
; 480 : // there is then we'll just slip in during the write.
; 481 : //
; 482 :
; 483 : if (!Extension->WriteLength) {
00127 83 bf e0 00 00
00 00 cmp DWORD PTR [edi+224], 0
0012e 75 25 jne SHORT $L15055
; 484 :
; 485 : //
; 486 : // If there is no normal write transmitting then we
; 487 : // will "re-enable" the transmit holding register empty
; 488 : // interrupt. The 8250 family of devices will always
; 489 : // signal a transmit holding register empty interrupt
; 490 : // *ANY* time this bit is set to one. By doing things
; 491 : // this way we can simply use the normal interrupt code
; 492 : // to start off this write.
; 493 : //
; 494 : // We've been keeping track of whether the transmit holding
; 495 : // register is empty so it we only need to do this
; 496 : // if the register is empty.
; 497 : //
; 498 :
; 499 : if (Extension->HoldingEmpty) {
00130 80 bf a0 01 00
00 00 cmp BYTE PTR [edi+416], 0
00137 74 1c je SHORT $L15055
; 500 :
; 501 : DISABLE_ALL_INTERRUPTS(Extension->Controller);
00139 8d b7 98 00 00
00 lea esi, DWORD PTR [edi+152]
0013f 8b 3d 00 00 00
00 mov edi, DWORD PTR __imp__WRITE_PORT_UCHAR@8
00145 6a 00 push 0
00147 8b 06 mov eax, DWORD PTR [esi]
00149 40 inc eax
0014a 50 push eax
0014b ff d7 call edi
; 502 : ENABLE_ALL_INTERRUPTS(Extension->Controller);
0014d 8b 06 mov eax, DWORD PTR [esi]
0014f 6a 0f push 15 ; 0000000fH
00151 40 inc eax
00152 50 push eax
00153 ff d7 call edi
$L15055:
00155 5f pop edi
00156 5e pop esi
; 503 :
; 504 : }
; 505 :
; 506 : }
; 507 :
; 508 : return FALSE;
00157 32 c0 xor al, al
00159 5b pop ebx
; 509 :
; 510 : }
0015a 5d pop ebp
0015b c2 04 00 ret 4
_SerialGiveImmediateToIsr@4 ENDP
PAGESER ENDS
; COMDAT _SerialGrabImmediateFromIsr@4
PAGESER SEGMENT
$SG15066 DB 'SERIAL: Pageable code called at IRQL %d without lock ', 0aH
DB 00H
ORG $+1
$SG15069 DB 'f:\w2ddk\src\kernel\serial\immediat.c', 00H
ORG $+2
$SG15070 DB 'FALSE', 00H
ORG $+2
$SG15080 DB 'f:\w2ddk\src\kernel\serial\immediat.c', 00H
ORG $+2
$SG15081 DB '*_arg4 & _refType', 00H
; Function compile flags: /Ogs
_Context$ = 8
_SerialGrabImmediateFromIsr@4 PROC NEAR ; COMDAT
; 540 : {
000a2 55 push ebp
000a3 8b ec mov ebp, esp
000a5 53 push ebx
000a6 56 push esi
; 541 :
; 542 : PSERIAL_DEVICE_EXTENSION Extension = Context;
; 543 : SERIAL_LOCKED_PAGED_CODE();
000a7 8b 35 00 00 00
00 mov esi, DWORD PTR __imp__KeGetCurrentIrql@0
000ad 57 push edi
000ae ff d6 call esi
000b0 8b 3d 00 00 00
00 mov edi, DWORD PTR __imp__RtlAssert@16
000b6 33 db xor ebx, ebx
000b8 3c 01 cmp al, 1
000ba 76 2c jbe SHORT $L15067
000bc 39 1d 14 00 00
00 cmp DWORD PTR _SerialGlobals+20, ebx
000c2 75 24 jne SHORT $L15067
000c4 ff d6 call esi
000c6 0f b6 c0 movzx eax, al
000c9 50 push eax
000ca 68 00 00 00 00 push OFFSET FLAT:$SG15066
000cf e8 00 00 00 00 call _DbgPrint
000d4 59 pop ecx
000d5 59 pop ecx
000d6 53 push ebx
000d7 68 1f 02 00 00 push 543 ; 0000021fH
000dc 68 00 00 00 00 push OFFSET FLAT:$SG15069
000e1 68 00 00 00 00 push OFFSET FLAT:$SG15070
000e6 ff d7 call edi
$L15067:
; 544 :
; 545 : if (Extension->TransmitImmediate) {
000e8 8b 4d 08 mov ecx, DWORD PTR _Context$[ebp]
000eb 8d 81 a1 01 00
00 lea eax, DWORD PTR [ecx+417]
000f1 38 18 cmp BYTE PTR [eax], bl
000f3 74 28 je SHORT $L15074
; 546 :
; 547 : Extension->TransmitImmediate = FALSE;
000f5 88 18 mov BYTE PTR [eax], bl
; 548 :
; 549 : //
; 550 : // Since the isr no longer references this irp, we can
; 551 : // decrement it's reference count.
; 552 : //
; 553 :
; 554 : SERIAL_CLEAR_REFERENCE(
; 555 : Extension->CurrentImmediateIrp,
; 556 : SERIAL_REF_ISR
; 557 : );
000f7 8b 81 d8 00 00
00 mov eax, DWORD PTR [ecx+216]
000fd 8b 70 60 mov esi, DWORD PTR [eax+96]
00100 83 c6 10 add esi, 16 ; 00000010H
00103 f6 06 01 test BYTE PTR [esi], 1
00106 75 12 jne SHORT $L15078
00108 53 push ebx
00109 68 2d 02 00 00 push 557 ; 0000022dH
0010e 68 00 00 00 00 push OFFSET FLAT:$SG15080
00113 68 00 00 00 00 push OFFSET FLAT:$SG15081
00118 ff d7 call edi
$L15078:
0011a 83 26 fe and DWORD PTR [esi], -2 ; fffffffeH
$L15074:
0011d 5f pop edi
0011e 5e pop esi
; 558 :
; 559 : }
; 560 :
; 561 : return FALSE;
0011f 32 c0 xor al, al
00121 5b pop ebx
; 562 :
; 563 : }
00122 5d pop ebp
00123 c2 04 00 ret 4
_SerialGrabImmediateFromIsr@4 ENDP
PAGESER ENDS
END
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -