Changeset 12100 in vbox for trunk/src/VBox/HostDrivers/Support/win/SUPDrvA-win.asm
- Timestamp:
- Sep 4, 2008 5:56:28 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/win/SUPDrvA-win.asm
r12000 r12100 54 54 55 55 %ifdef SUPDRV_WITH_UNWIND_HACK 56 %if 0 ; def RT_ARCH_AMD64 56 %ifdef RT_ARCH_AMD64 57 58 ;; 59 ; Common prolog, take the proc name as argument. 60 ; This creates a 0x80 byte stack frame. 61 ; 62 %macro NtWrapProlog 1 63 [proc_frame %1] 64 push rbp 65 [pushreg rbp] 66 mov rbp, rsp 67 [setframe rbp, 0] 68 sub rsp, 0x80 69 [allocstack 0x80] 70 71 ; save rdi and load rbp into it 72 mov [rbp - 8h], rdi 73 [savereg rdi, 0x78] 74 mov rdi, rbp 75 [endprolog] 76 %endmacro 77 78 ;; 79 ; Common epilog, take the proc name as argument. 80 %macro NtWrapEpilog 1 81 ; restore rbp and rdi then return. 82 mov rbp, rdi 83 mov rdi, [rdi - 8h] 84 leave 85 ret 86 [endproc_frame %1] 87 %endmacro 88 89 ;; 90 ; Create a stack marker with the rbp. The marker is 32 byte big. 91 ; This is 32-byte aligned and 32 byte in size. 92 ; 93 ; Trashes r10 94 %macro NtWrapCreateMarker 0 95 lea r10, [rbp - 30h] 96 and r10, ~1fh ; 32-byte align it. 97 mov dword [r10 ], 0x20080901 98 mov dword [r10 + 04h], 0x20080902 99 mov qword [r10 + 08h], rbp 100 mov dword [r10 + 10h], 0x20080903 101 mov dword [r10 + 14h], 0x20080904 102 mov qword [r10 + 18h], rbp 103 %endmacro 104 105 ;; 106 ; Destroys the stack marker. 107 ; 108 ; Trashes r10 109 %macro NtWrapDestroyMarker 0 110 lea r10, [rbp - 30h] 111 and r10, ~1fh ; 32-byte align it. 112 mov [r10 ], rbp 113 mov [r10 + 08h], rbp 114 mov [r10 + 10h], rbp 115 mov [r10 + 18h], rbp 116 %endmacro 117 118 ;; 119 ; Find the stack marker with the rbp of the entry frame. 120 ; 121 ; Search the current stack page inline, call a helper function 122 ; which does a safe search of any further stack pages. 123 ; 124 ; Trashes rax, r10 and r11. 125 ; Modifies rbp 126 ; 127 %macro NtWrapLocateMarker 0 128 mov rax, rbp 129 and rax, ~1fh ; 32-byte align it. 130 131 ; 132 ; Calc remainig space in the current page. If we're on a 133 ; page boundrary, we'll search the entire previous page. 134 ; 135 mov r10, rax 136 neg r10 137 and r10, 0fffh 138 inc r10 139 shr r10, 5 ; /= 32 bytes 140 jz %%not_found ; If zero, take the slow path 141 142 ; 143 ; The search loop. 144 ; 145 %%again: 146 dec r10 147 lea rax, [rax + 20h] 148 jz %%not_found 149 cmp dword [rax ], 0x20080901 150 je %%candidate 151 jmp %%again 152 153 %%not_found: 154 call NAME(NtWrapLocateMarkerHelper) 155 jmp %%done 156 157 %%candidate: 158 cmp dword [rax + 04h], 0x20080902 159 jne %%again 160 cmp dword [rax + 10h], 0x20080903 161 jne %%again 162 cmp dword [rax + 14h], 0x20080904 163 jne %%again 164 mov r11, [rax + 08h] 165 cmp r11, [rax + 18h] 166 jne %%again 167 168 ; found it, change rbp. 169 mov rbp, r11 170 %%done: 171 %endmacro 172 173 ;; 174 ; Wraps a function with 4 or less argument that will go into registers. 175 %macro NtWrapFunctionWithAllRegParams 1 176 extern NAME(%1) 177 BEGINPROC supdrvNtWrap%1 178 NtWrapProlog supdrvNtWrap%1 179 NtWrapLocateMarker 180 181 call NAME(%1) 182 183 NtWrapEpilog supdrvNtWrap%1 184 ENDPROC supdrvNtWrap%1 185 %endmacro 186 187 ;; 188 ; Wraps a function with 5 argument, where the first 4 goes into registers. 189 %macro NtWrapFunctionWith5Params 1 190 extern NAME(%1) 191 BEGINPROC supdrvNtWrap%1 192 NtWrapProlog supdrvNtWrap%1 193 NtWrapLocateMarker 194 195 mov r11, [rdi + 30h] 196 mov [rsp + 20h], r11 197 call NAME(%1) 198 199 NtWrapEpilog supdrvNtWrap%1 200 ENDPROC supdrvNtWrap%1 201 %endmacro 202 203 ;; 204 ; Wraps a function with 6 argument, where the first 4 goes into registers. 205 %macro NtWrapFunctionWith6Params 1 206 extern NAME(%1) 207 BEGINPROC supdrvNtWrap%1 208 NtWrapProlog supdrvNtWrap%1 209 NtWrapLocateMarker 210 211 mov r11, [rdi + 30h] 212 mov [rsp + 20h], r11 213 mov r10, [rdi + 38h] 214 mov [rsp + 28h], r10 215 call NAME(%1) 216 217 NtWrapEpilog supdrvNtWrap%1 218 ENDPROC supdrvNtWrap%1 219 %endmacro 220 221 ;; 222 ; Wraps a function with 7 argument, where the first 4 goes into registers. 223 %macro NtWrapFunctionWith7Params 1 224 extern NAME(%1) 225 BEGINPROC supdrvNtWrap%1 226 NtWrapProlog supdrvNtWrap%1 227 NtWrapLocateMarker 228 229 mov r11, [rdi + 30h] 230 mov [rsp + 20h], r11 231 mov r10, [rdi + 38h] 232 mov [rsp + 28h], r10 233 mov rax, [rdi + 40h] 234 mov [rsp + 30h], rax 235 call NAME(%1) 236 237 NtWrapEpilog supdrvNtWrap%1 238 ENDPROC supdrvNtWrap%1 239 %endmacro 240 241 extern IoGetStackLimits 242 243 ;; 244 ; Helper that cautiously continues the stack marker search 245 ; NtWrapLocateMarker started. 246 ; 247 ; The stack layout at the time is something like this. 248 ; rbp+08h callers return address. 249 ; rbp-00h saved rbp 250 ; rbp-08h saved rdi 251 ; rbp-09h 252 ; thru unused. 253 ; rbp-80h 254 ; rbp-88h our return address. 255 ; rbp-89h 256 ; thru callee register dump zone. 257 ; rbp-a0h 258 ; 259 ; @param rax Current stack location. 260 ; @param rdi Parent stack frame pointer. (This should equal rbp on entry.) 261 ; 262 ; Trashes: rax, r10, r11. 263 ; Will use the callers stack frame for register saving ASSUMING that 264 ; rbp-80h thru rbp-09h is unused. 265 ; 266 ; Modifies: rbp 267 ; 268 BEGINPROC NtWrapLocateMarkerHelper 269 ; 270 ; Prolog. Save volatile regs and reserve callee space. 271 ; 272 sub rsp, 20h ; For IoGetStackLimits(). 273 mov [rdi - 80h], rax 274 mov [rdi - 78h], rcx 275 mov [rdi - 70h], rdx 276 mov [rdi - 68h], r8 277 mov [rdi - 60h], r9 278 279 ; 280 ; Call VOID IoGetStackLimits(OUT PULONG_PTR LowLimit, OUT PULONG_PTR HighLimit); 281 ; 282 ; Use rdi-40h for the high limit and rdi-50h for the low one, we're only 283 ; interested in the high one. 284 ; 285 lea rcx, [rdi - 40h] ; arg #1 LowLimit 286 lea rdx, [rdi - 50h] ; arg #2 HighLimit 287 mov [rdx], eax ; paranoia - init to end of current search. 288 call IoGetStackLimits 289 290 ; 291 ; Move the top address into r10, restore rax and continue 292 ; the search. Check that r10 is less than 3 pages from rax. 293 ; 294 mov rax, [rdi - 80h] ; Restore eax (see prolog) 295 mov r10, [rdi - 50h] ; HighLimit 296 and r10, ~1fh ; 32-byte align it (downwards) 297 sub r10, rax 298 jz .not_found ; If already at the top of the stack. 299 cmp r10, 3000h 300 jae .out_of_bounds ; If too far away, something is busted. 301 shr r10, 5 ; /= 32. 302 303 ; The loop body. 304 .search_loop: 305 cmp dword [rax ], 0x20080901 306 je .candidate 307 .continue_searching: 308 dec r10 309 jz .not_found 310 lea rax, [rax + 20h] 311 jmp .search_loop 312 313 ; Found the first marker, check for the rest. 314 .candidate: 315 cmp dword [rax + 04h], 0x20080902 316 jne .continue_searching 317 cmp dword [rax + 10h], 0x20080903 318 jne .continue_searching 319 cmp dword [rax + 14h], 0x20080904 320 jne .continue_searching 321 mov r11, [rax + 08h] 322 cmp r11, [rax + 18h] 323 jne .continue_searching 324 325 ; found it, change rbp. 326 mov rbp, r11 327 328 ; 329 ; Restore registers and pop the stack frame. 330 ; 331 .epilog: 332 mov r9, [rdi - 60h] 333 mov r8, [rdi - 68h] 334 mov rdx, [rdi - 70h] 335 mov rcx, [rdi - 78h] 336 ; mov rax, [rdi - 80h] 337 add rsp, 20h 338 ret 339 340 ; 341 ; Needless to say, this isn't supposed to happen. Thus the int3. 342 ; Note down r10 and rax. 343 ; 344 .out_of_bounds: 345 %ifdef DEBUG 346 int3 347 %endif 348 .not_found: 349 %ifdef DEBUG 350 int3 351 %endif 352 jmp .epilog 353 ENDPROC NtWrapLocateMarkerHelper 354 355 356 357 ; 358 ; This has the same order as the list in SUPDrv.c 359 ; 360 NtWrapFunctionWithAllRegParams SUPR0ComponentRegisterFactory 361 NtWrapFunctionWithAllRegParams SUPR0ComponentDeregisterFactory 362 NtWrapFunctionWithAllRegParams SUPR0ComponentQueryFactory 363 NtWrapFunctionWith5Params SUPR0ObjRegister 364 NtWrapFunctionWithAllRegParams SUPR0ObjAddRef 365 NtWrapFunctionWithAllRegParams SUPR0ObjRelease 366 NtWrapFunctionWithAllRegParams SUPR0ObjVerifyAccess 367 NtWrapFunctionWithAllRegParams SUPR0LockMem 368 NtWrapFunctionWithAllRegParams SUPR0UnlockMem 369 NtWrapFunctionWith5Params SUPR0ContAlloc 370 NtWrapFunctionWithAllRegParams SUPR0ContFree 371 NtWrapFunctionWith5Params SUPR0LowAlloc 372 NtWrapFunctionWithAllRegParams SUPR0LowFree 373 NtWrapFunctionWithAllRegParams SUPR0MemAlloc 374 NtWrapFunctionWithAllRegParams SUPR0MemGetPhys 375 NtWrapFunctionWithAllRegParams SUPR0MemFree 376 NtWrapFunctionWithAllRegParams SUPR0PageAlloc 377 NtWrapFunctionWithAllRegParams SUPR0PageFree 378 ;NtWrapFunctionWithAllRegParams SUPR0Printf - cannot wrap this buster. 379 NtWrapFunctionWithAllRegParams RTMemAlloc 380 NtWrapFunctionWithAllRegParams RTMemAllocZ 381 NtWrapFunctionWithAllRegParams RTMemFree 382 NtWrapFunctionWithAllRegParams RTMemDup 383 NtWrapFunctionWithAllRegParams RTMemDupEx 384 NtWrapFunctionWithAllRegParams RTMemRealloc 385 NtWrapFunctionWithAllRegParams RTR0MemObjAllocLow 386 NtWrapFunctionWithAllRegParams RTR0MemObjAllocPage 387 NtWrapFunctionWithAllRegParams RTR0MemObjAllocPhys 388 NtWrapFunctionWithAllRegParams RTR0MemObjAllocPhysNC 389 NtWrapFunctionWithAllRegParams RTR0MemObjAllocCont 390 NtWrapFunctionWithAllRegParams RTR0MemObjLockUser 391 NtWrapFunctionWith5Params RTR0MemObjMapKernel 392 NtWrapFunctionWith6Params RTR0MemObjMapUser 393 NtWrapFunctionWithAllRegParams RTR0MemObjAddress 394 NtWrapFunctionWithAllRegParams RTR0MemObjAddressR3 395 NtWrapFunctionWithAllRegParams RTR0MemObjSize 396 NtWrapFunctionWithAllRegParams RTR0MemObjIsMapping 397 NtWrapFunctionWithAllRegParams RTR0MemObjGetPagePhysAddr 398 NtWrapFunctionWithAllRegParams RTR0MemObjFree 399 ;NtWrapFunctionWithAllRegParams RTProcSelf - not necessary 400 ;NtWrapFunctionWithAllRegParams RTR0ProcHandleSelf - not necessary 401 NtWrapFunctionWithAllRegParams RTSemFastMutexCreate 402 NtWrapFunctionWithAllRegParams RTSemFastMutexDestroy 403 NtWrapFunctionWithAllRegParams RTSemFastMutexRequest 404 NtWrapFunctionWithAllRegParams RTSemFastMutexRelease 405 NtWrapFunctionWithAllRegParams RTSemEventCreate 406 NtWrapFunctionWithAllRegParams RTSemEventSignal 407 NtWrapFunctionWithAllRegParams RTSemEventWait 408 NtWrapFunctionWithAllRegParams RTSemEventWaitNoResume 409 NtWrapFunctionWithAllRegParams RTSemEventDestroy 410 NtWrapFunctionWithAllRegParams RTSemEventMultiCreate 411 NtWrapFunctionWithAllRegParams RTSemEventMultiSignal 412 NtWrapFunctionWithAllRegParams RTSemEventMultiReset 413 NtWrapFunctionWithAllRegParams RTSemEventMultiWait 414 NtWrapFunctionWithAllRegParams RTSemEventMultiWaitNoResume 415 NtWrapFunctionWithAllRegParams RTSemEventMultiDestroy 416 NtWrapFunctionWithAllRegParams RTSpinlockCreate 417 NtWrapFunctionWithAllRegParams RTSpinlockDestroy 418 NtWrapFunctionWithAllRegParams RTSpinlockAcquire 419 NtWrapFunctionWithAllRegParams RTSpinlockRelease 420 NtWrapFunctionWithAllRegParams RTSpinlockAcquireNoInts 421 NtWrapFunctionWithAllRegParams RTSpinlockReleaseNoInts 422 ;NtWrapFunctionWithAllRegParams RTTimeNanoTS - not necessary 423 ;NtWrapFunctionWithAllRegParams RTTimeMilliTS - not necessary 424 ;NtWrapFunctionWithAllRegParams RTTimeSystemNanoTS - not necessary 425 ;NtWrapFunctionWithAllRegParams RTTimeSystemMilliTS - not necessary 426 ;NtWrapFunctionWithAllRegParams RTThreadNativeSelf - not necessary 427 NtWrapFunctionWithAllRegParams RTThreadSleep 428 NtWrapFunctionWithAllRegParams RTThreadYield 429 %if 0 ; Thread APIs, Part 2 430 ;NtWrapFunctionWithAllRegParams RTThreadSelf 431 NtWrapFunctionWith7Params RTThreadCreate 432 NtWrapFunctionWithAllRegParams RTThreadGetNative 433 NtWrapFunctionWithAllRegParams RTThreadWait 434 NtWrapFunctionWithAllRegParams RTThreadWaitNoResume 435 NtWrapFunctionWithAllRegParams RTThreadGetName 436 NtWrapFunctionWithAllRegParams RTThreadSelfName 437 NtWrapFunctionWithAllRegParams RTThreadGetType 438 NtWrapFunctionWithAllRegParams RTThreadUserSignal 439 NtWrapFunctionWithAllRegParams RTThreadUserReset 440 NtWrapFunctionWithAllRegParams RTThreadUserWait 441 NtWrapFunctionWithAllRegParams RTThreadUserWaitNoResume 442 %endif 443 ;NtWrapFunctionWithAllRegParams RTLogDefaultInstance - a bit of a gamble, but we do not want the overhead! 444 ;NtWrapFunctionWithAllRegParams RTMpCpuId - not necessary 445 ;NtWrapFunctionWithAllRegParams RTMpCpuIdFromSetIndex - not necessary 446 ;NtWrapFunctionWithAllRegParams RTMpCpuIdToSetIndex - not necessary 447 ;NtWrapFunctionWithAllRegParams RTMpIsCpuPossible - not necessary 448 ;NtWrapFunctionWithAllRegParams RTMpGetCount - not necessary 449 ;NtWrapFunctionWithAllRegParams RTMpGetMaxCpuId - not necessary 450 ;NtWrapFunctionWithAllRegParams RTMpGetOnlineCount - not necessary 451 ;NtWrapFunctionWithAllRegParams RTMpGetOnlineSet - not necessary 452 ;NtWrapFunctionWithAllRegParams RTMpGetSet - not necessary 453 ;NtWrapFunctionWithAllRegParams RTMpIsCpuOnline - not necessary 454 NtWrapFunctionWithAllRegParams RTMpOnAll 455 NtWrapFunctionWithAllRegParams RTMpOnOthers 456 NtWrapFunctionWithAllRegParams RTMpOnSpecific 457 ;NtWrapFunctionWithAllRegParams RTLogRelDefaultInstance - not necessary. 458 NtWrapFunctionWithAllRegParams RTLogSetDefaultInstanceThread 459 ;NtWrapFunctionWithAllRegParams RTLogLogger - can't wrap this buster. 460 ;NtWrapFunctionWithAllRegParams RTLogLoggerEx - can't wrap this buster. 461 NtWrapFunctionWithAllRegParams RTLogLoggerExV 462 ;NtWrapFunctionWithAllRegParams RTLogPrintf - can't wrap this buster. ;; @todo provide va_list log wrappers in RuntimeR0. 463 NtWrapFunctionWithAllRegParams RTLogPrintfV 464 NtWrapFunctionWithAllRegParams AssertMsg1 465 ;NtWrapFunctionWithAllRegParams AssertMsg2 - can't wrap this buster. 466 467 57 468 ;; 58 469 ; @cproto DECLASM(int) supdrvNtWrapVMMR0EntryEx(PFNRT pfnVMMR0EntryEx, PVM pVM, unsigned uOperation, PSUPVMMR0REQHDR pReq, uint64_t u64Arg, PSUPDRVSESSION pSession); … … 66 477 ; 67 478 BEGINPROC supdrvNtWrapVMMR0EntryEx 68 [proc_frame supdrvNtWrapVMMR0EntryEx] 69 push rbp 70 [pushreg rbp] 71 mov rbp, rsp 72 [setframe rbp,0] 73 sub rsp, 80h 74 [allocstack 0x80] 75 ;; @todo save more regs? 76 [endprolog] 77 78 ; 79 ; Create a stack marker with the rbp. The marker is 32 byte big. 80 ; This is 32-byte aligned and 32 byte in size. 81 ; 82 lea r10, [rbp - 30h] 83 and r10, ~1fh ; 32-byte align it. 84 mov dword [r10 ], 0x20080901 85 mov dword [r10 + 4], 0x20080902 86 mov qword [r10 + 8], rbp 87 mov dword [r10 +16], 0x20080903 88 mov dword [r10 +20], 0x20080904 89 mov qword [r10 +24], rbp 90 91 ; 92 ; Forward the call. 93 ; 479 NtWrapProlog supdrvNtWrapVMMR0EntryEx 480 NtWrapCreateMarker 481 94 482 mov rax, rcx 95 483 mov rcx, rdx … … 101 489 call rax 102 490 103 ; 104 ; Trash the stack marker. 105 ; 106 lea r10, [rbp - 30h] 107 and r10, ~1fh ; 32-byte align it. 108 mov qword [r10 ], rax 109 mov qword [r10 + 8], rax 110 mov qword [r10 +16], rax 111 mov qword [r10 +24], rax 112 113 leave 114 ret 115 [endproc_frame supdrvNtWrapVMMR0EntryEx] 491 NtWrapDestroyMarker 492 NtWrapEpilog supdrvNtWrapVMMR0EntryEx 116 493 ENDPROC supdrvNtWrapVMMR0EntryEx 117 494 118 495 119 extern RTSemEventMultiWaitNoResume 120 121 ;; 122 ; @cproto DECLASM(int) supdrvNtWrapRTSemEventMultiWaitNoResume(RTSEMEVENTMULTI EventMultiSem, unsigned cMillies); 123 ; 124 ; @param EventMultiSem rcx 125 ; @param cMillies rdx 126 ; 127 BEGINPROC supdrvNtWrapRTSemEventMultiWaitNoResume 128 [proc_frame supdrvNtWrapRTSemEventMultiWaitNoResume] 129 push rbp 130 [pushreg rbp] 131 mov rbp, rsp 132 [setframe rbp,0] 133 sub rsp, 40h 134 [allocstack 0x40] 135 mov [rbp - 8h], rdi 136 [savereg rdi, 0x38] 137 ;; @todo save more? 138 ;mov [rbp - 10h], rsi 139 ;[savereg rsi, 0x30] 140 [endprolog] 141 142 ; 143 ; Find the stack marker with the rbp of the entry frame. 144 ; Search a maximum of 4096 bytes. 145 ; 146 mov rax, rbp 147 and rax, ~1fh ; 32-byte align it. 148 mov r10, 1000h / 20h 149 .again: 150 dec r10 151 jz .not_found 152 add rax, 20h 153 154 cmp dword [rax], 0x20080901 155 jne .again 156 cmp dword [rax + 4], 0x20080902 157 jne .again 158 cmp dword [rax + 16], 0x20080903 159 jne .again 160 cmp dword [rax + 20], 0x20080904 161 jne .again 162 mov r11, [rax + 8] 163 cmp r11, [rax + 24] 164 jne .again 165 166 ; found it, change rbp. 167 mov rdi, rbp 168 mov rbp, r11 169 170 ; 171 ; Forward the call. 172 ; 173 .resume: 174 call RTSemEventMultiWaitNoResume 175 176 ; 177 ; Restore rbp and any saved registers before returning. 178 ; 179 mov rbp, rdi 180 ;mov rsi, [rbp - 10h] 181 mov rdi, [rbp - 8h] 182 leave 183 ret 184 185 .not_found: 186 int3 187 mov rdi, rbp 188 jmp .resume 189 [endproc_frame supdrvNtWrapRTSemEventMultiWaitNoResume] 190 ENDPROC supdrvNtWrapRTSemEventMultiWaitNoResume 496 ;; 497 ; @cproto DECLASM(int) supdrvNtWrapVMMR0EntryFast(PFNRT pfnVMMR0EntryFast, PVM pVM, unsigned uOperation); 498 ; 499 ; @param pfnVMMR0EntryFast rcx 500 ; @param pVM rdx 501 ; @param uOperation r8 502 ; 503 BEGINPROC supdrvNtWrapVMMR0EntryFast 504 NtWrapProlog supdrvNtWrapVMMR0EntryFast 505 NtWrapCreateMarker 506 507 mov rax, rcx 508 mov rcx, rdx 509 mov rdx, r8 510 call rax 511 512 NtWrapDestroyMarker 513 NtWrapEpilog supdrvNtWrapVMMR0EntryFast 514 ENDPROC supdrvNtWrapVMMR0EntryFast 515 516 517 ;; 518 ; @cproto DECLASM(void) supdrvNtWrapObjDestructor(PFNRT pfnDestruction, void *pvObj, void *pvUser1, void *pvUser2); 519 ; 520 ; @param pfnDestruction rcx 521 ; @param pvObj rdx 522 ; @param pvUser1 r8 523 ; @param pvUser2 r9 524 ; 525 BEGINPROC supdrvNtWrapObjDestructor 526 NtWrapProlog supdrvNtWrapObjDestructor 527 NtWrapCreateMarker 528 529 mov rax, rcx 530 mov rcx, rdx 531 mov rdx, r8 532 mov r8, r9 533 call rax 534 535 NtWrapDestroyMarker 536 NtWrapEpilog supdrvNtWrapObjDestructor 537 ENDPROC supdrvNtWrapObjDestructor 538 539 540 ;; 541 ; @cproto DECLASM(void *) supdrvNtWrapQueryFactoryInterface(PFNRT pfnQueryFactoryInterface, struct SUPDRVFACTORY const *pSupDrvFactory, 542 ; PSUPDRVSESSION pSession, const char *pszInterfaceUuid); 543 ; 544 ; @param pfnQueryFactoryInterface rcx 545 ; @param pSupDrvFactory rdx 546 ; @param pSession r8 547 ; @param pszInterfaceUuid r9 548 ; 549 BEGINPROC supdrvNtWrapQueryFactoryInterface 550 NtWrapProlog supdrvNtWrapQueryFactoryInterface 551 NtWrapCreateMarker 552 553 mov rax, rcx 554 mov rcx, rdx 555 mov rdx, r8 556 mov r8, r9 557 call rax 558 559 NtWrapDestroyMarker 560 NtWrapEpilog supdrvNtWrapQueryFactoryInterface 561 ENDPROC supdrvNtWrapQueryFactoryInterface 562 563 564 ;; 565 ; @cproto DECLASM(int) supdrvNtWrapModuleInit(PFNRT pfnModuleInit); 566 ; 567 ; @param pfnModuleInit rcx 568 ; 569 BEGINPROC supdrvNtWrapModuleInit 570 NtWrapProlog supdrvNtWrapModuleInit 571 NtWrapCreateMarker 572 573 call rcx 574 575 NtWrapDestroyMarker 576 NtWrapEpilog supdrvNtWrapModuleInit 577 ENDPROC supdrvNtWrapModuleInit 578 579 580 ;; 581 ; @cproto DECLASM(void) supdrvNtWrapModuleTerm(PFNRT pfnModuleTerm); 582 ; 583 ; @param pfnModuleInit rcx 584 ; 585 BEGINPROC supdrvNtWrapModuleTerm 586 NtWrapProlog supdrvNtWrapModuleTerm 587 NtWrapCreateMarker 588 589 call rcx 590 591 NtWrapDestroyMarker 592 NtWrapEpilog supdrvNtWrapModuleTerm 593 ENDPROC supdrvNtWrapModuleTerm 594 595 191 596 192 597 %endif ; RT_ARCH_AMD64
Note:
See TracChangeset
for help on using the changeset viewer.