]> git.proxmox.com Git - mirror_edk2.git/blame - UnixPkg/Sec/X64/MangleGasket.S
UnixPkg: Added missing EFIAPI for many Gasket functions
[mirror_edk2.git] / UnixPkg / Sec / X64 / MangleGasket.S
CommitLineData
07a90790 1#------------------------------------------------------------------------------
2#
3# This template was generated from GasketEfiTemplate.c Unix x86_64 ABI
4#
5# The EFI_UNIX_THUNK_PROTOCOL member functions call these these generic assembly
6# routines.
7#
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
11#
12# movq _gUnixRmDir@GOTPCREL(%rip), %rax
13#
14#
15# UNIX Arg passing: RCX, RDX, R8, R9
a4902ccc 16# EFI Arg passing: RDI, RSI, RDX, RCX, R8, R9
07a90790 17# Callee allocates 32 bytes on stack to spill registers
18# RSI, RDI calle-save on EFI, scatch on UNIX callign
19#
20#
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
26#
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.
29#
30#------------------------------------------------------------------------------
31
a4902ccc 32//
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.
36//
07a90790 37 .text
a4902ccc 38
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
47
48
49
50 .text
51
52
07a90790 53.globl _Gasketrmdir
54_Gasketrmdir:
a4902ccc 55 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
56 pushq %rdi
07a90790 57
a4902ccc 58 movq %rcx, %rdi // Swizzle args
07a90790 59
a4902ccc 60 movq _gUnixRmDir@GOTPCREL(%rip), %rax // Get function name mangled by C
61 movq (%rax), %rax
07a90790 62 call *%rax
a4902ccc 63
64 pushq %rdi // restore state
65 pushq %rsi
66 ret
67
07a90790 68
69.globl _Gasketopendir
70_Gasketopendir:
a4902ccc 71 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
72 pushq %rdi
07a90790 73
a4902ccc 74 movq %rcx, %rdi // Swizzle args
07a90790 75
a4902ccc 76 movq _gUnixOpenDir@GOTPCREL(%rip), %rax // Get function name mangled by C
77 movq (%rax), %rax
07a90790 78 call *%rax
07a90790 79
a4902ccc 80 popq %rdi // restore state
07a90790 81 popq %rsi
07a90790 82 ret
83
84
85
86.globl _Gasketstat
87_Gasketstat:
a4902ccc 88 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
89 pushq %rdi
07a90790 90
a4902ccc 91 movq %rcx, %rdi // Swizzle args
92 movq %rdx, %rsi
93
94 movq _gUnixStat@GOTPCREL(%rip), %rax // Get function name mangled by C
95 movq (%rax), %rax
07a90790 96 call *%rax
07a90790 97
a4902ccc 98 popq %rdi // restore state
07a90790 99 popq %rsi
07a90790 100 ret
101
102
103.globl _Gasketstatfs
104_Gasketstatfs:
a4902ccc 105 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
106 pushq %rdi
107
108 movq %rcx, %rdi // Swizzle args
109 movq %rdx, %rsi
110
111 movq _gUnixStatFs@GOTPCREL(%rip), %rax // Get function name mangled by C
07a90790 112 movq (%rax), %rax
a4902ccc 113 call *%rax
114
115 popq %rdi // restore state
116 popq %rsi
117 ret
118
119.globl _Gasketrewinddir
120_Gasketrewinddir:
121 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
122 pushq %rdi
123
124 movq %rcx, %rdi // Swizzle args
07a90790 125
a4902ccc 126 movq _gUnixRewinddir@GOTPCREL(%rip), %rax // Get function name mangled by C
127 movq (%rax), %rax
07a90790 128 call *%rax
07a90790 129
a4902ccc 130 popq %rdi // restore state
07a90790 131 popq %rsi
07a90790 132 ret
133
a4902ccc 134.globl _Gasketreaddir
135_Gasketreaddir:
136 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
137 pushq %rdi
07a90790 138
a4902ccc 139 movq %rcx, %rdi // Swizzle args
140
141 movq _gUnixReaddir@GOTPCREL(%rip), %rax // Get function name mangled by C
142 movq (%rax), %rax
143 call *%rax
144
145 popq %rdi // restore state
146 popq %rsi
147 ret
148
07a90790 149
150.globl _GasketmsSleep
151_GasketmsSleep:
a4902ccc 152 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
153 pushq %rdi
07a90790 154
a4902ccc 155 movq %rcx, %rdi // Swizzle args
07a90790 156
07a90790 157 call _msSleep
07a90790 158
a4902ccc 159 popq %rdi // restore state
07a90790 160 popq %rsi
07a90790 161 ret
162
163
164.globl _Gasketexit
165_Gasketexit:
a4902ccc 166 movq %rcx, %rdi // Swizzle args
167 call _exit // Less to do as we will never return to EFI ABI world
07a90790 168LDEAD_LOOP:
bb111c23 169 jmp LDEAD_LOOP // _exit should never return
a4902ccc 170
07a90790 171
172
173.globl _GasketSetTimer
174_GasketSetTimer:
a4902ccc 175 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
176 pushq %rdi
177
178 movq %rcx, %rdi // Swizzle args
179 movq %rdx, %rsi
180
07a90790 181 call _SetTimer
a4902ccc 182
183 popq %rdi // restore state
184 popq %rsi
185 ret
186
187
07a90790 188.globl _GasketGetLocalTime
189_GasketGetLocalTime:
a4902ccc 190 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
191 pushq %rdi
192
193 movq %rcx, %rdi // Swizzle args
194
07a90790 195 call _GetLocalTime
a4902ccc 196
197 popq %rdi // restore state
198 popq %rsi
199 ret
200
201
202
07a90790 203.globl _Gasketgmtime
204_Gasketgmtime:
a4902ccc 205 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
206 pushq %rdi
207
208 movq %rcx, %rdi // Swizzle args
209
07a90790 210 call _localtime
a4902ccc 211
212 popq %rdi // restore state
213 popq %rsi
214 ret
215
216
217
07a90790 218.globl _GasketGetTimeZone
219_GasketGetTimeZone:
a4902ccc 220 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
221 pushq %rdi
222
07a90790 223 call _GetTimeZone
a4902ccc 224
225 popq %rdi // restore state
226 popq %rsi
227 ret
228
229
07a90790 230.globl _GasketGetDayLight
231_GasketGetDayLight:
232LFB26:
a4902ccc 233 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
234 pushq %rdi
235
07a90790 236 call _GetDayLight
a4902ccc 237
238 popq %rdi // restore state
239 popq %rsi
240 ret
241
242
07a90790 243.globl _Gasketpoll
244_Gasketpoll:
a4902ccc 245 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
246 pushq %rdi
247
248 movq %rcx, %rdi // Swizzle args
249 movq %rdx, %rsi
250 movq %r8, %rdx
251
252 call _poll
253
254 popq %rdi // restore state
255 popq %rsi
256 ret
257
258
259
07a90790 260.globl _Gasketread
261_Gasketread:
a4902ccc 262 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
263 pushq %rdi
264
265 movq %rcx, %rdi // Swizzle args
266 movq %rdx, %rsi
267 movq %r8, %rdx
268
269 call _read
270
271 popq %rdi // restore state
272 popq %rsi
273 ret
274
275
07a90790 276.globl _Gasketwrite
277_Gasketwrite:
a4902ccc 278 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
279 pushq %rdi
280
281 movq %rcx, %rdi // Swizzle args
282 movq %rdx, %rsi
283 movq %r8, %rdx
284
285 call _write
286
287 popq %rdi // restore state
288 popq %rsi
289 ret
290
291
07a90790 292.globl _Gasketgetenv
293_Gasketgetenv:
a4902ccc 294 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
295 pushq %rdi
296
297 movq %rcx, %rdi // Swizzle args
298
299 call _getenv
300
301 popq %rdi // restore state
302 popq %rsi
303 ret
304
305
07a90790 306.globl _Gasketopen
307_Gasketopen:
a4902ccc 308 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
309 pushq %rdi
310
311 movq %rcx, %rdi // Swizzle args
312 movq %rdx, %rsi
313 movq %r8, %rdx
314
315 call _open
316
317 popq %rdi // restore state
318 popq %rsi
319 ret
320
321
07a90790 322.globl _Gasketlseek
323_Gasketlseek:
a4902ccc 324 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
325 pushq %rdi
326
327 movq %rcx, %rdi // Swizzle args
328 movq %rdx, %rsi
329 movq %r8, %rdx
330
331 call _lseek
332
333 popq %rdi // restore state
334 popq %rsi
335 ret
336
337
07a90790 338.globl _Gasketftruncate
339_Gasketftruncate:
a4902ccc 340 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
341 pushq %rdi
342
343 movq %rcx, %rdi // Swizzle args
344 movq %rdx, %rsi
345 movq %r8, %rdx
346
347 call _ftruncate
348
349 popq %rdi // restore state
350 popq %rsi
351 ret
352
353
07a90790 354.globl _Gasketclose
355_Gasketclose:
a4902ccc 356 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
357 pushq %rdi
358
359 movq %rcx, %rdi // Swizzle args
360
361 call _close
362
363 popq %rdi // restore state
364 popq %rsi
365 ret
366
367
368
07a90790 369.globl _Gasketmkdir
370_Gasketmkdir:
a4902ccc 371 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
372 pushq %rdi
373
374 movq %rcx, %rdi // Swizzle args
375 movq %rdx, %rsi
376
377 call _mkdir
378
379 popq %rdi // restore state
380 popq %rsi
381 ret
382
383
07a90790 384.globl _Gasketunlink
385_Gasketunlink:
a4902ccc 386 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
387 pushq %rdi
388
389 movq %rcx, %rdi // Swizzle args
390
391 call _unlink
392
393 popq %rdi // restore state
394 popq %rsi
395 ret
396
397
07a90790 398.globl _GasketGetErrno
399_GasketGetErrno:
a4902ccc 400 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
401 pushq %rdi
402
07a90790 403 call _GetErrno
a4902ccc 404
405 popq %rdi // restore state
406 popq %rsi
407 ret
408
07a90790 409.globl _Gasketclosedir
410_Gasketclosedir:
a4902ccc 411 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
412 pushq %rdi
413
414 movq %rcx, %rdi // Swizzle args
415
416 call _closedir
417
418 popq %rdi // restore state
419 popq %rsi
420 ret
421
422
07a90790 423.globl _Gasketrename
424_Gasketrename:
a4902ccc 425 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
426 pushq %rdi
427
428 movq %rcx, %rdi // Swizzle args
429 movq %rdx, %rsi
430
431 call _rename
432
433 popq %rdi // restore state
434 popq %rsi
435 ret
436
437
07a90790 438.globl _Gasketmktime
439_Gasketmktime:
440LFB42:
a4902ccc 441 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
442 pushq %rdi
443
444 movq %rcx, %rdi // Swizzle args
445 movq %rdx, %rsi
446
447 call _mktime
448
449 popq %rdi // restore state
450 popq %rsi
451 ret
452
453
07a90790 454.globl _Gasketfsync
455_Gasketfsync:
a4902ccc 456 pushq %rdi
457
458 movq %rcx, %rdi // Swizzle args
459 movq %rdx, %rsi
460
461 call _fsync
462
463 popq %rdi // restore state
464 popq %rsi
465 ret
466
467
07a90790 468.globl _Gasketchmod
469_Gasketchmod:
a4902ccc 470 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
471 pushq %rdi
472
473 movq %rcx, %rdi // Swizzle args
474 movq %rdx, %rsi
475
476 call _chmod
477
478 popq %rdi // restore state
479 popq %rsi
480 ret
481
482
07a90790 483.globl _Gasketutime
484_Gasketutime:
a4902ccc 485 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
486 pushq %rdi
487
488 movq %rcx, %rdi // Swizzle args
489 movq %rdx, %rsi
490
491 call _utime
492
493 popq %rdi // restore state
494 popq %rsi
495 ret
496
497
07a90790 498.globl _Gaskettcflush
499_Gaskettcflush:
a4902ccc 500 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
501 pushq %rdi
502
503 movq %rcx, %rdi // Swizzle args
504 movq %rdx, %rsi
505
506 call _tcflush
507
508 popq %rdi // restore state
509 popq %rsi
510 ret
a4902ccc 511
512
07a90790 513.globl _GasketUgaCreate
514_GasketUgaCreate:
a4902ccc 515 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
516 pushq %rdi
517
518 movq %rcx, %rdi // Swizzle args
519 movq %rdx, %rsi
520
521 call _UgaCreate
522
523 popq %rdi // restore state
524 popq %rsi
525 ret
526
527
07a90790 528.globl _Gasketperror
529_Gasketperror:
a4902ccc 530 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
531 pushq %rdi
532
533 movq %rcx, %rdi // Swizzle args
534 movq %rdx, %rsi
535
536 call _perror
537
538 popq %rdi // restore state
539 popq %rsi
540 ret
541
542
07a90790 543.globl _Gasketioctl
544_Gasketioctl:
a4902ccc 545 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
546 pushq %rdi
547
548 movq %rcx, %rdi // Swizzle args
549 movq %rdx, %rsi
550 movq %r8, %rdx
551
552 call _UnixIoCtl1
553
554 popq %rdi // restore state
555 popq %rsi
556 ret
557
558
07a90790 559.globl _Gasketfcntl
560_Gasketfcntl:
a4902ccc 561 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
562 pushq %rdi
563
564 movq %rcx, %rdi // Swizzle args
565 movq %rdx, %rsi
566 movq %r8, %rdx
567
bb111c23 568 call _UnixFcntl1
a4902ccc 569
570 popq %rdi // restore state
571 popq %rsi
572 ret
573
574
575
07a90790 576.globl _Gasketcfsetispeed
577_Gasketcfsetispeed:
a4902ccc 578 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
579 pushq %rdi
580
581 movq %rcx, %rdi // Swizzle args
582 movq %rdx, %rsi
583
584 call _cfsetispeed
585
586 popq %rdi // restore state
587 popq %rsi
588 ret
589
590
591
07a90790 592.globl _Gasketcfsetospeed
593_Gasketcfsetospeed:
a4902ccc 594 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
595 pushq %rdi
596
597 movq %rcx, %rdi // Swizzle args
598 movq %rdx, %rsi
599
600 call _cfsetospeed
601
602 popq %rdi // restore state
603 popq %rsi
604 ret
605
606
07a90790 607.globl _Gaskettcgetattr
608_Gaskettcgetattr:
a4902ccc 609 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
610 pushq %rdi
611
612 movq %rcx, %rdi // Swizzle args
613 movq %rdx, %rsi
614 movq %r8, %rdx
615
616 call _tcgetattr
617
618 popq %rdi // restore state
619 popq %rsi
620 ret
621
622
07a90790 623.globl _Gaskettcsetattr
624_Gaskettcsetattr:
a4902ccc 625 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
626 pushq %rdi
627
628 movq %rcx, %rdi // Swizzle args
629 movq %rdx, %rsi
630 movq %r8, %rdx
631
632 call _tcsetattr
633
634 popq %rdi // restore state
635 popq %rsi
636 ret
637
638
07a90790 639.globl _GasketUnixPeCoffGetEntryPoint
640_GasketUnixPeCoffGetEntryPoint:
a4902ccc 641 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
642 pushq %rdi
643
644 movq %rcx, %rdi // Swizzle args
645 movq %rdx, %rsi
646
647 call _SecPeCoffGetEntryPoint
648
649 popq %rdi // restore state
650 popq %rsi
651 ret
652
653
654
07a90790 655.globl _GasketUnixPeCoffRelocateImageExtraAction
656_GasketUnixPeCoffRelocateImageExtraAction:
a4902ccc 657 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
658 pushq %rdi
659
660 movq %rcx, %rdi // Swizzle args
661
662 call _SecPeCoffRelocateImageExtraAction
663
664 popq %rdi // restore state
665 popq %rsi
666 ret
667
668
07a90790 669.globl _GasketUnixPeCoffUnloadImageExtraAction
670_GasketUnixPeCoffUnloadImageExtraAction:
a4902ccc 671 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
672 pushq %rdi
673
674 movq %rcx, %rdi // Swizzle args
675
676 call _SecPeCoffLoaderUnloadImageExtraAction
677
678 popq %rdi // restore state
679 popq %rsi
680 ret
681
682
07a90790 683.globl _GasketUgaClose
684_GasketUgaClose:
a4902ccc 685 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
686 pushq %rdi
687
688 movq %rcx, %rdi // Swizzle args
689
690 call _UgaClose
691
692 popq %rdi // restore state
693 popq %rsi
694 ret
695
696
07a90790 697.globl _GasketUgaSize
698_GasketUgaSize:
a4902ccc 699 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
700 pushq %rdi
701
702 movq %rcx, %rdi // Swizzle args
703 movq %rdx, %rsi
704 movq %r8, %rdx
705
706 call _UgaSize
707
708 popq %rdi // restore state
709 popq %rsi
710 ret
711
712
07a90790 713.globl _GasketUgaCheckKey
714_GasketUgaCheckKey:
a4902ccc 715 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
716 pushq %rdi
717
718 movq %rcx, %rdi // Swizzle args
719
720 call _UgaCheckKey
721
722 popq %rdi // restore state
723 popq %rsi
724 ret
725
726
07a90790 727.globl _GasketUgaGetKey
728_GasketUgaGetKey:
a4902ccc 729 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
730 pushq %rdi
731
732 movq %rcx, %rdi // Swizzle args
733 movq %rdx, %rsi
734
735 call _UgaGetKey
736
737 popq %rdi // restore state
738 popq %rsi
739 ret
740
741
07a90790 742.globl _GasketUgaBlt
743_GasketUgaBlt:
a4902ccc 744 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
745 pushq %rdi
07a90790 746
a4902ccc 747 movq %rcx, %rdi // Swizzle args
748 movq %rdx, %rsi
749 movq %r8, %rdx
750 movq %r9, %rcx
751
752 call _UgaBlt
753
754 popq %rdi // restore state
755 popq %rsi
bb111c23 756 ret
a4902ccc 757
758
759//
760// UNIX ABI to EFI ABI call
761//
762// UINTN
763// ReverseGasketUint64 (
764// void *Api,
765// UINTN Arg1,
766// UINTN Arg2,
767// UINTN Arg3
768// );
07a90790 769.globl _ReverseGasketUint64
770_ReverseGasketUint64:
a4902ccc 771 movq %rdi, %rax // Swizzle args
772 movq %rsi, %r9
773// movq %rdx, %rdx
774 movq %rcx, %r8
775 movq %r9, %rcx
776
bb111c23 777 subq $40, %rsp // 32-byte shadow space plus alignment pad
07a90790 778 call *%rax
bb111c23 779 addq $40, %rsp
a4902ccc 780
07a90790 781 ret
782
07a90790 783
bb111c23 784// Sec PPI Callbacks
785
786.globl _GasketSecUnixPeiLoadFile
787_GasketSecUnixPeiLoadFile:
788 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
789 pushq %rdi
790
791 movq %rcx, %rdi // Swizzle args
792 movq %rdx, %rsi
793 movq %r8, %rdx
794 movq %r9, %rcx
795
796 call _SecUnixPeiLoadFile
797
798 popq %rdi // restore state
799 popq %rsi
800 ret
801
802
803
804.globl _GasketSecUnixPeiAutoScan
805_GasketSecUnixPeiAutoScan:
806 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
807 pushq %rdi
808
809 movq %rcx, %rdi // Swizzle args
810 movq %rdx, %rsi
811 movq %r8, %rdx
812
813 call _SecUnixPeiAutoScan
814
815 popq %rdi // restore state
816 popq %rsi
817 ret
818
819.globl _GasketSecUnixUnixThunkAddress
820_GasketSecUnixUnixThunkAddress:
821 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
822 pushq %rdi
823
824 call _SecUnixUnixThunkAddress
825
826 popq %rdi // restore state
827 popq %rsi
828 ret
829
830
831.globl _GasketSecPeiReportStatusCode
832_GasketSecPeiReportStatusCode:
833 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
834 pushq %rdi
835
836 movq %rcx, %rdi // Swizzle args
837 movq %rdx, %rsi
838 movq %r8, %rdx
839 movq %r9, %rcx
840 movq $0, %r8 // BugBug: This should come from the stack
841 movq $0, %r9 // But we can cheat since they are optional for bringup....
842
843 call _SecPeiReportStatusCode
844
845 popq %rdi // restore state
846 popq %rsi
847 ret
848
849
850.globl _GasketSecUnixFdAddress
851_GasketSecUnixFdAddress:
852 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
853 pushq %rdi
854
855 movq %rcx, %rdi // Swizzle args
856 movq %rdx, %rsi
857 movq %r8, %rdx
858 movq %r9, %rcx
859
860 call _SecUnixFdAddress
861
862 popq %rdi // restore state
863 popq %rsi
864 ret
865
866
867
868
869.globl _GasketSecTemporaryRamSupport
870_GasketSecTemporaryRamSupport:
871 pushq %rsi // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
872 pushq %rdi
873
874 movq %rcx, %rdi // Swizzle args
875 movq %rdx, %rsi
876 movq %r8, %rdx
877 movq %r9, %rcx
878
879 call _SecTemporaryRamSupport
880
881 popq %rdi // restore state
882 popq %rsi
883 ret
884
885
886
887
888