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 # SPDX-License-Identifier: BSD-2-Clause-Patent
13 #------------------------------------------------------------------------------
16 // Gaskets are EFI ABI to UNIX ABI calls
17 // EFI ABI code will sub 40 (0x28) from %rsp before calling a function
18 // This is the 32 (0x20) byte to spill registers and 8 bytes to align stack on 16 byte boundary.
22 // 32 byte shadow to spill rcx-r9, 8 bytes to align stack on 16 byte boundary
23 // Any call with 0 - 4 arguments allocates 40 bytes on the stack.
24 // For more than 4 args you always have to increase in quanta of 16 so 5 or 6 args is 56,
25 // 7 or 8 args is 72, and 9 or 10 args is 88
32 // EMU_THUNK_PROTOCOL gaskets (EFIAPI to UNIX ABI)
38 ASM_GLOBAL ASM_PFX(GasketSecWriteStdErr)
39 ASM_PFX(GasketSecWriteStdErr):
40 pushq %rbp // stack frame is for the debugger
43 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
46 movq %rcx, %rdi // Swizzle args
49 call ASM_PFX(SecWriteStdErr)
51 popq %rdi // restore state
57 ASM_GLOBAL ASM_PFX(GasketSecConfigStdIn)
58 ASM_PFX(GasketSecConfigStdIn):
59 pushq %rbp // stack frame is for the debugger
62 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
65 call ASM_PFX(SecConfigStdIn)
67 popq %rdi // restore state
72 ASM_GLOBAL ASM_PFX(GasketSecWriteStdOut)
73 ASM_PFX(GasketSecWriteStdOut):
74 pushq %rbp // stack frame is for the debugger
77 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
80 movq %rcx, %rdi // Swizzle args
83 call ASM_PFX(SecWriteStdOut)
85 popq %rdi // restore state
90 ASM_GLOBAL ASM_PFX(GasketSecReadStdIn)
91 ASM_PFX(GasketSecReadStdIn):
92 pushq %rbp // stack frame is for the debugger
95 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
98 movq %rcx, %rdi // Swizzle args
101 call ASM_PFX(SecReadStdIn)
103 popq %rdi // restore state
108 ASM_GLOBAL ASM_PFX(GasketSecPollStdIn)
109 ASM_PFX(GasketSecPollStdIn):
110 pushq %rbp // stack frame is for the debugger
113 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
116 call ASM_PFX(SecPollStdIn)
118 popq %rdi // restore state
123 ASM_GLOBAL ASM_PFX(GasketSecMalloc)
124 ASM_PFX(GasketSecMalloc):
125 pushq %rbp // stack frame is for the debugger
128 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
131 movq %rcx, %rdi // Swizzle args
133 call ASM_PFX(SecMalloc)
135 popq %rdi // restore state
140 ASM_GLOBAL ASM_PFX(GasketSecValloc)
141 ASM_PFX(GasketSecValloc):
142 pushq %rbp // stack frame is for the debugger
145 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
148 movq %rcx, %rdi // Swizzle args
150 call ASM_PFX(SecValloc)
152 popq %rdi // restore state
157 ASM_GLOBAL ASM_PFX(GasketSecFree)
158 ASM_PFX(GasketSecFree):
159 pushq %rbp // stack frame is for the debugger
162 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
165 movq %rcx, %rdi // Swizzle args
167 call ASM_PFX(SecFree)
169 popq %rdi // restore state
175 ASM_GLOBAL ASM_PFX(GasketSecSetTimer)
176 ASM_PFX(GasketSecSetTimer):
177 pushq %rbp // stack frame is for the debugger
180 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
183 movq %rcx, %rdi // Swizzle args
186 call ASM_PFX(SecSetTimer)
188 popq %rdi // restore state
194 ASM_GLOBAL ASM_PFX(GasketSecEnableInterrupt)
195 ASM_PFX(GasketSecEnableInterrupt):
196 pushq %rbp // stack frame is for the debugger
199 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
202 call ASM_PFX(SecEnableInterrupt)
204 popq %rdi // restore state
210 ASM_GLOBAL ASM_PFX(GasketSecDisableInterrupt)
211 ASM_PFX(GasketSecDisableInterrupt):
212 pushq %rbp // stack frame is for the debugger
215 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
218 call ASM_PFX(SecDisableInterrupt)
220 popq %rdi // restore state
225 ASM_GLOBAL ASM_PFX(GasketQueryPerformanceFrequency)
226 ASM_PFX(GasketQueryPerformanceFrequency):
227 pushq %rbp // stack frame is for the debugger
230 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
233 call ASM_PFX(QueryPerformanceFrequency)
235 popq %rdi // restore state
241 ASM_GLOBAL ASM_PFX(GasketQueryPerformanceCounter)
242 ASM_PFX(GasketQueryPerformanceCounter):
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 call ASM_PFX(QueryPerformanceCounter)
251 popq %rdi // restore state
257 ASM_GLOBAL ASM_PFX(GasketSecSleep)
258 ASM_PFX(GasketSecSleep):
259 pushq %rbp // stack frame is for the debugger
262 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
265 movq %rcx, %rdi // Swizzle args
267 call ASM_PFX(SecSleep)
269 popq %rdi // restore state
275 ASM_GLOBAL ASM_PFX(GasketSecCpuSleep)
276 ASM_PFX(GasketSecCpuSleep):
277 pushq %rbp // stack frame is for the debugger
280 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
283 call ASM_PFX(SecCpuSleep)
285 popq %rdi // restore state
291 ASM_GLOBAL ASM_PFX(GasketSecExit)
292 ASM_PFX(GasketSecExit):
293 pushq %rbp // stack frame is for the debugger
296 movq %rcx, %rdi // Swizzle args
297 call ASM_PFX(SecExit) // Less to do as we will never return to EFI ABI world
299 jmp LDEAD_LOOP // _exit should never return
302 ASM_GLOBAL ASM_PFX(GasketSecGetTime)
303 ASM_PFX(GasketSecGetTime):
304 pushq %rbp // stack frame is for the debugger
307 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
310 movq %rcx, %rdi // Swizzle args
313 call ASM_PFX(SecGetTime)
315 popq %rdi // restore state
320 ASM_GLOBAL ASM_PFX(GasketSecSetTime)
321 ASM_PFX(GasketSecSetTime):
322 pushq %rbp // stack frame is for the debugger
325 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
328 movq %rcx, %rdi // Swizzle args
331 call ASM_PFX(SecSetTime)
333 popq %rdi // restore state
339 ASM_GLOBAL ASM_PFX(GasketSecGetNextProtocol)
340 ASM_PFX(GasketSecGetNextProtocol):
341 pushq %rbp // stack frame is for the debugger
344 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
347 movq %rcx, %rdi // Swizzle args
352 call ASM_PFX(SecGetNextProtocol)
354 popq %rdi // restore state
359 // PPIs produced by SEC
361 ASM_GLOBAL ASM_PFX(GasketSecPeCoffGetEntryPoint)
362 ASM_PFX(GasketSecPeCoffGetEntryPoint):
363 pushq %rbp // stack frame is for the debugger
366 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
369 movq %rcx, %rdi // Swizzle args
372 call ASM_PFX(SecPeCoffGetEntryPoint)
374 popq %rdi // restore state
379 ASM_GLOBAL ASM_PFX(GasketSecPeCoffRelocateImageExtraAction)
380 ASM_PFX(GasketSecPeCoffRelocateImageExtraAction):
381 pushq %rbp // stack frame is for the debugger
384 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
387 movq %rcx, %rdi // Swizzle args
389 call ASM_PFX(SecPeCoffRelocateImageExtraAction)
391 popq %rdi // restore state
396 ASM_GLOBAL ASM_PFX(GasketSecPeCoffUnloadImageExtraAction)
397 ASM_PFX(GasketSecPeCoffUnloadImageExtraAction):
398 pushq %rbp // stack frame is for the debugger
401 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
404 movq %rcx, %rdi // Swizzle args
406 call ASM_PFX(SecPeCoffUnloadImageExtraAction)
408 popq %rdi // restore state
414 ASM_GLOBAL ASM_PFX(GasketSecEmuThunkAddress)
415 ASM_PFX(GasketSecEmuThunkAddress):
416 pushq %rbp // stack frame is for the debugger
419 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
422 call ASM_PFX(SecEmuThunkAddress)
424 popq %rdi // restore state
430 // Gasket functions for EFI_EMU_UGA_IO_PROTOCOL
433 ASM_GLOBAL ASM_PFX(GasketX11Size)
434 ASM_PFX(GasketX11Size):
435 pushq %rbp // stack frame is for the debugger
438 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
441 movq %rcx, %rdi // Swizzle args
446 call ASM_PFX(X11Size)
448 popq %rdi // restore state
454 ASM_GLOBAL ASM_PFX(GasketX11CheckKey)
455 ASM_PFX(GasketX11CheckKey):
456 pushq %rbp // stack frame is for the debugger
459 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
462 movq %rcx, %rdi // Swizzle args
464 call ASM_PFX(X11CheckKey)
466 popq %rdi // restore state
471 ASM_GLOBAL ASM_PFX(GasketX11GetKey)
472 ASM_PFX(GasketX11GetKey):
473 pushq %rbp // stack frame is for the debugger
476 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
479 movq %rcx, %rdi // Swizzle args
482 call ASM_PFX(X11GetKey)
484 popq %rdi // restore state
490 ASM_GLOBAL ASM_PFX(GasketX11KeySetState)
491 ASM_PFX(GasketX11KeySetState):
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
501 call ASM_PFX(X11KeySetState)
503 popq %rdi // restore state
509 ASM_GLOBAL ASM_PFX(GasketX11RegisterKeyNotify)
510 ASM_PFX(GasketX11RegisterKeyNotify):
511 pushq %rbp // stack frame is for the debugger
514 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
517 movq %rcx, %rdi // Swizzle args
522 call ASM_PFX(X11RegisterKeyNotify)
524 popq %rdi // restore state
530 ASM_GLOBAL ASM_PFX(GasketX11Blt)
531 ASM_PFX(GasketX11Blt):
532 pushq %rbp // stack frame is for the debugger
535 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
538 movq %rcx, %rdi // Swizzle args
545 popq %rdi // restore state
551 ASM_GLOBAL ASM_PFX(GasketX11CheckPointer)
552 ASM_PFX(GasketX11CheckPointer):
553 pushq %rbp // stack frame is for the debugger
556 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
559 movq %rcx, %rdi // Swizzle args
561 call ASM_PFX(X11CheckPointer)
563 popq %rdi // restore state
569 ASM_GLOBAL ASM_PFX(GasketX11GetPointerState)
570 ASM_PFX(GasketX11GetPointerState):
571 pushq %rbp // stack frame is for the debugger
574 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
577 movq %rcx, %rdi // Swizzle args
580 call ASM_PFX(X11GetPointerState)
582 popq %rdi // restore state
588 ASM_GLOBAL ASM_PFX(GasketX11GraphicsWindowOpen)
589 ASM_PFX(GasketX11GraphicsWindowOpen):
590 pushq %rbp // stack frame is for the debugger
593 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
596 movq %rcx, %rdi // Swizzle args
598 call ASM_PFX(X11GraphicsWindowOpen)
600 popq %rdi // restore state
606 ASM_GLOBAL ASM_PFX(GasketX11GraphicsWindowClose)
607 ASM_PFX(GasketX11GraphicsWindowClose):
608 pushq %rbp // stack frame is for the debugger
611 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
614 movq %rcx, %rdi // Swizzle args
617 call ASM_PFX(X11GraphicsWindowClose)
619 popq %rdi // restore state
627 ASM_GLOBAL ASM_PFX(GasketPthreadMutexLock)
628 ASM_PFX(GasketPthreadMutexLock):
629 pushq %rbp // stack frame is for the debugger
632 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
635 movq %rcx, %rdi // Swizzle args
637 call ASM_PFX(PthreadMutexLock)
639 popq %rdi // restore state
645 ASM_GLOBAL ASM_PFX(GasketPthreadMutexUnLock)
646 ASM_PFX(GasketPthreadMutexUnLock):
647 pushq %rbp // stack frame is for the debugger
650 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
653 movq %rcx, %rdi // Swizzle args
655 call ASM_PFX(PthreadMutexUnLock)
657 popq %rdi // restore state
662 ASM_GLOBAL ASM_PFX(GasketPthreadMutexTryLock)
663 ASM_PFX(GasketPthreadMutexTryLock):
664 pushq %rbp // stack frame is for the debugger
667 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
670 movq %rcx, %rdi // Swizzle args
672 call ASM_PFX(PthreadMutexTryLock)
674 popq %rdi // restore state
679 ASM_GLOBAL ASM_PFX(GasketPthreadMutexInit)
680 ASM_PFX(GasketPthreadMutexInit):
681 pushq %rbp // stack frame is for the debugger
684 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
688 call ASM_PFX(PthreadMutexInit)
690 popq %rdi // restore state
697 ASM_GLOBAL ASM_PFX(GasketPthreadMutexDestroy)
698 ASM_PFX(GasketPthreadMutexDestroy):
699 pushq %rbp // stack frame is for the debugger
702 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
705 movq %rcx, %rdi // Swizzle args
707 call ASM_PFX(PthreadMutexDestroy)
709 popq %rdi // restore state
715 ASM_GLOBAL ASM_PFX(GasketPthreadCreate)
716 ASM_PFX(GasketPthreadCreate):
717 pushq %rbp // stack frame is for the debugger
720 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
723 movq %rcx, %rdi // Swizzle args
728 call ASM_PFX(PthreadCreate)
730 popq %rdi // restore state
736 ASM_GLOBAL ASM_PFX(GasketPthreadExit)
737 ASM_PFX(GasketPthreadExit):
738 pushq %rbp // stack frame is for the debugger
741 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
744 movq %rcx, %rdi // Swizzle args
746 call ASM_PFX(PthreadExit)
748 popq %rdi // restore state
755 ASM_GLOBAL ASM_PFX(GasketPthreadSelf)
756 ASM_PFX(GasketPthreadSelf):
757 pushq %rbp // stack frame is for the debugger
760 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
764 call ASM_PFX(PthreadSelf)
766 popq %rdi // restore state
772 ASM_GLOBAL ASM_PFX(GasketPthreadOpen)
773 ASM_PFX(GasketPthreadOpen):
774 pushq %rbp // stack frame is for the debugger
777 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
780 movq %rcx, %rdi // Swizzle args
782 call ASM_PFX(PthreadOpen)
784 popq %rdi // restore state
790 ASM_GLOBAL ASM_PFX(GasketPthreadClose)
791 ASM_PFX(GasketPthreadClose):
792 pushq %rbp // stack frame is for the debugger
795 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
798 movq %rcx, %rdi // Swizzle args
800 call ASM_PFX(PthreadClose)
802 popq %rdi // restore state
811 // UNIX ABI to EFI ABI call
814 // ReverseGasketUint64 (
818 ASM_GLOBAL ASM_PFX(ReverseGasketUint64)
819 ASM_PFX(ReverseGasketUint64):
820 pushq %rbp // stack frame is for the debugger
823 movq %rdi, %rax // Swizzle args
826 subq $32, %rsp // 32-byte shadow space
834 // UNIX ABI to EFI ABI call
837 // ReverseGasketUint64Uint64 (
842 ASM_GLOBAL ASM_PFX(ReverseGasketUint64Uint64)
843 ASM_PFX(ReverseGasketUint64Uint64):
844 pushq %rbp // stack frame is for the debugger
847 movq %rdi, %rax // Swizzle args
850 subq $32, %rsp // 32-byte shadow space
858 ASM_GLOBAL ASM_PFX(GasketSecUnixPeiAutoScan)
859 ASM_PFX(GasketSecUnixPeiAutoScan):
860 pushq %rbp // stack frame is for the debugger
863 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
866 movq %rcx, %rdi // Swizzle args
870 call ASM_PFX(SecUnixPeiAutoScan)
872 popq %rdi // restore state
878 ASM_GLOBAL ASM_PFX(GasketSecUnixFdAddress)
879 ASM_PFX(GasketSecUnixFdAddress):
880 pushq %rbp // stack frame is for the debugger
883 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
886 movq %rcx, %rdi // Swizzle args
891 call ASM_PFX(SecUnixFdAddress)
893 popq %rdi // restore state
899 // EmuIoThunk SimpleFileSystem
901 ASM_GLOBAL ASM_PFX(GasketPosixOpenVolume)
902 ASM_PFX(GasketPosixOpenVolume):
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
914 call ASM_PFX(PosixOpenVolume)
916 popq %rdi // restore state
922 ASM_GLOBAL ASM_PFX(GasketPosixFileOpen)
923 ASM_PFX(GasketPosixFileOpen):
924 pushq %rbp // stack frame is for the debugger
927 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
930 movq %rcx, %rdi // Swizzle args
936 call ASM_PFX(PosixFileOpen)
938 popq %rdi // restore state
944 ASM_GLOBAL ASM_PFX(GasketPosixFileCLose)
945 ASM_PFX(GasketPosixFileCLose):
946 pushq %rbp // stack frame is for the debugger
949 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
952 movq %rcx, %rdi // Swizzle args
954 call ASM_PFX(PosixFileCLose)
956 popq %rdi // restore state
962 ASM_GLOBAL ASM_PFX(GasketPosixFileDelete)
963 ASM_PFX(GasketPosixFileDelete):
964 pushq %rbp // stack frame is for the debugger
967 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
970 movq %rcx, %rdi // Swizzle args
972 call ASM_PFX(PosixFileDelete)
974 popq %rdi // restore state
980 ASM_GLOBAL ASM_PFX(GasketPosixFileRead)
981 ASM_PFX(GasketPosixFileRead):
982 pushq %rbp // stack frame is for the debugger
985 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
988 movq %rcx, %rdi // Swizzle args
992 call ASM_PFX(PosixFileRead)
994 popq %rdi // restore state
1000 ASM_GLOBAL ASM_PFX(GasketPosixFileWrite)
1001 ASM_PFX(GasketPosixFileWrite):
1002 pushq %rbp // stack frame is for the debugger
1005 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1008 movq %rcx, %rdi // Swizzle args
1012 call ASM_PFX(PosixFileWrite)
1014 popq %rdi // restore state
1020 ASM_GLOBAL ASM_PFX(GasketPosixFileSetPossition)
1021 ASM_PFX(GasketPosixFileSetPossition):
1022 pushq %rbp // stack frame is for the debugger
1025 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1028 movq %rcx, %rdi // Swizzle args
1031 call ASM_PFX(PosixFileSetPossition)
1033 popq %rdi // restore state
1039 ASM_GLOBAL ASM_PFX(GasketPosixFileGetPossition)
1040 ASM_PFX(GasketPosixFileGetPossition):
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
1050 call ASM_PFX(PosixFileGetPossition)
1052 popq %rdi // restore state
1058 ASM_GLOBAL ASM_PFX(GasketPosixFileGetInfo)
1059 ASM_PFX(GasketPosixFileGetInfo):
1060 pushq %rbp // stack frame is for the debugger
1063 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1066 movq %rcx, %rdi // Swizzle args
1071 call ASM_PFX(PosixFileGetInfo)
1073 popq %rdi // restore state
1079 ASM_GLOBAL ASM_PFX(GasketPosixFileSetInfo)
1080 ASM_PFX(GasketPosixFileSetInfo):
1081 pushq %rbp // stack frame is for the debugger
1084 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1087 movq %rcx, %rdi // Swizzle args
1092 call ASM_PFX(PosixFileSetInfo)
1094 popq %rdi // restore state
1100 ASM_GLOBAL ASM_PFX(GasketPosixFileFlush)
1101 ASM_PFX(GasketPosixFileFlush):
1102 pushq %rbp // stack frame is for the debugger
1105 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1108 movq %rcx, %rdi // Swizzle args
1110 call ASM_PFX(PosixFileFlush)
1112 popq %rdi // restore state
1118 ASM_GLOBAL ASM_PFX(GasketPosixFileSystmeThunkOpen)
1119 ASM_PFX(GasketPosixFileSystmeThunkOpen):
1120 pushq %rbp // stack frame is for the debugger
1123 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1126 movq %rcx, %rdi // Swizzle args
1128 call ASM_PFX(PosixFileSystmeThunkOpen)
1130 popq %rdi // restore state
1136 ASM_GLOBAL ASM_PFX(GasketPosixFileSystmeThunkClose)
1137 ASM_PFX(GasketPosixFileSystmeThunkClose):
1138 pushq %rbp // stack frame is for the debugger
1141 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1144 movq %rcx, %rdi // Swizzle args
1146 call ASM_PFX(PosixFileSystmeThunkClose)
1148 popq %rdi // restore state
1153 ASM_GLOBAL ASM_PFX(GasketEmuBlockIoReset)
1154 ASM_PFX(GasketEmuBlockIoReset):
1155 pushq %rbp // stack frame is for the debugger
1158 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1161 movq %rcx, %rdi // Swizzle args
1164 call ASM_PFX(EmuBlockIoReset)
1166 popq %rdi // restore state
1172 ASM_GLOBAL ASM_PFX(GasketEmuBlockIoReadBlocks)
1173 ASM_PFX(GasketEmuBlockIoReadBlocks):
1174 pushq %rbp // stack frame is for the debugger
1177 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1180 movq %rcx, %rdi // Swizzle args
1187 call ASM_PFX(EmuBlockIoReadBlocks)
1189 popq %rdi // restore state
1195 ASM_GLOBAL ASM_PFX(GasketEmuBlockIoWriteBlocks)
1196 ASM_PFX(GasketEmuBlockIoWriteBlocks):
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
1210 call ASM_PFX(EmuBlockIoWriteBlocks)
1212 popq %rdi // restore state
1218 ASM_GLOBAL ASM_PFX(GasketEmuBlockIoFlushBlocks)
1219 ASM_PFX(GasketEmuBlockIoFlushBlocks):
1220 pushq %rbp // stack frame is for the debugger
1223 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1226 movq %rcx, %rdi // Swizzle args
1229 call ASM_PFX(EmuBlockIoFlushBlocks)
1231 popq %rdi // restore state
1237 ASM_GLOBAL ASM_PFX(GasketEmuBlockIoCreateMapping)
1238 ASM_PFX(GasketEmuBlockIoCreateMapping):
1239 pushq %rbp // stack frame is for the debugger
1242 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1245 movq %rcx, %rdi // Swizzle args
1248 call ASM_PFX(EmuBlockIoCreateMapping)
1250 popq %rdi // restore state
1256 ASM_GLOBAL ASM_PFX(GasketBlockIoThunkOpen)
1257 ASM_PFX(GasketBlockIoThunkOpen):
1258 pushq %rbp // stack frame is for the debugger
1261 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1264 movq %rcx, %rdi // Swizzle args
1266 call ASM_PFX(EmuBlockIoThunkOpen)
1268 popq %rdi // restore state
1274 ASM_GLOBAL ASM_PFX(GasketBlockIoThunkClose)
1275 ASM_PFX(GasketBlockIoThunkClose):
1276 pushq %rbp // stack frame is for the debugger
1279 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1282 movq %rcx, %rdi // Swizzle args
1284 call ASM_PFX(EmuBlockIoThunkClose)
1286 popq %rdi // restore state
1293 ASM_GLOBAL ASM_PFX(GasketSnpCreateMapping)
1294 ASM_PFX(GasketSnpCreateMapping):
1295 pushq %rbp // stack frame is for the debugger
1298 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1301 movq %rcx, %rdi // Swizzle args
1304 call ASM_PFX(EmuSnpCreateMapping)
1306 popq %rdi // restore state
1312 ASM_GLOBAL ASM_PFX(GasketSnpStart)
1313 ASM_PFX(GasketSnpStart):
1314 pushq %rbp // stack frame is for the debugger
1317 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1320 movq %rcx, %rdi // Swizzle args
1322 call ASM_PFX(EmuSnpStart)
1324 popq %rdi // restore state
1330 ASM_GLOBAL ASM_PFX(GasketSnpStop)
1331 ASM_PFX(GasketSnpStop):
1332 pushq %rbp // stack frame is for the debugger
1335 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1338 movq %rcx, %rdi // Swizzle args
1340 call ASM_PFX(EmuSnpStop)
1342 popq %rdi // restore state
1348 ASM_GLOBAL ASM_PFX(GasketSnpInitialize)
1349 ASM_PFX(GasketSnpInitialize):
1350 pushq %rbp // stack frame is for the debugger
1353 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1356 movq %rcx, %rdi // Swizzle args
1360 call ASM_PFX(EmuSnpInitialize)
1362 popq %rdi // restore state
1369 ASM_GLOBAL ASM_PFX(GasketSnpReset)
1370 ASM_PFX(GasketSnpReset):
1371 pushq %rbp // stack frame is for the debugger
1374 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1377 movq %rcx, %rdi // Swizzle args
1380 call ASM_PFX(EmuSnpReset)
1382 popq %rdi // restore state
1388 ASM_GLOBAL ASM_PFX(GasketSnpShutdown)
1389 ASM_PFX(GasketSnpShutdown):
1390 pushq %rbp // stack frame is for the debugger
1393 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1396 movq %rcx, %rdi // Swizzle args
1398 call ASM_PFX(EmuSnpShutdown)
1400 popq %rdi // restore state
1406 ASM_GLOBAL ASM_PFX(GasketSnpReceiveFilters)
1407 ASM_PFX(GasketSnpReceiveFilters):
1408 pushq %rbp // stack frame is for the debugger
1411 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1414 movq %rcx, %rdi // Swizzle args
1421 call ASM_PFX(EmuSnpReceiveFilters)
1423 popq %rdi // restore state
1429 ASM_GLOBAL ASM_PFX(GasketSnpStationAddress)
1430 ASM_PFX(GasketSnpStationAddress):
1431 pushq %rbp // stack frame is for the debugger
1434 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1437 movq %rcx, %rdi // Swizzle args
1441 call ASM_PFX(EmuSnpStationAddress)
1443 popq %rdi // restore state
1450 ASM_GLOBAL ASM_PFX(GasketSnpStatistics)
1451 ASM_PFX(GasketSnpStatistics):
1452 pushq %rbp // stack frame is for the debugger
1455 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1458 movq %rcx, %rdi // Swizzle args
1463 call ASM_PFX(EmuSnpStatistics)
1465 popq %rdi // restore state
1471 ASM_GLOBAL ASM_PFX(GasketSnpMCastIpToMac)
1472 ASM_PFX(GasketSnpMCastIpToMac):
1473 pushq %rbp // stack frame is for the debugger
1476 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1479 movq %rcx, %rdi // Swizzle args
1484 call ASM_PFX(EmuSnpMCastIpToMac)
1486 popq %rdi // restore state
1492 ASM_GLOBAL ASM_PFX(GasketSnpNvData)
1493 ASM_PFX(GasketSnpNvData):
1494 pushq %rbp // stack frame is for the debugger
1497 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1500 movq %rcx, %rdi // Swizzle args
1506 call ASM_PFX(EmuSnpNvData)
1508 popq %rdi // restore state
1514 ASM_GLOBAL ASM_PFX(GasketSnpGetStatus)
1515 ASM_PFX(GasketSnpGetStatus):
1516 pushq %rbp // stack frame is for the debugger
1519 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1522 movq %rcx, %rdi // Swizzle args
1526 call ASM_PFX(EmuSnpGetStatus)
1528 popq %rdi // restore state
1535 ASM_GLOBAL ASM_PFX(GasketSnpTransmit)
1536 ASM_PFX(GasketSnpTransmit):
1537 pushq %rbp // stack frame is for the debugger
1539 subq $16, %rsp // Allocate space for args on the stack
1541 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1544 movq %rcx, %rdi // Swizzle args
1553 call ASM_PFX(EmuSnpTransmit)
1556 popq %rdi // restore state
1563 ASM_GLOBAL ASM_PFX(GasketSnpReceive)
1564 ASM_PFX(GasketSnpReceive):
1565 pushq %rbp // stack frame is for the debugger
1567 subq $16, %rsp // Allocate space for args on the stack
1569 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1572 movq %rcx, %rdi // Swizzle args
1581 call ASM_PFX(EmuSnpReceive)
1584 popq %rdi // restore state
1590 ASM_GLOBAL ASM_PFX(GasketSnpThunkOpen)
1591 ASM_PFX(GasketSnpThunkOpen):
1592 pushq %rbp // stack frame is for the debugger
1595 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1598 movq %rcx, %rdi // Swizzle args
1600 call ASM_PFX(EmuSnpThunkOpen)
1602 popq %rdi // restore state
1608 ASM_GLOBAL ASM_PFX(GasketSnpThunkClose)
1609 ASM_PFX(GasketSnpThunkClose):
1610 pushq %rbp // stack frame is for the debugger
1613 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1616 movq %rcx, %rdi // Swizzle args
1618 call ASM_PFX(EmuSnpThunkClose)
1620 popq %rdi // restore state