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
129 ASM_GLOBAL ASM_PFX(GasketSecMalloc)
130 ASM_PFX(GasketSecMalloc):
131 pushq %rbp // stack frame is for the debugger
134 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
137 movq %rcx, %rdi // Swizzle args
139 call ASM_PFX(SecMalloc)
141 popq %rdi // restore state
146 ASM_GLOBAL ASM_PFX(GasketSecValloc)
147 ASM_PFX(GasketSecValloc):
148 pushq %rbp // stack frame is for the debugger
151 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
154 movq %rcx, %rdi // Swizzle args
156 call ASM_PFX(SecValloc)
158 popq %rdi // restore state
163 ASM_GLOBAL ASM_PFX(GasketSecFree)
164 ASM_PFX(GasketSecFree):
165 pushq %rbp // stack frame is for the debugger
168 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
171 movq %rcx, %rdi // Swizzle args
173 call ASM_PFX(SecFree)
175 popq %rdi // restore state
181 ASM_GLOBAL ASM_PFX(GasketSecSetTimer)
182 ASM_PFX(GasketSecSetTimer):
183 pushq %rbp // stack frame is for the debugger
186 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
189 movq %rcx, %rdi // Swizzle args
192 call ASM_PFX(SecSetTimer)
194 popq %rdi // restore state
200 ASM_GLOBAL ASM_PFX(GasketSecEnableInterrupt)
201 ASM_PFX(GasketSecEnableInterrupt):
202 pushq %rbp // stack frame is for the debugger
205 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
208 call ASM_PFX(SecEnableInterrupt)
210 popq %rdi // restore state
216 ASM_GLOBAL ASM_PFX(GasketSecDisableInterrupt)
217 ASM_PFX(GasketSecDisableInterrupt):
218 pushq %rbp // stack frame is for the debugger
221 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
224 call ASM_PFX(SecDisableInterrupt)
226 popq %rdi // restore state
231 ASM_GLOBAL ASM_PFX(GasketQueryPerformanceFrequency)
232 ASM_PFX(GasketQueryPerformanceFrequency):
233 pushq %rbp // stack frame is for the debugger
236 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
239 call ASM_PFX(QueryPerformanceFrequency)
241 popq %rdi // restore state
247 ASM_GLOBAL ASM_PFX(GasketQueryPerformanceCounter)
248 ASM_PFX(GasketQueryPerformanceCounter):
249 pushq %rbp // stack frame is for the debugger
252 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
255 call ASM_PFX(QueryPerformanceCounter)
257 popq %rdi // restore state
263 ASM_GLOBAL ASM_PFX(GasketSecSleep)
264 ASM_PFX(GasketSecSleep):
265 pushq %rbp // stack frame is for the debugger
268 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
271 movq %rcx, %rdi // Swizzle args
273 call ASM_PFX(SecSleep)
275 popq %rdi // restore state
281 ASM_GLOBAL ASM_PFX(GasketSecCpuSleep)
282 ASM_PFX(GasketSecCpuSleep):
283 pushq %rbp // stack frame is for the debugger
286 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
289 call ASM_PFX(SecCpuSleep)
291 popq %rdi // restore state
297 ASM_GLOBAL ASM_PFX(GasketSecExit)
298 ASM_PFX(GasketSecExit):
299 pushq %rbp // stack frame is for the debugger
302 movq %rcx, %rdi // Swizzle args
303 call ASM_PFX(SecExit) // Less to do as we will never return to EFI ABI world
305 jmp LDEAD_LOOP // _exit should never return
308 ASM_GLOBAL ASM_PFX(GasketSecGetTime)
309 ASM_PFX(GasketSecGetTime):
310 pushq %rbp // stack frame is for the debugger
313 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
316 movq %rcx, %rdi // Swizzle args
319 call ASM_PFX(SecGetTime)
321 popq %rdi // restore state
326 ASM_GLOBAL ASM_PFX(GasketSecSetTime)
327 ASM_PFX(GasketSecSetTime):
328 pushq %rbp // stack frame is for the debugger
331 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
334 movq %rcx, %rdi // Swizzle args
337 call ASM_PFX(SecSetTime)
339 popq %rdi // restore state
345 ASM_GLOBAL ASM_PFX(GasketSecGetNextProtocol)
346 ASM_PFX(GasketSecGetNextProtocol):
347 pushq %rbp // stack frame is for the debugger
350 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
353 movq %rcx, %rdi // Swizzle args
358 call ASM_PFX(SecGetNextProtocol)
360 popq %rdi // restore state
365 // PPIs produced by SEC
367 ASM_GLOBAL ASM_PFX(GasketSecPeCoffGetEntryPoint)
368 ASM_PFX(GasketSecPeCoffGetEntryPoint):
369 pushq %rbp // stack frame is for the debugger
372 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
375 movq %rcx, %rdi // Swizzle args
378 call ASM_PFX(SecPeCoffGetEntryPoint)
380 popq %rdi // restore state
385 ASM_GLOBAL ASM_PFX(GasketSecPeCoffRelocateImageExtraAction)
386 ASM_PFX(GasketSecPeCoffRelocateImageExtraAction):
387 pushq %rbp // stack frame is for the debugger
390 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
393 movq %rcx, %rdi // Swizzle args
395 call ASM_PFX(SecPeCoffRelocateImageExtraAction)
397 popq %rdi // restore state
402 ASM_GLOBAL ASM_PFX(GasketSecPeCoffUnloadImageExtraAction)
403 ASM_PFX(GasketSecPeCoffUnloadImageExtraAction):
404 pushq %rbp // stack frame is for the debugger
407 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
410 movq %rcx, %rdi // Swizzle args
412 call ASM_PFX(SecPeCoffUnloadImageExtraAction)
414 popq %rdi // restore state
420 ASM_GLOBAL ASM_PFX(GasketSecEmuThunkAddress)
421 ASM_PFX(GasketSecEmuThunkAddress):
422 pushq %rbp // stack frame is for the debugger
425 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
428 call ASM_PFX(SecEmuThunkAddress)
430 popq %rdi // restore state
436 // Gasket functions for EFI_EMU_UGA_IO_PROTOCOL
439 ASM_GLOBAL ASM_PFX(GasketX11Size)
440 ASM_PFX(GasketX11Size):
441 pushq %rbp // stack frame is for the debugger
444 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
447 movq %rcx, %rdi // Swizzle args
452 call ASM_PFX(X11Size)
454 popq %rdi // restore state
460 ASM_GLOBAL ASM_PFX(GasketX11CheckKey)
461 ASM_PFX(GasketX11CheckKey):
462 pushq %rbp // stack frame is for the debugger
465 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
468 movq %rcx, %rdi // Swizzle args
470 call ASM_PFX(X11CheckKey)
472 popq %rdi // restore state
477 ASM_GLOBAL ASM_PFX(GasketX11GetKey)
478 ASM_PFX(GasketX11GetKey):
479 pushq %rbp // stack frame is for the debugger
482 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
485 movq %rcx, %rdi // Swizzle args
488 call ASM_PFX(X11GetKey)
490 popq %rdi // restore state
496 ASM_GLOBAL ASM_PFX(GasketX11KeySetState)
497 ASM_PFX(GasketX11KeySetState):
498 pushq %rbp // stack frame is for the debugger
501 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
504 movq %rcx, %rdi // Swizzle args
507 call ASM_PFX(X11KeySetState)
509 popq %rdi // restore state
515 ASM_GLOBAL ASM_PFX(GasketX11RegisterKeyNotify)
516 ASM_PFX(GasketX11RegisterKeyNotify):
517 pushq %rbp // stack frame is for the debugger
520 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
523 movq %rcx, %rdi // Swizzle args
528 call ASM_PFX(X11RegisterKeyNotify)
530 popq %rdi // restore state
536 ASM_GLOBAL ASM_PFX(GasketX11Blt)
537 ASM_PFX(GasketX11Blt):
538 pushq %rbp // stack frame is for the debugger
541 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
544 movq %rcx, %rdi // Swizzle args
551 popq %rdi // restore state
557 ASM_GLOBAL ASM_PFX(GasketX11CheckPointer)
558 ASM_PFX(GasketX11CheckPointer):
559 pushq %rbp // stack frame is for the debugger
562 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
565 movq %rcx, %rdi // Swizzle args
567 call ASM_PFX(X11CheckPointer)
569 popq %rdi // restore state
575 ASM_GLOBAL ASM_PFX(GasketX11GetPointerState)
576 ASM_PFX(GasketX11GetPointerState):
577 pushq %rbp // stack frame is for the debugger
580 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
583 movq %rcx, %rdi // Swizzle args
586 call ASM_PFX(X11GetPointerState)
588 popq %rdi // restore state
594 ASM_GLOBAL ASM_PFX(GasketX11GraphicsWindowOpen)
595 ASM_PFX(GasketX11GraphicsWindowOpen):
596 pushq %rbp // stack frame is for the debugger
599 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
602 movq %rcx, %rdi // Swizzle args
604 call ASM_PFX(X11GraphicsWindowOpen)
606 popq %rdi // restore state
612 ASM_GLOBAL ASM_PFX(GasketX11GraphicsWindowClose)
613 ASM_PFX(GasketX11GraphicsWindowClose):
614 pushq %rbp // stack frame is for the debugger
617 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
620 movq %rcx, %rdi // Swizzle args
623 call ASM_PFX(X11GraphicsWindowClose)
625 popq %rdi // restore state
633 ASM_GLOBAL ASM_PFX(GasketPthreadMutexLock)
634 ASM_PFX(GasketPthreadMutexLock):
635 pushq %rbp // stack frame is for the debugger
638 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
641 movq %rcx, %rdi // Swizzle args
643 call ASM_PFX(PthreadMutexLock)
645 popq %rdi // restore state
651 ASM_GLOBAL ASM_PFX(GasketPthreadMutexUnLock)
652 ASM_PFX(GasketPthreadMutexUnLock):
653 pushq %rbp // stack frame is for the debugger
656 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
659 movq %rcx, %rdi // Swizzle args
661 call ASM_PFX(PthreadMutexUnLock)
663 popq %rdi // restore state
668 ASM_GLOBAL ASM_PFX(GasketPthreadMutexTryLock)
669 ASM_PFX(GasketPthreadMutexTryLock):
670 pushq %rbp // stack frame is for the debugger
673 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
676 movq %rcx, %rdi // Swizzle args
678 call ASM_PFX(PthreadMutexTryLock)
680 popq %rdi // restore state
685 ASM_GLOBAL ASM_PFX(GasketPthreadMutexInit)
686 ASM_PFX(GasketPthreadMutexInit):
687 pushq %rbp // stack frame is for the debugger
690 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
694 call ASM_PFX(PthreadMutexInit)
696 popq %rdi // restore state
703 ASM_GLOBAL ASM_PFX(GasketPthreadMutexDestroy)
704 ASM_PFX(GasketPthreadMutexDestroy):
705 pushq %rbp // stack frame is for the debugger
708 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
711 movq %rcx, %rdi // Swizzle args
713 call ASM_PFX(PthreadMutexDestroy)
715 popq %rdi // restore state
721 ASM_GLOBAL ASM_PFX(GasketPthreadCreate)
722 ASM_PFX(GasketPthreadCreate):
723 pushq %rbp // stack frame is for the debugger
726 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
729 movq %rcx, %rdi // Swizzle args
734 call ASM_PFX(PthreadCreate)
736 popq %rdi // restore state
742 ASM_GLOBAL ASM_PFX(GasketPthreadExit)
743 ASM_PFX(GasketPthreadExit):
744 pushq %rbp // stack frame is for the debugger
747 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
750 movq %rcx, %rdi // Swizzle args
752 call ASM_PFX(PthreadExit)
754 popq %rdi // restore state
761 ASM_GLOBAL ASM_PFX(GasketPthreadSelf)
762 ASM_PFX(GasketPthreadSelf):
763 pushq %rbp // stack frame is for the debugger
766 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
770 call ASM_PFX(PthreadSelf)
772 popq %rdi // restore state
778 ASM_GLOBAL ASM_PFX(GasketPthreadOpen)
779 ASM_PFX(GasketPthreadOpen):
780 pushq %rbp // stack frame is for the debugger
783 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
786 movq %rcx, %rdi // Swizzle args
788 call ASM_PFX(PthreadOpen)
790 popq %rdi // restore state
796 ASM_GLOBAL ASM_PFX(GasketPthreadClose)
797 ASM_PFX(GasketPthreadClose):
798 pushq %rbp // stack frame is for the debugger
801 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
804 movq %rcx, %rdi // Swizzle args
806 call ASM_PFX(PthreadClose)
808 popq %rdi // restore state
817 // UNIX ABI to EFI ABI call
820 // ReverseGasketUint64 (
824 ASM_GLOBAL ASM_PFX(ReverseGasketUint64)
825 ASM_PFX(ReverseGasketUint64):
826 pushq %rbp // stack frame is for the debugger
829 movq %rdi, %rax // Swizzle args
832 subq $32, %rsp // 32-byte shadow space
840 // UNIX ABI to EFI ABI call
843 // ReverseGasketUint64Uint64 (
848 ASM_GLOBAL ASM_PFX(ReverseGasketUint64Uint64)
849 ASM_PFX(ReverseGasketUint64Uint64):
850 pushq %rbp // stack frame is for the debugger
853 movq %rdi, %rax // Swizzle args
856 subq $32, %rsp // 32-byte shadow space
864 ASM_GLOBAL ASM_PFX(GasketSecUnixPeiAutoScan)
865 ASM_PFX(GasketSecUnixPeiAutoScan):
866 pushq %rbp // stack frame is for the debugger
869 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
872 movq %rcx, %rdi // Swizzle args
876 call ASM_PFX(SecUnixPeiAutoScan)
878 popq %rdi // restore state
884 ASM_GLOBAL ASM_PFX(GasketSecUnixFdAddress)
885 ASM_PFX(GasketSecUnixFdAddress):
886 pushq %rbp // stack frame is for the debugger
889 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
892 movq %rcx, %rdi // Swizzle args
897 call ASM_PFX(SecUnixFdAddress)
899 popq %rdi // restore state
905 // EmuIoThunk SimpleFileSystem
907 ASM_GLOBAL ASM_PFX(GasketPosixOpenVolume)
908 ASM_PFX(GasketPosixOpenVolume):
909 pushq %rbp // stack frame is for the debugger
912 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
915 movq %rcx, %rdi // Swizzle args
920 call ASM_PFX(PosixOpenVolume)
922 popq %rdi // restore state
928 ASM_GLOBAL ASM_PFX(GasketPosixFileOpen)
929 ASM_PFX(GasketPosixFileOpen):
930 pushq %rbp // stack frame is for the debugger
933 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
936 movq %rcx, %rdi // Swizzle args
942 call ASM_PFX(PosixFileOpen)
944 popq %rdi // restore state
950 ASM_GLOBAL ASM_PFX(GasketPosixFileCLose)
951 ASM_PFX(GasketPosixFileCLose):
952 pushq %rbp // stack frame is for the debugger
955 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
958 movq %rcx, %rdi // Swizzle args
960 call ASM_PFX(PosixFileCLose)
962 popq %rdi // restore state
968 ASM_GLOBAL ASM_PFX(GasketPosixFileDelete)
969 ASM_PFX(GasketPosixFileDelete):
970 pushq %rbp // stack frame is for the debugger
973 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
976 movq %rcx, %rdi // Swizzle args
978 call ASM_PFX(PosixFileDelete)
980 popq %rdi // restore state
986 ASM_GLOBAL ASM_PFX(GasketPosixFileRead)
987 ASM_PFX(GasketPosixFileRead):
988 pushq %rbp // stack frame is for the debugger
991 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
994 movq %rcx, %rdi // Swizzle args
998 call ASM_PFX(PosixFileRead)
1000 popq %rdi // restore state
1006 ASM_GLOBAL ASM_PFX(GasketPosixFileWrite)
1007 ASM_PFX(GasketPosixFileWrite):
1008 pushq %rbp // stack frame is for the debugger
1011 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1014 movq %rcx, %rdi // Swizzle args
1018 call ASM_PFX(PosixFileWrite)
1020 popq %rdi // restore state
1026 ASM_GLOBAL ASM_PFX(GasketPosixFileSetPossition)
1027 ASM_PFX(GasketPosixFileSetPossition):
1028 pushq %rbp // stack frame is for the debugger
1031 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1034 movq %rcx, %rdi // Swizzle args
1037 call ASM_PFX(PosixFileSetPossition)
1039 popq %rdi // restore state
1045 ASM_GLOBAL ASM_PFX(GasketPosixFileGetPossition)
1046 ASM_PFX(GasketPosixFileGetPossition):
1047 pushq %rbp // stack frame is for the debugger
1050 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1053 movq %rcx, %rdi // Swizzle args
1056 call ASM_PFX(PosixFileGetPossition)
1058 popq %rdi // restore state
1064 ASM_GLOBAL ASM_PFX(GasketPosixFileGetInfo)
1065 ASM_PFX(GasketPosixFileGetInfo):
1066 pushq %rbp // stack frame is for the debugger
1069 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1072 movq %rcx, %rdi // Swizzle args
1077 call ASM_PFX(PosixFileGetInfo)
1079 popq %rdi // restore state
1085 ASM_GLOBAL ASM_PFX(GasketPosixFileSetInfo)
1086 ASM_PFX(GasketPosixFileSetInfo):
1087 pushq %rbp // stack frame is for the debugger
1090 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1093 movq %rcx, %rdi // Swizzle args
1098 call ASM_PFX(PosixFileSetInfo)
1100 popq %rdi // restore state
1106 ASM_GLOBAL ASM_PFX(GasketPosixFileFlush)
1107 ASM_PFX(GasketPosixFileFlush):
1108 pushq %rbp // stack frame is for the debugger
1111 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1114 movq %rcx, %rdi // Swizzle args
1116 call ASM_PFX(PosixFileFlush)
1118 popq %rdi // restore state
1124 ASM_GLOBAL ASM_PFX(GasketPosixFileSystmeThunkOpen)
1125 ASM_PFX(GasketPosixFileSystmeThunkOpen):
1126 pushq %rbp // stack frame is for the debugger
1129 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1132 movq %rcx, %rdi // Swizzle args
1134 call ASM_PFX(PosixFileSystmeThunkOpen)
1136 popq %rdi // restore state
1142 ASM_GLOBAL ASM_PFX(GasketPosixFileSystmeThunkClose)
1143 ASM_PFX(GasketPosixFileSystmeThunkClose):
1144 pushq %rbp // stack frame is for the debugger
1147 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1150 movq %rcx, %rdi // Swizzle args
1152 call ASM_PFX(PosixFileSystmeThunkClose)
1154 popq %rdi // restore state
1159 ASM_GLOBAL ASM_PFX(GasketEmuBlockIoReset)
1160 ASM_PFX(GasketEmuBlockIoReset):
1161 pushq %rbp // stack frame is for the debugger
1164 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1167 movq %rcx, %rdi // Swizzle args
1170 call ASM_PFX(EmuBlockIoReset)
1172 popq %rdi // restore state
1178 ASM_GLOBAL ASM_PFX(GasketEmuBlockIoReadBlocks)
1179 ASM_PFX(GasketEmuBlockIoReadBlocks):
1180 pushq %rbp // stack frame is for the debugger
1183 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1186 movq %rcx, %rdi // Swizzle args
1193 call ASM_PFX(EmuBlockIoReadBlocks)
1195 popq %rdi // restore state
1201 ASM_GLOBAL ASM_PFX(GasketEmuBlockIoWriteBlocks)
1202 ASM_PFX(GasketEmuBlockIoWriteBlocks):
1203 pushq %rbp // stack frame is for the debugger
1206 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1209 movq %rcx, %rdi // Swizzle args
1216 call ASM_PFX(EmuBlockIoWriteBlocks)
1218 popq %rdi // restore state
1224 ASM_GLOBAL ASM_PFX(GasketEmuBlockIoFlushBlocks)
1225 ASM_PFX(GasketEmuBlockIoFlushBlocks):
1226 pushq %rbp // stack frame is for the debugger
1229 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1232 movq %rcx, %rdi // Swizzle args
1235 call ASM_PFX(EmuBlockIoFlushBlocks)
1237 popq %rdi // restore state
1243 ASM_GLOBAL ASM_PFX(GasketEmuBlockIoCreateMapping)
1244 ASM_PFX(GasketEmuBlockIoCreateMapping):
1245 pushq %rbp // stack frame is for the debugger
1248 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1251 movq %rcx, %rdi // Swizzle args
1254 call ASM_PFX(EmuBlockIoCreateMapping)
1256 popq %rdi // restore state
1262 ASM_GLOBAL ASM_PFX(GasketBlockIoThunkOpen)
1263 ASM_PFX(GasketBlockIoThunkOpen):
1264 pushq %rbp // stack frame is for the debugger
1267 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1270 movq %rcx, %rdi // Swizzle args
1272 call ASM_PFX(EmuBlockIoThunkOpen)
1274 popq %rdi // restore state
1280 ASM_GLOBAL ASM_PFX(GasketBlockIoThunkClose)
1281 ASM_PFX(GasketBlockIoThunkClose):
1282 pushq %rbp // stack frame is for the debugger
1285 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1288 movq %rcx, %rdi // Swizzle args
1290 call ASM_PFX(EmuBlockIoThunkClose)
1292 popq %rdi // restore state
1299 ASM_GLOBAL ASM_PFX(GasketSnpCreateMapping)
1300 ASM_PFX(GasketSnpCreateMapping):
1301 pushq %rbp // stack frame is for the debugger
1304 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1307 movq %rcx, %rdi // Swizzle args
1310 call ASM_PFX(EmuSnpCreateMapping)
1312 popq %rdi // restore state
1318 ASM_GLOBAL ASM_PFX(GasketSnpStart)
1319 ASM_PFX(GasketSnpStart):
1320 pushq %rbp // stack frame is for the debugger
1323 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1326 movq %rcx, %rdi // Swizzle args
1328 call ASM_PFX(EmuSnpStart)
1330 popq %rdi // restore state
1336 ASM_GLOBAL ASM_PFX(GasketSnpStop)
1337 ASM_PFX(GasketSnpStop):
1338 pushq %rbp // stack frame is for the debugger
1341 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1344 movq %rcx, %rdi // Swizzle args
1346 call ASM_PFX(EmuSnpStop)
1348 popq %rdi // restore state
1354 ASM_GLOBAL ASM_PFX(GasketSnpInitialize)
1355 ASM_PFX(GasketSnpInitialize):
1356 pushq %rbp // stack frame is for the debugger
1359 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1362 movq %rcx, %rdi // Swizzle args
1366 call ASM_PFX(EmuSnpInitialize)
1368 popq %rdi // restore state
1375 ASM_GLOBAL ASM_PFX(GasketSnpReset)
1376 ASM_PFX(GasketSnpReset):
1377 pushq %rbp // stack frame is for the debugger
1380 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1383 movq %rcx, %rdi // Swizzle args
1386 call ASM_PFX(EmuSnpReset)
1388 popq %rdi // restore state
1394 ASM_GLOBAL ASM_PFX(GasketSnpShutdown)
1395 ASM_PFX(GasketSnpShutdown):
1396 pushq %rbp // stack frame is for the debugger
1399 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1402 movq %rcx, %rdi // Swizzle args
1404 call ASM_PFX(EmuSnpShutdown)
1406 popq %rdi // restore state
1412 ASM_GLOBAL ASM_PFX(GasketSnpReceiveFilters)
1413 ASM_PFX(GasketSnpReceiveFilters):
1414 pushq %rbp // stack frame is for the debugger
1417 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1420 movq %rcx, %rdi // Swizzle args
1427 call ASM_PFX(EmuSnpReceiveFilters)
1429 popq %rdi // restore state
1435 ASM_GLOBAL ASM_PFX(GasketSnpStationAddress)
1436 ASM_PFX(GasketSnpStationAddress):
1437 pushq %rbp // stack frame is for the debugger
1440 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1443 movq %rcx, %rdi // Swizzle args
1447 call ASM_PFX(EmuSnpStationAddress)
1449 popq %rdi // restore state
1456 ASM_GLOBAL ASM_PFX(GasketSnpStatistics)
1457 ASM_PFX(GasketSnpStatistics):
1458 pushq %rbp // stack frame is for the debugger
1461 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1464 movq %rcx, %rdi // Swizzle args
1469 call ASM_PFX(EmuSnpStatistics)
1471 popq %rdi // restore state
1477 ASM_GLOBAL ASM_PFX(GasketSnpMCastIpToMac)
1478 ASM_PFX(GasketSnpMCastIpToMac):
1479 pushq %rbp // stack frame is for the debugger
1482 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1485 movq %rcx, %rdi // Swizzle args
1490 call ASM_PFX(EmuSnpMCastIpToMac)
1492 popq %rdi // restore state
1498 ASM_GLOBAL ASM_PFX(GasketSnpNvData)
1499 ASM_PFX(GasketSnpNvData):
1500 pushq %rbp // stack frame is for the debugger
1503 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1506 movq %rcx, %rdi // Swizzle args
1512 call ASM_PFX(EmuSnpNvData)
1514 popq %rdi // restore state
1520 ASM_GLOBAL ASM_PFX(GasketSnpGetStatus)
1521 ASM_PFX(GasketSnpGetStatus):
1522 pushq %rbp // stack frame is for the debugger
1525 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1528 movq %rcx, %rdi // Swizzle args
1532 call ASM_PFX(EmuSnpGetStatus)
1534 popq %rdi // restore state
1541 ASM_GLOBAL ASM_PFX(GasketSnpTransmit)
1542 ASM_PFX(GasketSnpTransmit):
1543 pushq %rbp // stack frame is for the debugger
1545 subq $16, %rsp // Allocate space for args on the stack
1547 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1550 movq %rcx, %rdi // Swizzle args
1559 call ASM_PFX(EmuSnpTransmit)
1562 popq %rdi // restore state
1569 ASM_GLOBAL ASM_PFX(GasketSnpReceive)
1570 ASM_PFX(GasketSnpReceive):
1571 pushq %rbp // stack frame is for the debugger
1573 subq $16, %rsp // Allocate space for args on the stack
1575 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1578 movq %rcx, %rdi // Swizzle args
1587 call ASM_PFX(EmuSnpReceive)
1590 popq %rdi // restore state
1596 ASM_GLOBAL ASM_PFX(GasketSnpThunkOpen)
1597 ASM_PFX(GasketSnpThunkOpen):
1598 pushq %rbp // stack frame is for the debugger
1601 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1604 movq %rcx, %rdi // Swizzle args
1606 call ASM_PFX(EmuSnpThunkOpen)
1608 popq %rdi // restore state
1614 ASM_GLOBAL ASM_PFX(GasketSnpThunkClose)
1615 ASM_PFX(GasketSnpThunkClose):
1616 pushq %rbp // stack frame is for the debugger
1619 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1622 movq %rcx, %rdi // Swizzle args
1624 call ASM_PFX(EmuSnpThunkClose)
1626 popq %rdi // restore state