1 #------------------------------------------------------------------------------
3 # Manage differenced between UNIX ABI and EFI/Windows ABI
5 # For IA-32 the only difference is Mac OS X requires a 16-byte aligned stack.
6 # For Linux this stack adjustment is a no-op, but we may as well make the
9 # Copyright (c) 2008 - 2011, Apple Inc. All rights reserved.<BR>
10 # SPDX-License-Identifier: BSD-2-Clause-Patent
12 #------------------------------------------------------------------------------
19 // EMU_THUNK_PROTOCOL gaskets (EFIAPI to UNIX ABI)
23 ASM_GLOBAL ASM_PFX(GasketSecWriteStdErr)
24 ASM_PFX(GasketSecWriteStdErr):
27 subl $24, %esp // sub extra 16 from the stack for alignment
28 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
34 call ASM_PFX(SecWriteStdErr)
40 ASM_GLOBAL ASM_PFX(GasketSecConfigStdIn)
41 ASM_PFX(GasketSecConfigStdIn):
44 subl $24, %esp // sub extra 16 from the stack for alignment
45 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
51 call ASM_PFX(SecConfigStdIn)
56 ASM_GLOBAL ASM_PFX(GasketSecWriteStdOut)
57 ASM_PFX(GasketSecWriteStdOut):
60 subl $24, %esp // sub extra 16 from the stack for alignment
61 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
67 call ASM_PFX(SecWriteStdOut)
72 ASM_GLOBAL ASM_PFX(GasketSecReadStdIn)
73 ASM_PFX(GasketSecReadStdIn):
76 subl $24, %esp // sub extra 16 from the stack for alignment
77 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
83 call ASM_PFX(SecReadStdIn)
88 ASM_GLOBAL ASM_PFX(GasketSecPollStdIn)
89 ASM_PFX(GasketSecPollStdIn):
92 subl $24, %esp // sub extra 16 from the stack for alignment
93 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
99 call ASM_PFX(SecPollStdIn)
104 ASM_GLOBAL ASM_PFX(GasketSecMalloc)
105 ASM_PFX(GasketSecMalloc):
108 subl $24, %esp // sub extra 16 from the stack for alignment
109 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
113 call ASM_PFX(SecMalloc)
118 ASM_GLOBAL ASM_PFX(GasketSecValloc)
119 ASM_PFX(GasketSecValloc):
122 subl $24, %esp // sub extra 16 from the stack for alignment
123 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
127 call ASM_PFX(SecValloc)
132 ASM_GLOBAL ASM_PFX(GasketSecFree)
133 ASM_PFX(GasketSecFree):
136 subl $24, %esp // sub extra 16 from the stack for alignment
137 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
141 call ASM_PFX(SecFree)
147 ASM_GLOBAL ASM_PFX(GasketSecSetTimer)
148 ASM_PFX(GasketSecSetTimer):
151 subl $40, %esp // sub extra 16 from the stack for alignment
152 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
160 call ASM_PFX(SecSetTimer)
166 ASM_GLOBAL ASM_PFX(GasketSecEnableInterrupt)
167 ASM_PFX(GasketSecEnableInterrupt):
170 subl $24, %esp // sub extra 16 from the stack for alignment
171 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
173 call ASM_PFX(SecEnableInterrupt)
179 ASM_GLOBAL ASM_PFX(GasketSecDisableInterrupt)
180 ASM_PFX(GasketSecDisableInterrupt):
183 subl $24, %esp // sub extra 16 from the stack for alignment
184 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
186 call ASM_PFX(SecDisableInterrupt)
191 ASM_GLOBAL ASM_PFX(GasketQueryPerformanceFrequency)
192 ASM_PFX(GasketQueryPerformanceFrequency):
195 subl $24, %esp // sub extra 16 from the stack for alignment
196 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
198 call ASM_PFX(QueryPerformanceFrequency)
204 ASM_GLOBAL ASM_PFX(GasketQueryPerformanceCounter)
205 ASM_PFX(GasketQueryPerformanceCounter):
208 subl $24, %esp // sub extra 16 from the stack for alignment
209 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
211 call ASM_PFX(QueryPerformanceCounter)
217 ASM_GLOBAL ASM_PFX(GasketSecSleep)
218 ASM_PFX(GasketSecSleep):
221 subl $24, %esp // sub extra 16 from the stack for alignment
222 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
228 call ASM_PFX(SecSleep)
234 ASM_GLOBAL ASM_PFX(GasketSecCpuSleep)
235 ASM_PFX(GasketSecCpuSleep):
238 subl $24, %esp // sub extra 16 from the stack for alignment
239 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
241 call ASM_PFX(SecCpuSleep)
247 ASM_GLOBAL ASM_PFX(GasketSecExit)
248 ASM_PFX(GasketSecExit):
251 subl $24, %esp // sub extra 16 from the stack for alignment
252 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
256 call ASM_PFX(SecExit) // Less to do as we will never return to EFI ABI world
258 jmp LDEAD_LOOP // _exit should never return
261 ASM_GLOBAL ASM_PFX(GasketSecGetTime)
262 ASM_PFX(GasketSecGetTime):
265 subl $24, %esp // sub extra 16 from the stack for alignment
266 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
272 call ASM_PFX(SecGetTime)
277 ASM_GLOBAL ASM_PFX(GasketSecSetTime)
278 ASM_PFX(GasketSecSetTime):
281 subl $24, %esp // sub extra 16 from the stack for alignment
282 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
288 call ASM_PFX(SecSetTime)
294 ASM_GLOBAL ASM_PFX(GasketSecGetNextProtocol)
295 ASM_PFX(GasketSecGetNextProtocol):
298 subl $40, %esp // sub extra 16 from the stack for alignment
299 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
309 call ASM_PFX(SecGetNextProtocol)
314 // PPIs produced by SEC
316 ASM_GLOBAL ASM_PFX(GasketSecPeCoffGetEntryPoint)
317 ASM_PFX(GasketSecPeCoffGetEntryPoint):
320 subl $24, %esp // sub extra 16 from the stack for alignment
321 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
327 call ASM_PFX(SecPeCoffGetEntryPoint)
332 ASM_GLOBAL ASM_PFX(GasketSecPeCoffRelocateImageExtraAction)
333 ASM_PFX(GasketSecPeCoffRelocateImageExtraAction):
336 subl $24, %esp // sub extra 16 from the stack for alignment
337 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
341 call ASM_PFX(SecPeCoffRelocateImageExtraAction)
346 ASM_GLOBAL ASM_PFX(GasketSecPeCoffUnloadImageExtraAction)
347 ASM_PFX(GasketSecPeCoffUnloadImageExtraAction):
350 subl $24, %esp // sub extra 16 from the stack for alignment
351 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
355 call ASM_PFX(SecPeCoffUnloadImageExtraAction)
361 ASM_GLOBAL ASM_PFX(GasketSecEmuThunkAddress)
362 ASM_PFX(GasketSecEmuThunkAddress):
365 subl $24, %esp // sub extra 16 from the stack for alignment
366 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
368 call ASM_PFX(SecEmuThunkAddress)
374 // Gasket functions for EFI_EMU_UGA_IO_PROTOCOL
377 ASM_GLOBAL ASM_PFX(GasketX11Size)
378 ASM_PFX(GasketX11Size):
381 subl $40, %esp // sub extra 16 from the stack for alignment
382 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
392 call ASM_PFX(X11Size)
398 ASM_GLOBAL ASM_PFX(GasketX11CheckKey)
399 ASM_PFX(GasketX11CheckKey):
402 subl $24, %esp // sub extra 16 from the stack for alignment
403 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
407 call ASM_PFX(X11CheckKey)
412 ASM_GLOBAL ASM_PFX(GasketX11GetKey)
413 ASM_PFX(GasketX11GetKey):
416 subl $24, %esp // sub extra 16 from the stack for alignment
417 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
423 call ASM_PFX(X11GetKey)
429 ASM_GLOBAL ASM_PFX(GasketX11KeySetState)
430 ASM_PFX(GasketX11KeySetState):
433 subl $24, %esp // sub extra 16 from the stack for alignment
434 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
440 call ASM_PFX(X11KeySetState)
446 ASM_GLOBAL ASM_PFX(GasketX11RegisterKeyNotify)
447 ASM_PFX(GasketX11RegisterKeyNotify):
450 subl $40, %esp // sub extra 16 from the stack for alignment
451 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
461 call ASM_PFX(X11RegisterKeyNotify)
467 ASM_GLOBAL ASM_PFX(GasketX11Blt)
468 ASM_PFX(GasketX11Blt):
471 subl $40, %esp // sub extra 16 from the stack for alignment
472 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
488 ASM_GLOBAL ASM_PFX(GasketX11CheckPointer)
489 ASM_PFX(GasketX11CheckPointer):
492 subl $24, %esp // sub extra 16 from the stack for alignment
493 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
497 call ASM_PFX(X11CheckPointer)
503 ASM_GLOBAL ASM_PFX(GasketX11GetPointerState)
504 ASM_PFX(GasketX11GetPointerState):
507 subl $24, %esp // sub extra 16 from the stack for alignment
508 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
514 call ASM_PFX(X11GetPointerState)
520 ASM_GLOBAL ASM_PFX(GasketX11GraphicsWindowOpen)
521 ASM_PFX(GasketX11GraphicsWindowOpen):
524 subl $24, %esp // sub extra 16 from the stack for alignment
525 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
529 call ASM_PFX(X11GraphicsWindowOpen)
535 ASM_GLOBAL ASM_PFX(GasketX11GraphicsWindowClose)
536 ASM_PFX(GasketX11GraphicsWindowClose):
539 subl $24, %esp // sub extra 16 from the stack for alignment
540 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
546 call ASM_PFX(X11GraphicsWindowClose)
554 ASM_GLOBAL ASM_PFX(GasketPthreadMutexLock)
555 ASM_PFX(GasketPthreadMutexLock):
558 subl $24, %esp // sub extra 16 from the stack for alignment
559 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
563 call ASM_PFX(PthreadMutexLock)
569 ASM_GLOBAL ASM_PFX(GasketPthreadMutexUnLock)
570 ASM_PFX(GasketPthreadMutexUnLock):
573 subl $24, %esp // sub extra 16 from the stack for alignment
574 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
578 call ASM_PFX(PthreadMutexUnLock)
583 ASM_GLOBAL ASM_PFX(GasketPthreadMutexTryLock)
584 ASM_PFX(GasketPthreadMutexTryLock):
587 subl $24, %esp // sub extra 16 from the stack for alignment
588 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
592 call ASM_PFX(PthreadMutexTryLock)
597 ASM_GLOBAL ASM_PFX(GasketPthreadMutexInit)
598 ASM_PFX(GasketPthreadMutexInit):
601 subl $24, %esp // sub extra 16 from the stack for alignment
602 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
604 call ASM_PFX(PthreadMutexInit)
611 ASM_GLOBAL ASM_PFX(GasketPthreadMutexDestroy)
612 ASM_PFX(GasketPthreadMutexDestroy):
615 subl $24, %esp // sub extra 16 from the stack for alignment
616 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
620 call ASM_PFX(PthreadMutexDestroy)
626 ASM_GLOBAL ASM_PFX(GasketPthreadCreate)
627 ASM_PFX(GasketPthreadCreate):
630 subl $40, %esp // sub extra 16 from the stack for alignment
631 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
641 call ASM_PFX(PthreadCreate)
647 ASM_GLOBAL ASM_PFX(GasketPthreadExit)
648 ASM_PFX(GasketPthreadExit):
651 subl $24, %esp // sub extra 16 from the stack for alignment
652 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
656 call ASM_PFX(PthreadExit)
663 ASM_GLOBAL ASM_PFX(GasketPthreadSelf)
664 ASM_PFX(GasketPthreadSelf):
667 subl $24, %esp // sub extra 16 from the stack for alignment
668 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
670 call ASM_PFX(PthreadSelf)
676 ASM_GLOBAL ASM_PFX(GasketPthreadOpen)
677 ASM_PFX(GasketPthreadOpen):
680 subl $24, %esp // sub extra 16 from the stack for alignment
681 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
685 call ASM_PFX(PthreadOpen)
691 ASM_GLOBAL ASM_PFX(GasketPthreadClose)
692 ASM_PFX(GasketPthreadClose):
695 subl $24, %esp // sub extra 16 from the stack for alignment
696 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
700 call ASM_PFX(PthreadClose)
709 // UNIX ABI to EFI ABI call
712 // ReverseGasketUint64 (
716 ASM_GLOBAL ASM_PFX(ReverseGasketUint64)
717 ASM_PFX(ReverseGasketUint64):
733 // UNIX ABI to EFI ABI call
736 // ReverseGasketUint64Uint64 (
741 ASM_GLOBAL ASM_PFX(ReverseGasketUint64Uint64)
742 ASM_PFX(ReverseGasketUint64Uint64):
760 ASM_GLOBAL ASM_PFX(GasketSecUnixPeiAutoScan)
761 ASM_PFX(GasketSecUnixPeiAutoScan):
764 subl $40, %esp // sub extra 16 from the stack for alignment
765 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
773 call ASM_PFX(SecUnixPeiAutoScan)
779 ASM_GLOBAL ASM_PFX(GasketSecUnixFdAddress)
780 ASM_PFX(GasketSecUnixFdAddress):
783 subl $40, %esp // sub extra 16 from the stack for alignment
784 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
794 call ASM_PFX(SecUnixFdAddress)
800 // EmuIoThunk SimpleFileSystem
802 ASM_GLOBAL ASM_PFX(GasketPosixOpenVolume)
803 ASM_PFX(GasketPosixOpenVolume):
806 subl $40, %esp // sub extra 16 from the stack for alignment
807 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
817 call ASM_PFX(PosixOpenVolume)
823 ASM_GLOBAL ASM_PFX(GasketPosixFileOpen)
824 ASM_PFX(GasketPosixFileOpen):
827 subl $56, %esp // sub extra 16 from the stack for alignment
828 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
844 call ASM_PFX(PosixFileOpen)
850 ASM_GLOBAL ASM_PFX(GasketPosixFileCLose)
851 ASM_PFX(GasketPosixFileCLose):
854 subl $24, %esp // sub extra 16 from the stack for alignment
855 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
859 call ASM_PFX(PosixFileCLose)
865 ASM_GLOBAL ASM_PFX(GasketPosixFileDelete)
866 ASM_PFX(GasketPosixFileDelete):
869 subl $24, %esp // sub extra 16 from the stack for alignment
870 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
874 call ASM_PFX(PosixFileDelete)
880 ASM_GLOBAL ASM_PFX(GasketPosixFileRead)
881 ASM_PFX(GasketPosixFileRead):
884 subl $40, %esp // sub extra 16 from the stack for alignment
885 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
893 call ASM_PFX(PosixFileRead)
899 ASM_GLOBAL ASM_PFX(GasketPosixFileWrite)
900 ASM_PFX(GasketPosixFileWrite):
903 subl $40, %esp // sub extra 16 from the stack for alignment
904 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
912 call ASM_PFX(PosixFileWrite)
918 ASM_GLOBAL ASM_PFX(GasketPosixFileSetPossition)
919 ASM_PFX(GasketPosixFileSetPossition):
922 subl $40, %esp // sub extra 16 from the stack for alignment
923 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
931 call ASM_PFX(PosixFileSetPossition)
937 ASM_GLOBAL ASM_PFX(GasketPosixFileGetPossition)
938 ASM_PFX(GasketPosixFileGetPossition):
941 subl $24, %esp // sub extra 16 from the stack for alignment
942 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
948 call ASM_PFX(PosixFileGetPossition)
954 ASM_GLOBAL ASM_PFX(GasketPosixFileGetInfo)
955 ASM_PFX(GasketPosixFileGetInfo):
958 subl $40, %esp // sub extra 16 from the stack for alignment
959 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
969 call ASM_PFX(PosixFileGetInfo)
975 ASM_GLOBAL ASM_PFX(GasketPosixFileSetInfo)
976 ASM_PFX(GasketPosixFileSetInfo):
979 subl $40, %esp // sub extra 16 from the stack for alignment
980 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
990 call ASM_PFX(PosixFileSetInfo)
996 ASM_GLOBAL ASM_PFX(GasketPosixFileFlush)
997 ASM_PFX(GasketPosixFileFlush):
1000 subl $24, %esp // sub extra 16 from the stack for alignment
1001 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1005 call ASM_PFX(PosixFileFlush)
1011 ASM_GLOBAL ASM_PFX(GasketPosixFileSystmeThunkOpen)
1012 ASM_PFX(GasketPosixFileSystmeThunkOpen):
1015 subl $24, %esp // sub extra 16 from the stack for alignment
1016 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1020 call ASM_PFX(PosixFileSystmeThunkOpen)
1026 ASM_GLOBAL ASM_PFX(GasketPosixFileSystmeThunkClose)
1027 ASM_PFX(GasketPosixFileSystmeThunkClose):
1030 subl $24, %esp // sub extra 16 from the stack for alignment
1031 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1035 call ASM_PFX(PosixFileSystmeThunkClose)
1040 ASM_GLOBAL ASM_PFX(GasketEmuBlockIoReset)
1041 ASM_PFX(GasketEmuBlockIoReset):
1044 subl $24, %esp // sub extra 16 from the stack for alignment
1045 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1051 call ASM_PFX(EmuBlockIoReset)
1057 ASM_GLOBAL ASM_PFX(GasketEmuBlockIoReadBlocks)
1058 ASM_PFX(GasketEmuBlockIoReadBlocks):
1061 subl $56, %esp // sub extra 16 from the stack for alignment
1062 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1078 call ASM_PFX(EmuBlockIoReadBlocks)
1084 ASM_GLOBAL ASM_PFX(GasketEmuBlockIoWriteBlocks)
1085 ASM_PFX(GasketEmuBlockIoWriteBlocks):
1088 subl $56, %esp // sub extra 16 from the stack for alignment
1089 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1105 call ASM_PFX(EmuBlockIoWriteBlocks)
1111 ASM_GLOBAL ASM_PFX(GasketEmuBlockIoFlushBlocks)
1112 ASM_PFX(GasketEmuBlockIoFlushBlocks): pushl %ebp
1114 subl $24, %esp // sub extra 16 from the stack for alignment
1115 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1122 call ASM_PFX(EmuBlockIoFlushBlocks)
1128 ASM_GLOBAL ASM_PFX(GasketEmuBlockIoCreateMapping)
1129 ASM_PFX(GasketEmuBlockIoCreateMapping):
1132 subl $24, %esp // sub extra 16 from the stack for alignment
1133 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1139 call ASM_PFX(EmuBlockIoCreateMapping)
1145 ASM_GLOBAL ASM_PFX(GasketBlockIoThunkOpen)
1146 ASM_PFX(GasketBlockIoThunkOpen):
1149 subl $24, %esp // sub extra 16 from the stack for alignment
1150 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1154 call ASM_PFX(EmuBlockIoThunkOpen)
1160 ASM_GLOBAL ASM_PFX(GasketBlockIoThunkClose)
1161 ASM_PFX(GasketBlockIoThunkClose):
1164 subl $24, %esp // sub extra 16 from the stack for alignment
1165 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1169 call ASM_PFX(EmuBlockIoThunkClose)
1176 ASM_GLOBAL ASM_PFX(GasketSnpCreateMapping)
1177 ASM_PFX(GasketSnpCreateMapping):
1180 subl $24, %esp // sub extra 16 from the stack for alignment
1181 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1187 call ASM_PFX(EmuSnpCreateMapping)
1193 ASM_GLOBAL ASM_PFX(GasketSnpStart)
1194 ASM_PFX(GasketSnpStart):
1197 subl $24, %esp // sub extra 16 from the stack for alignment
1198 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1202 call ASM_PFX(EmuSnpStart)
1208 ASM_GLOBAL ASM_PFX(GasketSnpStop)
1209 ASM_PFX(GasketSnpStop):
1212 subl $24, %esp // sub extra 16 from the stack for alignment
1213 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1217 call ASM_PFX(EmuSnpStop)
1223 ASM_GLOBAL ASM_PFX(GasketSnpInitialize)
1224 ASM_PFX(GasketSnpInitialize):
1227 subl $40, %esp // sub extra 16 from the stack for alignment
1228 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1236 call ASM_PFX(EmuSnpInitialize)
1242 ASM_GLOBAL ASM_PFX(GasketSnpReset)
1243 ASM_PFX(GasketSnpReset):
1246 subl $24, %esp // sub extra 16 from the stack for alignment
1247 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1253 call ASM_PFX(EmuSnpReset)
1259 ASM_GLOBAL ASM_PFX(GasketSnpShutdown)
1260 ASM_PFX(GasketSnpShutdown):
1263 subl $24, %esp // sub extra 16 from the stack for alignment
1264 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1268 call ASM_PFX(EmuSnpShutdown)
1274 ASM_GLOBAL ASM_PFX(GasketSnpReceiveFilters)
1275 ASM_PFX(GasketSnpReceiveFilters):
1278 subl $40, %esp // sub extra 16 from the stack for alignment
1279 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1293 call ASM_PFX(EmuSnpReceiveFilters)
1299 ASM_GLOBAL ASM_PFX(GasketSnpStationAddress)
1300 ASM_PFX(GasketSnpStationAddress):
1303 subl $40, %esp // sub extra 16 from the stack for alignment
1304 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1317 ASM_GLOBAL ASM_PFX(GasketSnpStatistics)
1318 ASM_PFX(GasketSnpStatistics):
1321 subl $40, %esp // sub extra 16 from the stack for alignment
1322 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1332 call ASM_PFX(EmuSnpStatistics)
1338 ASM_GLOBAL ASM_PFX(GasketSnpMCastIpToMac)
1339 ASM_PFX(GasketSnpMCastIpToMac):
1342 subl $40, %esp // sub extra 16 from the stack for alignment
1343 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1353 call ASM_PFX(EmuSnpMCastIpToMac)
1359 ASM_GLOBAL ASM_PFX(GasketSnpNvData)
1360 ASM_PFX(GasketSnpNvData):
1363 subl $40, %esp // sub extra 16 from the stack for alignment
1364 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1376 call ASM_PFX(EmuSnpNvData)
1382 ASM_GLOBAL ASM_PFX(GasketSnpGetStatus)
1383 ASM_PFX(GasketSnpGetStatus):
1386 subl $40, %esp // sub extra 16 from the stack for alignment
1387 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1395 call ASM_PFX(EmuSnpGetStatus)
1402 ASM_GLOBAL ASM_PFX(GasketSnpTransmit)
1403 ASM_PFX(GasketSnpTransmit):
1406 subl $56, %esp // sub extra 16 from the stack for alignment
1407 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1423 call ASM_PFX(EmuSnpTransmit)
1430 ASM_GLOBAL ASM_PFX(GasketSnpReceive)
1431 ASM_PFX(GasketSnpReceive):
1434 subl $56, %esp // sub extra 16 from the stack for alignment
1435 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1451 call ASM_PFX(EmuSnpReceive)
1457 ASM_GLOBAL ASM_PFX(GasketSnpThunkOpen)
1458 ASM_PFX(GasketSnpThunkOpen):
1461 subl $24, %esp // sub extra 16 from the stack for alignment
1462 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1466 call ASM_PFX(EmuSnpThunkOpen)
1472 ASM_GLOBAL ASM_PFX(GasketSnpThunkClose)
1473 ASM_PFX(GasketSnpThunkClose):
1476 subl $24, %esp // sub extra 16 from the stack for alignment
1477 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1481 call ASM_PFX(EmuSnpThunkClose)