1 #------------------------------------------------------------------------------
3 # Manage differenced between UNIX ABI and EFI/Windows ABI
5 # EFI Arg passing: RCX, RDX, R8, R9
6 # Callee allocates 32 bytes on stack to spill registers
7 # UNIX Arg passing: RDI, RSI, RDX, RCX, R8, R9
8 # RSI, RDI calle-save on EFI, scatch on UNIX callign
10 # Copyright (c) 2008 - 2011, Apple Inc. All rights reserved.<BR>
11 # This program and the accompanying materials
12 # are licensed and made available under the terms and conditions of the BSD License
13 # which accompanies this distribution. The full text of the license may be found at
14 # http://opensource.org/licenses/bsd-license.php
16 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
17 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
19 #------------------------------------------------------------------------------
22 // Gaskets are EFI ABI to UNIX ABI calls
23 // EFI ABI code will sub 40 (0x28) from %rsp before calling a function
24 // This is the 32 (0x20) byte to spill registers and 8 bytes to align stack on 16 byte boundry.
28 // 32 byte shadow to spill rcx-r9, 8 bytes to align stack on 16 byte boundry
29 // Any call with 0 - 4 arguments allocates 40 bytes on the stack.
30 // For more than 4 args you always have to increase in quanta of 16 so 5 or 6 args is 56,
31 // 7 or 8 args is 72, and 9 or 10 args is 88
38 // EMU_THUNK_PROTOCOL gaskets (EFIAPI to UNIX ABI)
44 ASM_GLOBAL ASM_PFX(GasketSecWriteStdErr)
45 ASM_PFX(GasketSecWriteStdErr):
46 pushq %rbp // stack frame is for the debugger
49 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
52 movq %rcx, %rdi // Swizzle args
55 call ASM_PFX(SecWriteStdErr)
57 popq %rdi // restore state
63 ASM_GLOBAL ASM_PFX(GasketSecConfigStdIn)
64 ASM_PFX(GasketSecConfigStdIn):
65 pushq %rbp // stack frame is for the debugger
68 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
71 call ASM_PFX(SecConfigStdIn)
73 popq %rdi // restore state
78 ASM_GLOBAL ASM_PFX(GasketSecWriteStdOut)
79 ASM_PFX(GasketSecWriteStdOut):
80 pushq %rbp // stack frame is for the debugger
83 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
86 movq %rcx, %rdi // Swizzle args
89 call ASM_PFX(SecWriteStdOut)
91 popq %rdi // restore state
96 ASM_GLOBAL ASM_PFX(GasketSecReadStdIn)
97 ASM_PFX(GasketSecReadStdIn):
98 pushq %rbp // stack frame is for the debugger
101 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
104 movq %rcx, %rdi // Swizzle args
107 call ASM_PFX(SecReadStdIn)
109 popq %rdi // restore state
114 ASM_GLOBAL ASM_PFX(GasketSecPollStdIn)
115 ASM_PFX(GasketSecPollStdIn):
116 pushq %rbp // stack frame is for the debugger
119 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
122 call ASM_PFX(SecPollStdIn)
124 popq %rdi // restore state
130 ASM_GLOBAL ASM_PFX(GasketSecSetTimer)
131 ASM_PFX(GasketSecSetTimer):
132 pushq %rbp // stack frame is for the debugger
135 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
138 movq %rcx, %rdi // Swizzle args
141 call ASM_PFX(SecSetTimer)
143 popq %rdi // restore state
149 ASM_GLOBAL ASM_PFX(GasketSecEnableInterrupt)
150 ASM_PFX(GasketSecEnableInterrupt):
151 pushq %rbp // stack frame is for the debugger
154 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
157 call ASM_PFX(SecEnableInterrupt)
159 popq %rdi // restore state
165 ASM_GLOBAL ASM_PFX(GasketSecDisableInterrupt)
166 ASM_PFX(GasketSecDisableInterrupt):
167 pushq %rbp // stack frame is for the debugger
170 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
173 call ASM_PFX(SecDisableInterrupt)
175 popq %rdi // restore state
180 ASM_GLOBAL ASM_PFX(GasketQueryPerformanceFrequency)
181 ASM_PFX(GasketQueryPerformanceFrequency):
182 pushq %rbp // stack frame is for the debugger
185 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
188 call ASM_PFX(QueryPerformanceFrequency)
190 popq %rdi // restore state
196 ASM_GLOBAL ASM_PFX(GasketQueryPerformanceCounter)
197 ASM_PFX(GasketQueryPerformanceCounter):
198 pushq %rbp // stack frame is for the debugger
201 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
204 call ASM_PFX(QueryPerformanceCounter)
206 popq %rdi // restore state
212 ASM_GLOBAL ASM_PFX(GasketSecSleep)
213 ASM_PFX(GasketSecSleep):
214 pushq %rbp // stack frame is for the debugger
217 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
220 movq %rcx, %rdi // Swizzle args
222 call ASM_PFX(SecSleep)
224 popq %rdi // restore state
230 ASM_GLOBAL ASM_PFX(GasketSecExit)
231 ASM_PFX(GasketSecExit):
232 pushq %rbp // stack frame is for the debugger
235 movq %rcx, %rdi // Swizzle args
236 call ASM_PFX(SecExit) // Less to do as we will never return to EFI ABI world
238 jmp LDEAD_LOOP // _exit should never return
241 ASM_GLOBAL ASM_PFX(GasketSecGetTime)
242 ASM_PFX(GasketSecGetTime):
243 pushq %rbp // stack frame is for the debugger
246 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
249 movq %rcx, %rdi // Swizzle args
252 call ASM_PFX(SecGetTime)
254 popq %rdi // restore state
259 ASM_GLOBAL ASM_PFX(GasketSecSetTime)
260 ASM_PFX(GasketSecSetTime):
261 pushq %rbp // stack frame is for the debugger
264 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
267 movq %rcx, %rdi // Swizzle args
270 call ASM_PFX(SecSetTime)
272 popq %rdi // restore state
278 ASM_GLOBAL ASM_PFX(GasketSecGetNextProtocol)
279 ASM_PFX(GasketSecGetNextProtocol):
280 pushq %rbp // stack frame is for the debugger
283 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
286 movq %rcx, %rdi // Swizzle args
291 call ASM_PFX(SecGetNextProtocol)
293 popq %rdi // restore state
298 // PPIs produced by SEC
300 ASM_GLOBAL ASM_PFX(GasketSecPeCoffGetEntryPoint)
301 ASM_PFX(GasketSecPeCoffGetEntryPoint):
302 pushq %rbp // stack frame is for the debugger
305 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
308 movq %rcx, %rdi // Swizzle args
311 call ASM_PFX(SecPeCoffGetEntryPoint)
313 popq %rdi // restore state
318 ASM_GLOBAL ASM_PFX(GasketSecPeCoffRelocateImageExtraAction)
319 ASM_PFX(GasketSecPeCoffRelocateImageExtraAction):
320 pushq %rbp // stack frame is for the debugger
323 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
326 movq %rcx, %rdi // Swizzle args
328 call ASM_PFX(SecPeCoffRelocateImageExtraAction)
330 popq %rdi // restore state
335 ASM_GLOBAL ASM_PFX(GasketSecPeCoffUnloadImageExtraAction)
336 ASM_PFX(GasketSecPeCoffUnloadImageExtraAction):
337 pushq %rbp // stack frame is for the debugger
340 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
343 movq %rcx, %rdi // Swizzle args
345 call ASM_PFX(SecPeCoffUnloadImageExtraAction)
347 popq %rdi // restore state
353 ASM_GLOBAL ASM_PFX(GasketSecEmuThunkAddress)
354 ASM_PFX(GasketSecEmuThunkAddress):
355 pushq %rbp // stack frame is for the debugger
358 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
361 call ASM_PFX(SecEmuThunkAddress)
363 popq %rdi // restore state
369 // Gasket functions for EFI_EMU_UGA_IO_PROTOCOL
372 ASM_GLOBAL ASM_PFX(GasketX11Size)
373 ASM_PFX(GasketX11Size):
374 pushq %rbp // stack frame is for the debugger
377 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
380 movq %rcx, %rdi // Swizzle args
385 call ASM_PFX(X11Size)
387 popq %rdi // restore state
393 ASM_GLOBAL ASM_PFX(GasketX11CheckKey)
394 ASM_PFX(GasketX11CheckKey):
395 pushq %rbp // stack frame is for the debugger
398 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
401 movq %rcx, %rdi // Swizzle args
403 call ASM_PFX(X11CheckKey)
405 popq %rdi // restore state
410 ASM_GLOBAL ASM_PFX(GasketX11GetKey)
411 ASM_PFX(GasketX11GetKey):
412 pushq %rbp // stack frame is for the debugger
415 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
418 movq %rcx, %rdi // Swizzle args
421 call ASM_PFX(X11GetKey)
423 popq %rdi // restore state
429 ASM_GLOBAL ASM_PFX(GasketX11KeySetState)
430 ASM_PFX(GasketX11KeySetState):
431 pushq %rbp // stack frame is for the debugger
434 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
437 movq %rcx, %rdi // Swizzle args
440 call ASM_PFX(X11KeySetState)
442 popq %rdi // restore state
448 ASM_GLOBAL ASM_PFX(GasketX11RegisterKeyNotify)
449 ASM_PFX(GasketX11RegisterKeyNotify):
450 pushq %rbp // stack frame is for the debugger
453 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
456 movq %rcx, %rdi // Swizzle args
461 call ASM_PFX(X11RegisterKeyNotify)
463 popq %rdi // restore state
469 ASM_GLOBAL ASM_PFX(GasketX11Blt)
470 ASM_PFX(GasketX11Blt):
471 pushq %rbp // stack frame is for the debugger
474 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
477 movq %rcx, %rdi // Swizzle args
484 popq %rdi // restore state
490 ASM_GLOBAL ASM_PFX(GasketX11CheckPointer)
491 ASM_PFX(GasketX11CheckPointer):
492 pushq %rbp // stack frame is for the debugger
495 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
498 movq %rcx, %rdi // Swizzle args
500 call ASM_PFX(X11CheckPointer)
502 popq %rdi // restore state
508 ASM_GLOBAL ASM_PFX(GasketX11GetPointerState)
509 ASM_PFX(GasketX11GetPointerState):
510 pushq %rbp // stack frame is for the debugger
513 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
516 movq %rcx, %rdi // Swizzle args
519 call ASM_PFX(X11GetPointerState)
521 popq %rdi // restore state
527 ASM_GLOBAL ASM_PFX(GasketX11GraphicsWindowOpen)
528 ASM_PFX(GasketX11GraphicsWindowOpen):
529 pushq %rbp // stack frame is for the debugger
532 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
535 movq %rcx, %rdi // Swizzle args
537 call ASM_PFX(X11GraphicsWindowOpen)
539 popq %rdi // restore state
545 ASM_GLOBAL ASM_PFX(GasketX11GraphicsWindowClose)
546 ASM_PFX(GasketX11GraphicsWindowClose):
547 pushq %rbp // stack frame is for the debugger
550 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
553 movq %rcx, %rdi // Swizzle args
556 call ASM_PFX(X11GraphicsWindowClose)
558 popq %rdi // restore state
566 ASM_GLOBAL ASM_PFX(GasketPthreadMutexLock)
567 ASM_PFX(GasketPthreadMutexLock):
568 pushq %rbp // stack frame is for the debugger
571 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
574 movq %rcx, %rdi // Swizzle args
576 call ASM_PFX(PthreadMutexLock)
578 popq %rdi // restore state
584 ASM_GLOBAL ASM_PFX(GasketPthreadMutexUnLock)
585 ASM_PFX(GasketPthreadMutexUnLock):
586 pushq %rbp // stack frame is for the debugger
589 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
592 movq %rcx, %rdi // Swizzle args
594 call ASM_PFX(PthreadMutexUnLock)
596 popq %rdi // restore state
601 ASM_GLOBAL ASM_PFX(GasketPthreadMutexTryLock)
602 ASM_PFX(GasketPthreadMutexTryLock):
603 pushq %rbp // stack frame is for the debugger
606 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
609 movq %rcx, %rdi // Swizzle args
611 call ASM_PFX(PthreadMutexTryLock)
613 popq %rdi // restore state
618 ASM_GLOBAL ASM_PFX(GasketPthreadMutexInit)
619 ASM_PFX(GasketPthreadMutexInit):
620 pushq %rbp // stack frame is for the debugger
623 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
627 call ASM_PFX(PthreadMutexInit)
629 popq %rdi // restore state
636 ASM_GLOBAL ASM_PFX(GasketPthreadMutexDestroy)
637 ASM_PFX(GasketPthreadMutexDestroy):
638 pushq %rbp // stack frame is for the debugger
641 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
644 movq %rcx, %rdi // Swizzle args
646 call ASM_PFX(PthreadMutexDestroy)
648 popq %rdi // restore state
654 ASM_GLOBAL ASM_PFX(GasketPthreadCreate)
655 ASM_PFX(GasketPthreadCreate):
656 pushq %rbp // stack frame is for the debugger
659 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
662 movq %rcx, %rdi // Swizzle args
667 call ASM_PFX(PthreadCreate)
669 popq %rdi // restore state
675 ASM_GLOBAL ASM_PFX(GasketPthreadExit)
676 ASM_PFX(GasketPthreadExit):
677 pushq %rbp // stack frame is for the debugger
680 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
683 movq %rcx, %rdi // Swizzle args
685 call ASM_PFX(PthreadExit)
687 popq %rdi // restore state
694 ASM_GLOBAL ASM_PFX(GasketPthreadSelf)
695 ASM_PFX(GasketPthreadSelf):
696 pushq %rbp // stack frame is for the debugger
699 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
703 call ASM_PFX(PthreadSelf)
705 popq %rdi // restore state
711 ASM_GLOBAL ASM_PFX(GasketPthreadOpen)
712 ASM_PFX(GasketPthreadOpen):
713 pushq %rbp // stack frame is for the debugger
716 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
719 movq %rcx, %rdi // Swizzle args
721 call ASM_PFX(PthreadOpen)
723 popq %rdi // restore state
729 ASM_GLOBAL ASM_PFX(GasketPthreadClose)
730 ASM_PFX(GasketPthreadClose):
731 pushq %rbp // stack frame is for the debugger
734 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
737 movq %rcx, %rdi // Swizzle args
739 call ASM_PFX(PthreadClose)
741 popq %rdi // restore state
750 // UNIX ABI to EFI ABI call
753 // ReverseGasketUint64 (
757 ASM_GLOBAL ASM_PFX(ReverseGasketUint64)
758 ASM_PFX(ReverseGasketUint64):
759 pushq %rbp // stack frame is for the debugger
762 movq %rdi, %rax // Swizzle args
765 subq $32, %rsp // 32-byte shadow space
773 // UNIX ABI to EFI ABI call
776 // ReverseGasketUint64Uint64 (
781 ASM_GLOBAL ASM_PFX(ReverseGasketUint64Uint64)
782 ASM_PFX(ReverseGasketUint64Uint64):
783 pushq %rbp // stack frame is for the debugger
786 movq %rdi, %rax // Swizzle args
789 subq $32, %rsp // 32-byte shadow space
797 ASM_GLOBAL ASM_PFX(GasketSecUnixPeiAutoScan)
798 ASM_PFX(GasketSecUnixPeiAutoScan):
799 pushq %rbp // stack frame is for the debugger
802 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
805 movq %rcx, %rdi // Swizzle args
809 call ASM_PFX(SecUnixPeiAutoScan)
811 popq %rdi // restore state
817 ASM_GLOBAL ASM_PFX(GasketSecUnixFdAddress)
818 ASM_PFX(GasketSecUnixFdAddress):
819 pushq %rbp // stack frame is for the debugger
822 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
825 movq %rcx, %rdi // Swizzle args
830 call ASM_PFX(SecUnixFdAddress)
832 popq %rdi // restore state
838 // EmuIoThunk SimpleFileSystem
840 ASM_GLOBAL ASM_PFX(GasketPosixOpenVolume)
841 ASM_PFX(GasketPosixOpenVolume):
842 pushq %rbp // stack frame is for the debugger
845 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
848 movq %rcx, %rdi // Swizzle args
853 call ASM_PFX(PosixOpenVolume)
855 popq %rdi // restore state
861 ASM_GLOBAL ASM_PFX(GasketPosixFileOpen)
862 ASM_PFX(GasketPosixFileOpen):
863 pushq %rbp // stack frame is for the debugger
866 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
869 movq %rcx, %rdi // Swizzle args
875 call ASM_PFX(PosixFileOpen)
877 popq %rdi // restore state
883 ASM_GLOBAL ASM_PFX(GasketPosixFileCLose)
884 ASM_PFX(GasketPosixFileCLose):
885 pushq %rbp // stack frame is for the debugger
888 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
891 movq %rcx, %rdi // Swizzle args
893 call ASM_PFX(PosixFileCLose)
895 popq %rdi // restore state
901 ASM_GLOBAL ASM_PFX(GasketPosixFileDelete)
902 ASM_PFX(GasketPosixFileDelete):
903 pushq %rbp // stack frame is for the debugger
906 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
909 movq %rcx, %rdi // Swizzle args
911 call ASM_PFX(PosixFileDelete)
913 popq %rdi // restore state
919 ASM_GLOBAL ASM_PFX(GasketPosixFileRead)
920 ASM_PFX(GasketPosixFileRead):
921 pushq %rbp // stack frame is for the debugger
924 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
927 movq %rcx, %rdi // Swizzle args
931 call ASM_PFX(PosixFileRead)
933 popq %rdi // restore state
939 ASM_GLOBAL ASM_PFX(GasketPosixFileWrite)
940 ASM_PFX(GasketPosixFileWrite):
941 pushq %rbp // stack frame is for the debugger
944 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
947 movq %rcx, %rdi // Swizzle args
951 call ASM_PFX(PosixFileWrite)
953 popq %rdi // restore state
959 ASM_GLOBAL ASM_PFX(GasketPosixFileSetPossition)
960 ASM_PFX(GasketPosixFileSetPossition):
961 pushq %rbp // stack frame is for the debugger
964 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
967 movq %rcx, %rdi // Swizzle args
970 call ASM_PFX(PosixFileSetPossition)
972 popq %rdi // restore state
978 ASM_GLOBAL ASM_PFX(GasketPosixFileGetPossition)
979 ASM_PFX(GasketPosixFileGetPossition):
980 pushq %rbp // stack frame is for the debugger
983 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
986 movq %rcx, %rdi // Swizzle args
989 call ASM_PFX(PosixFileGetPossition)
991 popq %rdi // restore state
997 ASM_GLOBAL ASM_PFX(GasketPosixFileGetInfo)
998 ASM_PFX(GasketPosixFileGetInfo):
999 pushq %rbp // stack frame is for the debugger
1002 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1005 movq %rcx, %rdi // Swizzle args
1010 call ASM_PFX(PosixFileGetInfo)
1012 popq %rdi // restore state
1018 ASM_GLOBAL ASM_PFX(GasketPosixFileSetInfo)
1019 ASM_PFX(GasketPosixFileSetInfo):
1020 pushq %rbp // stack frame is for the debugger
1023 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1026 movq %rcx, %rdi // Swizzle args
1031 call ASM_PFX(PosixFileSetInfo)
1033 popq %rdi // restore state
1039 ASM_GLOBAL ASM_PFX(GasketPosixFileFlush)
1040 ASM_PFX(GasketPosixFileFlush):
1041 pushq %rbp // stack frame is for the debugger
1044 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1047 movq %rcx, %rdi // Swizzle args
1049 call ASM_PFX(PosixFileFlush)
1051 popq %rdi // restore state
1057 ASM_GLOBAL ASM_PFX(GasketPosixFileSystmeThunkOpen)
1058 ASM_PFX(GasketPosixFileSystmeThunkOpen):
1059 pushq %rbp // stack frame is for the debugger
1062 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1065 movq %rcx, %rdi // Swizzle args
1067 call ASM_PFX(PosixFileSystmeThunkOpen)
1069 popq %rdi // restore state
1075 ASM_GLOBAL ASM_PFX(GasketPosixFileSystmeThunkClose)
1076 ASM_PFX(GasketPosixFileSystmeThunkClose):
1077 pushq %rbp // stack frame is for the debugger
1080 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1083 movq %rcx, %rdi // Swizzle args
1085 call ASM_PFX(PosixFileSystmeThunkClose)
1087 popq %rdi // restore state
1092 ASM_GLOBAL ASM_PFX(GasketEmuBlockIoReset)
1093 ASM_PFX(GasketEmuBlockIoReset):
1094 pushq %rbp // stack frame is for the debugger
1097 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1100 movq %rcx, %rdi // Swizzle args
1103 call ASM_PFX(EmuBlockIoReset)
1105 popq %rdi // restore state
1111 ASM_GLOBAL ASM_PFX(GasketEmuBlockIoReadBlocks)
1112 ASM_PFX(GasketEmuBlockIoReadBlocks):
1113 pushq %rbp // stack frame is for the debugger
1116 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1119 movq %rcx, %rdi // Swizzle args
1123 movq 0x30(%rbp), %r8
1124 movq 0x38(%rbp), %r9
1126 call ASM_PFX(EmuBlockIoReadBlocks)
1128 popq %rdi // restore state
1134 ASM_GLOBAL ASM_PFX(GasketEmuBlockIoWriteBlocks)
1135 ASM_PFX(GasketEmuBlockIoWriteBlocks):
1136 pushq %rbp // stack frame is for the debugger
1139 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1142 movq %rcx, %rdi // Swizzle args
1146 movq 0x30(%rbp), %r8
1147 movq 0x38(%rbp), %r9
1149 call ASM_PFX(EmuBlockIoWriteBlocks)
1151 popq %rdi // restore state
1157 ASM_GLOBAL ASM_PFX(GasketEmuBlockIoFlushBlocks)
1158 ASM_PFX(GasketEmuBlockIoFlushBlocks):
1159 pushq %rbp // stack frame is for the debugger
1162 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1165 movq %rcx, %rdi // Swizzle args
1168 call ASM_PFX(EmuBlockIoFlushBlocks)
1170 popq %rdi // restore state
1176 ASM_GLOBAL ASM_PFX(GasketEmuBlockIoCreateMapping)
1177 ASM_PFX(GasketEmuBlockIoCreateMapping):
1178 pushq %rbp // stack frame is for the debugger
1181 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1184 movq %rcx, %rdi // Swizzle args
1187 call ASM_PFX(EmuBlockIoCreateMapping)
1189 popq %rdi // restore state
1195 ASM_GLOBAL ASM_PFX(GasketBlockIoThunkOpen)
1196 ASM_PFX(GasketBlockIoThunkOpen):
1197 pushq %rbp // stack frame is for the debugger
1200 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1203 movq %rcx, %rdi // Swizzle args
1205 call ASM_PFX(EmuBlockIoThunkOpen)
1207 popq %rdi // restore state
1213 ASM_GLOBAL ASM_PFX(GasketBlockIoThunkClose)
1214 ASM_PFX(GasketBlockIoThunkClose):
1215 pushq %rbp // stack frame is for the debugger
1218 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1221 movq %rcx, %rdi // Swizzle args
1223 call ASM_PFX(EmuBlockIoThunkClose)
1225 popq %rdi // restore state