1 #------------------------------------------------------------------------------
3 # This template was generated from GasketEfiTemplate.c Unix x86_64 ABI
5 # The EFI_UNIX_THUNK_PROTOCOL member functions call these these generic assembly
8 # Some OS X POSIX calls get name mangled in C code and we need to fill in a C global
9 # to get the correct binding (does not work from assembly). So we have 4 functions
10 # that do an indirect call, while the others call POSIX APIs directly
12 # movq _gUnixRmDir@GOTPCREL(%rip), %rax
15 # UNIX Arg passing: RCX, RDX, R8, R9
16 # EFI Arg passing: RDI, RSI, RDX, RCX, R8, R9
17 # Callee allocates 32 bytes on stack to spill registers
18 # RSI, RDI calle-save on EFI, scatch on UNIX callign
21 # Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
22 # This program and the accompanying materials
23 # are licensed and made available under the terms and conditions of the BSD License
24 # which accompanies this distribution. The full text of the license may be found at
25 # http://opensource.org/licenses/bsd-license.php
27 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
28 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
30 #------------------------------------------------------------------------------
33 // Gaskets are EFI ABI to UNIX ABI calls
34 // EFI ABI code will sub 40 (0x28) from %rsp before calling a function
35 // This is the 32 (0x20) byte to spill registers and 8 bytes to align stack on 16 byte boundry.
39 // 32 byte shadow to spill rcx-r9, 8 bytes to align stack on 16 byte boundry
40 // Any call with 0 - 4 arguments allocates 40 bytes on the stack.
41 // For more than 4 args you always have to increase in quanta of 16 so 5 or 6 args is 56,
42 // 7 or 8 args is 72, and 9 or 10 args is 88
43 #define EFI_STACK_SHADOW_SPACE 40
44 #define EFI_STACK_SHADOW_SPACE_5_6 56
45 #define EFI_STACK_SHADOW_SPACE_7_8 72
46 #define EFI_STACK_SHADOW_SPACE_9_10 88
53 ASM_GLOBAL ASM_PFX(Gasketrmdir)
55 pushq %rbp // stack frame is for the debugger
58 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
61 movq %rcx, %rdi // Swizzle args
63 movq ASM_PFX(gUnixRmDir)@GOTPCREL(%rip), %rax // Get function name mangled by C
68 popq %rdi // restore state
74 ASM_GLOBAL ASM_PFX(Gasketopendir)
75 ASM_PFX(Gasketopendir):
76 pushq %rbp // stack frame is for the debugger
79 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
82 movq %rcx, %rdi // Swizzle args
84 movq ASM_PFX(gUnixOpenDir)@GOTPCREL(%rip), %rax // Get function name mangled by C
88 popq %rdi // restore state
95 ASM_GLOBAL ASM_PFX(Gasketstat)
97 pushq %rbp // stack frame is for the debugger
100 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
103 movq %rcx, %rdi // Swizzle args
106 movq ASM_PFX(gUnixStat)@GOTPCREL(%rip), %rax // Get function name mangled by C
111 popq %rdi // restore state
117 ASM_GLOBAL ASM_PFX(Gasketstatfs)
118 ASM_PFX(Gasketstatfs):
119 pushq %rbp // stack frame is for the debugger
122 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
125 movq %rcx, %rdi // Swizzle args
128 movq ASM_PFX(gUnixStatFs)@GOTPCREL(%rip), %rax // Get function name mangled by C
132 popq %rdi // restore state
137 ASM_GLOBAL ASM_PFX(Gasketrewinddir)
138 ASM_PFX(Gasketrewinddir):
139 pushq %rbp // stack frame is for the debugger
142 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
145 movq %rcx, %rdi // Swizzle args
147 movq ASM_PFX(gUnixRewinddir)@GOTPCREL(%rip), %rax // Get function name mangled by C
151 popq %rdi // restore state
156 ASM_GLOBAL ASM_PFX(Gasketreaddir)
157 ASM_PFX(Gasketreaddir):
158 pushq %rbp // stack frame is for the debugger
161 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
164 movq %rcx, %rdi // Swizzle args
166 movq ASM_PFX(gUnixReaddir)@GOTPCREL(%rip), %rax // Get function name mangled by C
170 popq %rdi // restore state
176 ASM_GLOBAL ASM_PFX(GasketmsSleep)
177 ASM_PFX(GasketmsSleep):
178 pushq %rbp // stack frame is for the debugger
181 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
184 movq %rcx, %rdi // Swizzle args
186 call ASM_PFX(msSleep)
188 popq %rdi // restore state
194 ASM_GLOBAL ASM_PFX(Gasketexit)
196 movq %rcx, %rdi // Swizzle args
197 call ASM_PFX(exit) // Less to do as we will never return to EFI ABI world
199 jmp LDEAD_LOOP // _exit should never return
203 ASM_GLOBAL ASM_PFX(GasketSetTimer)
204 ASM_PFX(GasketSetTimer):
205 pushq %rbp // stack frame is for the debugger
208 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
211 movq %rcx, %rdi // Swizzle args
214 call ASM_PFX(SetTimer)
216 popq %rdi // restore state
222 ASM_GLOBAL ASM_PFX(GasketGetLocalTime)
223 ASM_PFX(GasketGetLocalTime):
224 pushq %rbp // stack frame is for the debugger
227 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
230 movq %rcx, %rdi // Swizzle args
232 call ASM_PFX(GetLocalTime)
234 popq %rdi // restore state
241 ASM_GLOBAL ASM_PFX(Gasketgmtime)
242 ASM_PFX(Gasketgmtime):
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
251 call ASM_PFX(localtime)
253 popq %rdi // restore state
260 ASM_GLOBAL ASM_PFX(GasketGetTimeZone)
261 ASM_PFX(GasketGetTimeZone):
262 pushq %rbp // stack frame is for the debugger
265 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
268 call ASM_PFX(GetTimeZone)
270 popq %rdi // restore state
276 ASM_GLOBAL ASM_PFX(GasketGetDayLight)
277 ASM_PFX(GasketGetDayLight):
278 pushq %rbp // stack frame is for the debugger
281 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
284 call ASM_PFX(GetDayLight)
286 popq %rdi // restore state
292 ASM_GLOBAL ASM_PFX(Gasketpoll)
294 pushq %rbp // stack frame is for the debugger
297 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
300 movq %rcx, %rdi // Swizzle args
306 popq %rdi // restore state
313 ASM_GLOBAL ASM_PFX(Gasketread)
315 pushq %rbp // stack frame is for the debugger
318 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
321 movq %rcx, %rdi // Swizzle args
327 popq %rdi // restore state
333 ASM_GLOBAL ASM_PFX(Gasketwrite)
334 ASM_PFX(Gasketwrite):
335 pushq %rbp // stack frame is for the debugger
338 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
341 movq %rcx, %rdi // Swizzle args
347 popq %rdi // restore state
353 ASM_GLOBAL ASM_PFX(Gasketgetenv)
354 ASM_PFX(Gasketgetenv):
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 movq %rcx, %rdi // Swizzle args
365 popq %rdi // restore state
371 ASM_GLOBAL ASM_PFX(Gasketopen)
373 pushq %rbp // stack frame is for the debugger
376 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
379 movq %rcx, %rdi // Swizzle args
385 popq %rdi // restore state
391 ASM_GLOBAL ASM_PFX(Gasketlseek)
392 ASM_PFX(Gasketlseek):
393 pushq %rbp // stack frame is for the debugger
396 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
399 movq %rcx, %rdi // Swizzle args
405 popq %rdi // restore state
411 ASM_GLOBAL ASM_PFX(Gasketftruncate)
412 ASM_PFX(Gasketftruncate):
413 pushq %rbp // stack frame is for the debugger
416 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
419 movq %rcx, %rdi // Swizzle args
423 call ASM_PFX(ftruncate)
425 popq %rdi // restore state
431 ASM_GLOBAL ASM_PFX(Gasketclose)
432 ASM_PFX(Gasketclose):
433 pushq %rbp // stack frame is for the debugger
436 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
439 movq %rcx, %rdi // Swizzle args
443 popq %rdi // restore state
450 ASM_GLOBAL ASM_PFX(Gasketmkdir)
451 ASM_PFX(Gasketmkdir):
452 pushq %rbp // stack frame is for the debugger
455 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
458 movq %rcx, %rdi // Swizzle args
463 popq %rdi // restore state
469 ASM_GLOBAL ASM_PFX(Gasketunlink)
470 ASM_PFX(Gasketunlink):
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
481 popq %rdi // restore state
487 ASM_GLOBAL ASM_PFX(GasketGetErrno)
488 ASM_PFX(GasketGetErrno):
489 pushq %rbp // stack frame is for the debugger
492 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
495 call ASM_PFX(GetErrno)
497 popq %rdi // restore state
502 ASM_GLOBAL ASM_PFX(Gasketclosedir)
503 ASM_PFX(Gasketclosedir):
504 pushq %rbp // stack frame is for the debugger
507 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
510 movq %rcx, %rdi // Swizzle args
512 call ASM_PFX(closedir)
514 popq %rdi // restore state
520 ASM_GLOBAL ASM_PFX(Gasketrename)
521 ASM_PFX(Gasketrename):
522 pushq %rbp // stack frame is for the debugger
525 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
528 movq %rcx, %rdi // Swizzle args
533 popq %rdi // restore state
539 ASM_GLOBAL ASM_PFX(Gasketmktime)
540 ASM_PFX(Gasketmktime):
541 pushq %rbp // stack frame is for the debugger
544 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
547 movq %rcx, %rdi // Swizzle args
552 popq %rdi // restore state
558 ASM_GLOBAL ASM_PFX(Gasketfsync)
559 ASM_PFX(Gasketfsync):
560 pushq %rbp // stack frame is for the debugger
563 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
566 movq %rcx, %rdi // Swizzle args
571 popq %rdi // restore state
577 ASM_GLOBAL ASM_PFX(Gasketchmod)
578 ASM_PFX(Gasketchmod):
579 pushq %rbp // stack frame is for the debugger
582 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
585 movq %rcx, %rdi // Swizzle args
590 popq %rdi // restore state
596 ASM_GLOBAL ASM_PFX(Gasketutime)
597 ASM_PFX(Gasketutime):
598 pushq %rbp // stack frame is for the debugger
601 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
604 movq %rcx, %rdi // Swizzle args
609 popq %rdi // restore state
615 ASM_GLOBAL ASM_PFX(Gaskettcflush)
616 ASM_PFX(Gaskettcflush):
617 pushq %rbp // stack frame is for the debugger
620 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
623 movq %rcx, %rdi // Swizzle args
626 call ASM_PFX(tcflush)
628 popq %rdi // restore state
634 ASM_GLOBAL ASM_PFX(GasketUgaCreate)
635 ASM_PFX(GasketUgaCreate):
636 pushq %rbp // stack frame is for the debugger
639 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
642 movq %rcx, %rdi // Swizzle args
645 call ASM_PFX(UgaCreate)
647 popq %rdi // restore state
653 ASM_GLOBAL ASM_PFX(Gasketperror)
654 ASM_PFX(Gasketperror):
655 pushq %rbp // stack frame is for the debugger
658 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
661 movq %rcx, %rdi // Swizzle args
666 popq %rdi // restore state
672 ASM_GLOBAL ASM_PFX(Gasketioctl)
673 ASM_PFX(Gasketioctl):
674 pushq %rbp // stack frame is for the debugger
677 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
680 movq %rcx, %rdi // Swizzle args
684 call ASM_PFX(UnixIoCtl1)
686 popq %rdi // restore state
692 ASM_GLOBAL ASM_PFX(Gasketfcntl)
693 ASM_PFX(Gasketfcntl):
694 pushq %rbp // stack frame is for the debugger
697 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
700 movq %rcx, %rdi // Swizzle args
704 call ASM_PFX(UnixFcntl1)
706 popq %rdi // restore state
713 ASM_GLOBAL ASM_PFX(Gasketcfsetispeed)
714 ASM_PFX(Gasketcfsetispeed):
715 pushq %rbp // stack frame is for the debugger
718 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
721 movq %rcx, %rdi // Swizzle args
724 call ASM_PFX(cfsetispeed)
726 popq %rdi // restore state
733 ASM_GLOBAL ASM_PFX(Gasketcfsetospeed)
734 ASM_PFX(Gasketcfsetospeed):
735 pushq %rbp // stack frame is for the debugger
738 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
741 movq %rcx, %rdi // Swizzle args
744 call ASM_PFX(cfsetospeed)
746 popq %rdi // restore state
752 ASM_GLOBAL ASM_PFX(Gaskettcgetattr)
753 ASM_PFX(Gaskettcgetattr):
754 pushq %rbp // stack frame is for the debugger
757 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
760 movq %rcx, %rdi // Swizzle args
764 call ASM_PFX(tcgetattr)
766 popq %rdi // restore state
772 ASM_GLOBAL ASM_PFX(Gaskettcsetattr)
773 ASM_PFX(Gaskettcsetattr):
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
784 call ASM_PFX(tcsetattr)
786 popq %rdi // restore state
792 ASM_GLOBAL ASM_PFX(GasketUnixPeCoffGetEntryPoint)
793 ASM_PFX(GasketUnixPeCoffGetEntryPoint):
794 pushq %rbp // stack frame is for the debugger
797 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
800 movq %rcx, %rdi // Swizzle args
803 call ASM_PFX(SecPeCoffGetEntryPoint)
805 popq %rdi // restore state
812 ASM_GLOBAL ASM_PFX(GasketUnixPeCoffRelocateImageExtraAction)
813 ASM_PFX(GasketUnixPeCoffRelocateImageExtraAction):
814 pushq %rbp // stack frame is for the debugger
817 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
820 movq %rcx, %rdi // Swizzle args
822 call ASM_PFX(SecPeCoffRelocateImageExtraAction)
824 popq %rdi // restore state
830 ASM_GLOBAL ASM_PFX(GasketUnixPeCoffUnloadImageExtraAction)
831 ASM_PFX(GasketUnixPeCoffUnloadImageExtraAction):
832 pushq %rbp // stack frame is for the debugger
835 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
838 movq %rcx, %rdi // Swizzle args
840 call ASM_PFX(SecPeCoffLoaderUnloadImageExtraAction)
842 popq %rdi // restore state
851 ASM_GLOBAL ASM_PFX(Gasketsocket)
852 ASM_PFX(Gasketsocket):
853 pushq %rbp // stack frame is for the debugger
856 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
859 movq %rcx, %rdi // Swizzle args
866 popq %rdi // restore state
873 ASM_GLOBAL ASM_PFX(Gasketgetifaddrs)
874 ASM_PFX(Gasketgetifaddrs):
875 pushq %rbp // stack frame is for the debugger
878 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
881 movq %rcx, %rdi // Swizzle args
883 call ASM_PFX(getifaddrs)
892 ASM_GLOBAL ASM_PFX(Gasketfreeifaddrs)
893 ASM_PFX(Gasketfreeifaddrs):
894 pushq %rbp // stack frame is for the debugger
897 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
900 movq %rcx, %rdi // Swizzle args
902 call ASM_PFX(freeifaddrs)
905 popq %rdi // restore state
911 ASM_GLOBAL ASM_PFX(GasketUgaClose)
912 ASM_PFX(GasketUgaClose):
913 pushq %rbp // stack frame is for the debugger
916 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
919 movq %rcx, %rdi // Swizzle args
921 call ASM_PFX(UgaClose)
923 popq %rdi // restore state
931 ASM_GLOBAL ASM_PFX(GasketUgaSize)
932 ASM_PFX(GasketUgaSize):
933 pushq %rbp // stack frame is for the debugger
936 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
939 movq %rcx, %rdi // Swizzle args
943 call ASM_PFX(UgaSize)
945 popq %rdi // restore state
951 ASM_GLOBAL ASM_PFX(GasketUgaCheckKey)
952 ASM_PFX(GasketUgaCheckKey):
953 pushq %rbp // stack frame is for the debugger
956 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
959 movq %rcx, %rdi // Swizzle args
961 call ASM_PFX(UgaCheckKey)
963 popq %rdi // restore state
969 ASM_GLOBAL ASM_PFX(GasketUgaGetKey)
970 ASM_PFX(GasketUgaGetKey):
971 pushq %rbp // stack frame is for the debugger
974 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
977 movq %rcx, %rdi // Swizzle args
980 call ASM_PFX(UgaGetKey)
982 popq %rdi // restore state
987 ASM_GLOBAL ASM_PFX(GasketUgaKeySetState)
988 ASM_PFX(GasketUgaKeySetState):
989 pushq %rbp // stack frame is for the debugger
992 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
995 movq %rcx, %rdi // Swizzle args
998 call ASM_PFX(UgaKeySetState)
1000 popq %rdi // restore state
1006 ASM_GLOBAL ASM_PFX(GasketUgaRegisterKeyNotify)
1007 ASM_PFX(GasketUgaRegisterKeyNotify):
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(UgaRegisterKeyNotify)
1020 popq %rdi // restore state
1029 ASM_GLOBAL ASM_PFX(GasketUgaBlt)
1030 ASM_PFX(GasketUgaBlt):
1031 pushq %rbp // stack frame is for the debugger
1034 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1037 movq %rcx, %rdi // Swizzle args
1042 call ASM_PFX(UgaBlt)
1044 popq %rdi // restore state
1050 ASM_GLOBAL ASM_PFX(GasketUgaCheckPointer)
1051 ASM_PFX(GasketUgaCheckPointer):
1052 pushq %rbp // stack frame is for the debugger
1055 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1058 movq %rcx, %rdi // Swizzle args
1060 call ASM_PFX(UgaCheckPointer)
1062 popq %rdi // restore state
1068 ASM_GLOBAL ASM_PFX(GasketUgaGetPointerState)
1069 ASM_PFX(GasketUgaGetPointerState):
1070 pushq %rbp // stack frame is for the debugger
1073 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1076 movq %rcx, %rdi // Swizzle args
1079 call ASM_PFX(UgaGetPointerState)
1081 popq %rdi // restore state
1087 ASM_GLOBAL ASM_PFX(GasketUnixEnableInterrupt)
1088 ASM_PFX(GasketUnixEnableInterrupt):
1089 pushq %rbp // stack frame is for the debugger
1092 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1095 call ASM_PFX(UnixEnableInterrupt)
1097 popq %rdi // restore state
1102 ASM_GLOBAL ASM_PFX(GasketUnixDisableInterrupt)
1103 ASM_PFX(GasketUnixDisableInterrupt):
1104 pushq %rbp // stack frame is for the debugger
1107 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1110 call ASM_PFX(UnixDisableInterrupt)
1112 popq %rdi // restore state
1118 // UNIX ABI to EFI ABI call
1121 // ReverseGasketUint64 (
1125 ASM_GLOBAL ASM_PFX(ReverseGasketUint64)
1126 ASM_PFX(ReverseGasketUint64):
1127 pushq %rbp // stack frame is for the debugger
1130 movq %rdi, %rax // Swizzle args
1133 subq $32, %rsp // 32-byte shadow space
1141 // UNIX ABI to EFI ABI call
1144 // ReverseGasketUint64Uint64 (
1149 ASM_GLOBAL ASM_PFX(ReverseGasketUint64Uint64)
1150 ASM_PFX(ReverseGasketUint64Uint64):
1151 pushq %rbp // stack frame is for the debugger
1154 movq %rdi, %rax // Swizzle args
1157 subq $32, %rsp // 32-byte shadow space
1165 // Sec PPI Callbacks
1167 ASM_GLOBAL ASM_PFX(GasketSecUnixPeiLoadFile)
1168 ASM_PFX(GasketSecUnixPeiLoadFile):
1169 pushq %rbp // stack frame is for the debugger
1172 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1175 movq %rcx, %rdi // Swizzle args
1180 call ASM_PFX(SecUnixPeiLoadFile)
1182 popq %rdi // restore state
1189 ASM_GLOBAL ASM_PFX(GasketSecUnixPeiAutoScan)
1190 ASM_PFX(GasketSecUnixPeiAutoScan):
1191 pushq %rbp // stack frame is for the debugger
1194 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1197 movq %rcx, %rdi // Swizzle args
1201 call ASM_PFX(SecUnixPeiAutoScan)
1203 popq %rdi // restore state
1208 ASM_GLOBAL ASM_PFX(GasketSecUnixUnixThunkAddress)
1209 ASM_PFX(GasketSecUnixUnixThunkAddress):
1210 pushq %rbp // stack frame is for the debugger
1213 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1216 call ASM_PFX(SecUnixUnixThunkAddress)
1225 ASM_GLOBAL ASM_PFX(GasketSecPeiReportStatusCode)
1226 ASM_PFX(GasketSecPeiReportStatusCode):
1227 pushq %rbp // stack frame is for the debugger
1230 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1233 movq %rcx, %rdi // Swizzle args
1237 movq $0, %r8 // BugBug: This should come from the stack
1238 movq $0, %r9 // But we can cheat since they are optional for bringup....
1240 call ASM_PFX(SecPeiReportStatusCode)
1242 popq %rdi // restore state
1248 ASM_GLOBAL ASM_PFX(GasketSecUnixFdAddress)
1249 ASM_PFX(GasketSecUnixFdAddress):
1250 pushq %rbp // stack frame is for the debugger
1253 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1256 movq %rcx, %rdi // Swizzle args
1261 call ASM_PFX(SecUnixFdAddress)
1263 popq %rdi // restore state
1271 ASM_GLOBAL ASM_PFX(GasketSecTemporaryRamSupport)
1272 ASM_PFX(GasketSecTemporaryRamSupport):
1273 pushq %rbp // stack frame is for the debugger
1276 pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
1279 movq %rcx, %rdi // Swizzle args
1284 call ASM_PFX(SecTemporaryRamSupport)
1286 popq %rdi // restore state