]> git.proxmox.com Git - mirror_edk2.git/blob - InOsEmuPkg/Unix/Sec/Ia32/Gasket.S
InOsEmuPkg: Unix emulator now compiles for IA-32.
[mirror_edk2.git] / InOsEmuPkg / Unix / Sec / Ia32 / Gasket.S
1 #------------------------------------------------------------------------------
2 #
3 # Manage differenced between UNIX ABI and EFI/Windows ABI
4 #
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
7 # the code common.
8 #
9 # Copyright (c) 2008 - 2011, Apple Inc. All rights reserved.<BR>
10 # This program and the accompanying materials
11 # are licensed and made available under the terms and conditions of the BSD License
12 # which accompanies this distribution. The full text of the license may be found at
13 # http://opensource.org/licenses/bsd-license.php
14 #
15 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
16 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
17 #
18 #------------------------------------------------------------------------------
19
20
21
22 .text
23
24 //
25 // EMU_THUNK_PROTOCOL gaskets (EFIAPI to UNIX ABI)
26 //
27
28
29 ASM_GLOBAL ASM_PFX(GasketSecWriteStdErr)
30 ASM_PFX(GasketSecWriteStdErr):
31 pushl %ebp
32 movl %esp, %ebp
33 subl $24, %esp // sub extra 16 from the stack for alignment
34 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
35 movl 12(%ebp), %eax
36 movl %eax, 4(%esp)
37 movl 8(%ebp), %eax
38 movl %eax, (%esp)
39
40 call ASM_PFX(SecWriteStdErr)
41
42 addl $24, %esp
43 popl %ebp
44 ret
45
46
47 ASM_GLOBAL ASM_PFX(GasketSecConfigStdIn)
48 ASM_PFX(GasketSecConfigStdIn):
49 pushl %ebp
50 movl %esp, %ebp
51 subl $24, %esp // sub extra 16 from the stack for alignment
52 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
53 movl 12(%ebp), %eax
54 movl %eax, 4(%esp)
55 movl 8(%ebp), %eax
56 movl %eax, (%esp)
57
58 call ASM_PFX(SecConfigStdIn)
59
60 addl $24, %esp
61 popl %ebp
62 ret
63
64 ASM_GLOBAL ASM_PFX(GasketSecWriteStdOut)
65 ASM_PFX(GasketSecWriteStdOut):
66 pushl %ebp
67 movl %esp, %ebp
68 subl $24, %esp // sub extra 16 from the stack for alignment
69 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
70 movl 12(%ebp), %eax
71 movl %eax, 4(%esp)
72 movl 8(%ebp), %eax
73 movl %eax, (%esp)
74
75 call ASM_PFX(SecWriteStdOut)
76
77 addl $24, %esp
78 popl %ebp
79 ret
80
81 ASM_GLOBAL ASM_PFX(GasketSecReadStdIn)
82 ASM_PFX(GasketSecReadStdIn):
83 pushl %ebp
84 movl %esp, %ebp
85 subl $24, %esp // sub extra 16 from the stack for alignment
86 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
87 movl 12(%ebp), %eax
88 movl %eax, 4(%esp)
89 movl 8(%ebp), %eax
90 movl %eax, (%esp)
91
92 call ASM_PFX(SecReadStdIn)
93
94 addl $24, %esp
95 popl %ebp
96 ret
97
98 ASM_GLOBAL ASM_PFX(GasketSecPollStdIn)
99 ASM_PFX(GasketSecPollStdIn):
100 pushl %ebp
101 movl %esp, %ebp
102 subl $24, %esp // sub extra 16 from the stack for alignment
103 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
104 movl 12(%ebp), %eax
105 movl %eax, 4(%esp)
106 movl 8(%ebp), %eax
107 movl %eax, (%esp)
108
109 call ASM_PFX(SecPollStdIn)
110
111 addl $24, %esp
112 popl %ebp
113 ret
114
115
116 ASM_GLOBAL ASM_PFX(GasketSecSetTimer)
117 ASM_PFX(GasketSecSetTimer):
118 pushl %ebp
119 movl %esp, %ebp
120 subl $24, %esp // sub extra 16 from the stack for alignment
121 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
122 movl 12(%ebp), %eax
123 movl %eax, 4(%esp)
124 movl 8(%ebp), %eax
125 movl %eax, (%esp)
126
127 call ASM_PFX(SecSetTimer)
128
129 addl $24, %esp
130 popl %ebp
131 ret
132
133
134 ASM_GLOBAL ASM_PFX(GasketSecEnableInterrupt)
135 ASM_PFX(GasketSecEnableInterrupt):
136 pushl %ebp
137 movl %esp, %ebp
138 subl $24, %esp // sub extra 16 from the stack for alignment
139 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
140
141 call ASM_PFX(SecEnableInterrupt)
142
143 addl $24, %esp
144 popl %ebp
145 ret
146
147
148 ASM_GLOBAL ASM_PFX(GasketSecDisableInterrupt)
149 ASM_PFX(GasketSecDisableInterrupt):
150 pushl %ebp
151 movl %esp, %ebp
152 subl $24, %esp // sub extra 16 from the stack for alignment
153 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
154
155 call ASM_PFX(SecDisableInterrupt)
156
157 addl $24, %esp
158 popl %ebp
159 ret
160
161 ASM_GLOBAL ASM_PFX(GasketQueryPerformanceFrequency)
162 ASM_PFX(GasketQueryPerformanceFrequency):
163 pushl %ebp
164 movl %esp, %ebp
165 subl $24, %esp // sub extra 16 from the stack for alignment
166 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
167
168 call ASM_PFX(QueryPerformanceFrequency)
169
170 addl $24, %esp
171 popl %ebp
172 ret
173
174
175 ASM_GLOBAL ASM_PFX(GasketQueryPerformanceCounter)
176 ASM_PFX(GasketQueryPerformanceCounter):
177 pushl %ebp
178 movl %esp, %ebp
179 subl $24, %esp // sub extra 16 from the stack for alignment
180 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
181
182 call ASM_PFX(QueryPerformanceCounter)
183
184 addl $24, %esp
185 popl %ebp
186 ret
187
188
189 ASM_GLOBAL ASM_PFX(GasketSecSleep)
190 ASM_PFX(GasketSecSleep):
191 pushl %ebp
192 movl %esp, %ebp
193 subl $24, %esp // sub extra 16 from the stack for alignment
194 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
195 movl 8(%ebp), %eax
196 movl %eax, (%esp)
197
198 call ASM_PFX(SecSleep)
199
200 addl $24, %esp
201 popl %ebp
202 ret
203
204
205 ASM_GLOBAL ASM_PFX(GasketSecCpuSleep)
206 ASM_PFX(GasketSecCpuSleep):
207 pushl %ebp
208 movl %esp, %ebp
209 subl $24, %esp // sub extra 16 from the stack for alignment
210 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
211
212 call ASM_PFX(SecCpuSleep)
213
214 addl $24, %esp
215 popl %ebp
216 ret
217
218
219 ASM_GLOBAL ASM_PFX(GasketSecExit)
220 ASM_PFX(GasketSecExit):
221 pushl %ebp
222 movl %esp, %ebp
223 subl $24, %esp // sub extra 16 from the stack for alignment
224 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
225 movl 8(%ebp), %eax
226 movl %eax, (%esp)
227
228 call ASM_PFX(SecExit) // Less to do as we will never return to EFI ABI world
229 LDEAD_LOOP:
230 jmp LDEAD_LOOP // _exit should never return
231
232
233 ASM_GLOBAL ASM_PFX(GasketSecGetTime)
234 ASM_PFX(GasketSecGetTime):
235 pushl %ebp
236 movl %esp, %ebp
237 subl $24, %esp // sub extra 16 from the stack for alignment
238 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
239 movl 12(%ebp), %eax
240 movl %eax, 4(%esp)
241 movl 8(%ebp), %eax
242 movl %eax, (%esp)
243
244 call ASM_PFX(SecGetTime)
245
246 addl $24, %esp
247 popl %ebp
248 ret
249
250 ASM_GLOBAL ASM_PFX(GasketSecSetTime)
251 ASM_PFX(GasketSecSetTime):
252 pushl %ebp
253 movl %esp, %ebp
254 subl $24, %esp // sub extra 16 from the stack for alignment
255 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
256 movl 12(%ebp), %eax
257 movl %eax, 4(%esp)
258 movl 8(%ebp), %eax
259 movl %eax, (%esp)
260
261 call ASM_PFX(SecSetTime)
262
263 addl $24, %esp
264 popl %ebp
265 ret
266
267
268 ASM_GLOBAL ASM_PFX(GasketSecGetNextProtocol)
269 ASM_PFX(GasketSecGetNextProtocol):
270 pushl %ebp
271 movl %esp, %ebp
272 subl $40, %esp // sub extra 16 from the stack for alignment
273 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
274 movl 20(%ebp), %eax
275 movl %eax, 12(%esp)
276 movl 16(%ebp), %eax
277 movl %eax, 8(%esp)
278 movl 12(%ebp), %eax
279 movl %eax, 4(%esp)
280 movl 8(%ebp), %eax
281 movl %eax, (%esp)
282
283 call ASM_PFX(SecGetNextProtocol)
284
285 addl $40, %esp
286 popl %ebp
287 ret
288
289 // PPIs produced by SEC
290
291 ASM_GLOBAL ASM_PFX(GasketSecPeCoffGetEntryPoint)
292 ASM_PFX(GasketSecPeCoffGetEntryPoint):
293 pushl %ebp
294 movl %esp, %ebp
295 subl $24, %esp // sub extra 16 from the stack for alignment
296 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
297 movl 12(%ebp), %eax
298 movl %eax, 4(%esp)
299 movl 8(%ebp), %eax
300 movl %eax, (%esp)
301
302 call ASM_PFX(SecPeCoffGetEntryPoint)
303
304 addl $24, %esp
305 popl %ebp
306 ret
307
308 ASM_GLOBAL ASM_PFX(GasketSecPeCoffRelocateImageExtraAction)
309 ASM_PFX(GasketSecPeCoffRelocateImageExtraAction):
310 pushl %ebp
311 movl %esp, %ebp
312 subl $24, %esp // sub extra 16 from the stack for alignment
313 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
314 movl 8(%ebp), %eax
315 movl %eax, (%esp)
316
317 call ASM_PFX(SecPeCoffRelocateImageExtraAction)
318
319 addl $24, %esp
320 popl %ebp
321 ret
322
323 ASM_GLOBAL ASM_PFX(GasketSecPeCoffUnloadImageExtraAction)
324 ASM_PFX(GasketSecPeCoffUnloadImageExtraAction):
325 pushl %ebp
326 movl %esp, %ebp
327 subl $24, %esp // sub extra 16 from the stack for alignment
328 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
329 movl 8(%ebp), %eax
330 movl %eax, (%esp)
331
332 call ASM_PFX(SecPeCoffUnloadImageExtraAction)
333
334 addl $24, %esp
335 popl %ebp
336 ret
337
338
339 ASM_GLOBAL ASM_PFX(GasketSecEmuThunkAddress)
340 ASM_PFX(GasketSecEmuThunkAddress):
341 pushl %ebp
342 movl %esp, %ebp
343 subl $24, %esp // sub extra 16 from the stack for alignment
344 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
345
346 call ASM_PFX(SecEmuThunkAddress)
347
348 addl $24, %esp
349 popl %ebp
350 ret
351
352 //
353 // Gasket functions for EFI_EMU_UGA_IO_PROTOCOL
354 //
355
356 ASM_GLOBAL ASM_PFX(GasketX11Size)
357 ASM_PFX(GasketX11Size):
358 pushl %ebp
359 movl %esp, %ebp
360 subl $40, %esp // sub extra 16 from the stack for alignment
361 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
362 movl 20(%ebp), %eax
363 movl %eax, 12(%esp)
364 movl 16(%ebp), %eax
365 movl %eax, 8(%esp)
366 movl 12(%ebp), %eax
367 movl %eax, 4(%esp)
368 movl 8(%ebp), %eax
369 movl %eax, (%esp)
370
371 call ASM_PFX(X11Size)
372
373 addl $40, %esp
374 popl %ebp
375 ret
376
377
378 ASM_GLOBAL ASM_PFX(GasketX11CheckKey)
379 ASM_PFX(GasketX11CheckKey):
380 pushl %ebp
381 movl %esp, %ebp
382 subl $24, %esp // sub extra 16 from the stack for alignment
383 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
384 movl 8(%ebp), %eax
385 movl %eax, (%esp)
386
387 call ASM_PFX(X11CheckKey)
388
389 addl $24, %esp
390 popl %ebp
391 ret
392
393 ASM_GLOBAL ASM_PFX(GasketX11GetKey)
394 ASM_PFX(GasketX11GetKey):
395 pushl %ebp
396 movl %esp, %ebp
397 subl $24, %esp // sub extra 16 from the stack for alignment
398 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
399 movl 12(%ebp), %eax
400 movl %eax, 4(%esp)
401 movl 8(%ebp), %eax
402 movl %eax, (%esp)
403
404 call ASM_PFX(X11GetKey)
405
406 addl $24, %esp
407 popl %ebp
408 ret
409
410
411 ASM_GLOBAL ASM_PFX(GasketX11KeySetState)
412 ASM_PFX(GasketX11KeySetState):
413 pushl %ebp
414 movl %esp, %ebp
415 subl $24, %esp // sub extra 16 from the stack for alignment
416 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
417 movl 12(%ebp), %eax
418 movl %eax, 4(%esp)
419 movl 8(%ebp), %eax
420 movl %eax, (%esp)
421
422 call ASM_PFX(X11KeySetState)
423
424 addl $24, %esp
425 popl %ebp
426 ret
427
428
429 ASM_GLOBAL ASM_PFX(GasketX11RegisterKeyNotify)
430 ASM_PFX(GasketX11RegisterKeyNotify):
431 pushl %ebp
432 movl %esp, %ebp
433 subl $40, %esp // sub extra 16 from the stack for alignment
434 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
435 movl 20(%ebp), %eax
436 movl %eax, 12(%esp)
437 movl 16(%ebp), %eax
438 movl %eax, 8(%esp)
439 movl 12(%ebp), %eax
440 movl %eax, 4(%esp)
441 movl 8(%ebp), %eax
442 movl %eax, (%esp)
443
444 call ASM_PFX(X11RegisterKeyNotify)
445
446 addl $40, %esp
447 popl %ebp
448 ret
449
450
451 ASM_GLOBAL ASM_PFX(GasketX11Blt)
452 ASM_PFX(GasketX11Blt):
453 pushl %ebp
454 movl %esp, %ebp
455 subl $40, %esp // sub extra 16 from the stack for alignment
456 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
457 movl 20(%ebp), %eax
458 movl %eax, 12(%esp)
459 movl 16(%ebp), %eax
460 movl %eax, 8(%esp)
461 movl 12(%ebp), %eax
462 movl %eax, 4(%esp)
463 movl 8(%ebp), %eax
464 movl %eax, (%esp)
465
466 call ASM_PFX(X11Blt)
467
468 addl $40, %esp
469 popl %ebp
470 ret
471
472
473 ASM_GLOBAL ASM_PFX(GasketX11CheckPointer)
474 ASM_PFX(GasketX11CheckPointer):
475 pushl %ebp
476 movl %esp, %ebp
477 subl $24, %esp // sub extra 16 from the stack for alignment
478 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
479 movl 8(%ebp), %eax
480 movl %eax, (%esp)
481
482 call ASM_PFX(X11CheckPointer)
483
484 addl $24, %esp
485 popl %ebp
486 ret
487
488
489 ASM_GLOBAL ASM_PFX(GasketX11GetPointerState)
490 ASM_PFX(GasketX11GetPointerState):
491 pushl %ebp
492 movl %esp, %ebp
493 subl $24, %esp // sub extra 16 from the stack for alignment
494 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
495 movl 12(%ebp), %eax
496 movl %eax, 4(%esp)
497 movl 8(%ebp), %eax
498 movl %eax, (%esp)
499
500 call ASM_PFX(X11GetPointerState)
501
502 addl $24, %esp
503 popl %ebp
504 ret
505
506
507 ASM_GLOBAL ASM_PFX(GasketX11GraphicsWindowOpen)
508 ASM_PFX(GasketX11GraphicsWindowOpen):
509 pushl %ebp
510 movl %esp, %ebp
511 subl $24, %esp // sub extra 16 from the stack for alignment
512 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
513 movl 8(%ebp), %eax
514 movl %eax, (%esp)
515
516 call ASM_PFX(X11GraphicsWindowOpen)
517
518 addl $24, %esp
519 popl %ebp
520 ret
521
522
523 ASM_GLOBAL ASM_PFX(GasketX11GraphicsWindowClose)
524 ASM_PFX(GasketX11GraphicsWindowClose):
525 pushl %ebp
526 movl %esp, %ebp
527 subl $24, %esp // sub extra 16 from the stack for alignment
528 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
529 movl 12(%ebp), %eax
530 movl %eax, 4(%esp)
531 movl 8(%ebp), %eax
532 movl %eax, (%esp)
533
534 call ASM_PFX(X11GraphicsWindowClose)
535
536 addl $24, %esp
537 popl %ebp
538 ret
539
540
541 // Pthreads
542
543 ASM_GLOBAL ASM_PFX(GasketPthreadMutexLock)
544 ASM_PFX(GasketPthreadMutexLock):
545 pushl %ebp
546 movl %esp, %ebp
547 subl $24, %esp // sub extra 16 from the stack for alignment
548 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
549 movl 8(%ebp), %eax
550 movl %eax, (%esp)
551
552 call ASM_PFX(PthreadMutexLock)
553
554 addl $24, %esp
555 popl %ebp
556 ret
557
558
559 ASM_GLOBAL ASM_PFX(GasketPthreadMutexUnLock)
560 ASM_PFX(GasketPthreadMutexUnLock):
561 pushl %ebp
562 movl %esp, %ebp
563 subl $24, %esp // sub extra 16 from the stack for alignment
564 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
565 movl 8(%ebp), %eax
566 movl %eax, (%esp)
567
568 call ASM_PFX(PthreadMutexUnLock)
569
570 addl $24, %esp
571 popl %ebp
572 ret
573
574 ASM_GLOBAL ASM_PFX(GasketPthreadMutexTryLock)
575 ASM_PFX(GasketPthreadMutexTryLock):
576 pushl %ebp
577 movl %esp, %ebp
578 subl $24, %esp // sub extra 16 from the stack for alignment
579 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
580 movl 8(%ebp), %eax
581 movl %eax, (%esp)
582
583 call ASM_PFX(PthreadMutexTryLock)
584
585 addl $24, %esp
586 popl %ebp
587 ret
588
589 ASM_GLOBAL ASM_PFX(GasketPthreadMutexInit)
590 ASM_PFX(GasketPthreadMutexInit):
591 pushl %ebp
592 movl %esp, %ebp
593 subl $24, %esp // sub extra 16 from the stack for alignment
594 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
595
596 call ASM_PFX(PthreadMutexInit)
597
598 addl $24, %esp
599 popl %ebp
600 ret
601
602
603
604 ASM_GLOBAL ASM_PFX(GasketPthreadMutexDestroy)
605 ASM_PFX(GasketPthreadMutexDestroy):
606 pushl %ebp
607 movl %esp, %ebp
608 subl $24, %esp // sub extra 16 from the stack for alignment
609 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
610 movl 8(%ebp), %eax
611 movl %eax, (%esp)
612
613 call ASM_PFX(PthreadMutexDestroy)
614
615 addl $24, %esp
616 popl %ebp
617 ret
618
619
620 ASM_GLOBAL ASM_PFX(GasketPthreadCreate)
621 ASM_PFX(GasketPthreadCreate):
622 pushl %ebp
623 movl %esp, %ebp
624 subl $40, %esp // sub extra 16 from the stack for alignment
625 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
626 movl 20(%ebp), %eax
627 movl %eax, 12(%esp)
628 movl 16(%ebp), %eax
629 movl %eax, 8(%esp)
630 movl 12(%ebp), %eax
631 movl %eax, 4(%esp)
632 movl 8(%ebp), %eax
633 movl %eax, (%esp)
634
635 call ASM_PFX(PthreadCreate)
636
637 addl $40, %esp
638 popl %ebp
639 ret
640
641
642 ASM_GLOBAL ASM_PFX(GasketPthreadExit)
643 ASM_PFX(GasketPthreadExit):
644 pushl %ebp
645 movl %esp, %ebp
646 subl $24, %esp // sub extra 16 from the stack for alignment
647 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
648 movl 8(%ebp), %eax
649 movl %eax, (%esp)
650
651 call ASM_PFX(PthreadExit)
652
653 addl $24, %esp
654 popl %ebp
655 ret
656
657
658
659 ASM_GLOBAL ASM_PFX(GasketPthreadSelf)
660 ASM_PFX(GasketPthreadSelf):
661 pushl %ebp
662 movl %esp, %ebp
663 subl $24, %esp // sub extra 16 from the stack for alignment
664 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
665
666 call ASM_PFX(PthreadSelf)
667
668 addl $24, %esp
669 popl %ebp
670 ret
671
672
673 ASM_GLOBAL ASM_PFX(GasketPthreadOpen)
674 ASM_PFX(GasketPthreadOpen):
675 pushl %ebp
676 movl %esp, %ebp
677 subl $24, %esp // sub extra 16 from the stack for alignment
678 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
679 movl 8(%ebp), %eax
680 movl %eax, (%esp)
681
682 call ASM_PFX(PthreadOpen)
683
684 addl $24, %esp
685 popl %ebp
686 ret
687
688
689 ASM_GLOBAL ASM_PFX(GasketPthreadClose)
690 ASM_PFX(GasketPthreadClose):
691 pushl %ebp
692 movl %esp, %ebp
693 subl $24, %esp // sub extra 16 from the stack for alignment
694 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
695 movl 8(%ebp), %eax
696 movl %eax, (%esp)
697
698 call ASM_PFX(PthreadClose)
699
700 addl $24, %esp
701 popl %ebp
702 ret
703
704
705
706
707 //
708 // UNIX ABI to EFI ABI call
709 //
710 // UINTN
711 // ReverseGasketUint64 (
712 // void *Api,
713 // UINTN Arg1
714 // );
715 ASM_GLOBAL ASM_PFX(ReverseGasketUint64)
716 ASM_PFX(ReverseGasketUint64):
717 pushl %ebp
718 movl %esp, %ebp // stack frame is for the debugger
719 subl $8, %esp
720 movl 12(%ebp), %eax
721 movl %eax, (%esp)
722 calll *8(%ebp)
723 addl $8, %esp
724 popl %ebp
725 ret
726
727 //
728 // UNIX ABI to EFI ABI call
729 //
730 // UINTN
731 // ReverseGasketUint64Uint64 (
732 // void *Api,
733 // UINTN Arg1
734 // UINTN Arg2
735 // );
736 ASM_GLOBAL ASM_PFX(ReverseGasketUint64Uint64)
737 ASM_PFX(ReverseGasketUint64Uint64):
738 pushl %ebp
739 movl %esp, %ebp // stack frame is for the debugger
740 subl $8, %esp
741 movl 16(%ebp), %eax
742 movl %eax, 4(%esp)
743 movl 12(%ebp), %eax
744 movl %eax, (%esp)
745 calll *8(%ebp)
746 addl $8, %esp
747 popl %ebp
748 ret
749
750
751 ASM_GLOBAL ASM_PFX(GasketSecUnixPeiAutoScan)
752 ASM_PFX(GasketSecUnixPeiAutoScan):
753 pushl %ebp
754 movl %esp, %ebp
755 subl $40, %esp // sub extra 16 from the stack for alignment
756 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
757 movl 16(%ebp), %eax
758 movl %eax, 8(%esp)
759 movl 12(%ebp), %eax
760 movl %eax, 4(%esp)
761 movl 8(%ebp), %eax
762 movl %eax, (%esp)
763
764 call ASM_PFX(SecUnixPeiAutoScan)
765
766 addl $40, %esp
767 popl %ebp
768 ret
769
770
771 ASM_GLOBAL ASM_PFX(GasketSecUnixFdAddress)
772 ASM_PFX(GasketSecUnixFdAddress):
773 pushl %ebp
774 movl %esp, %ebp
775 subl $40, %esp // sub extra 16 from the stack for alignment
776 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
777 movl 20(%ebp), %eax
778 movl %eax, 12(%esp)
779 movl 16(%ebp), %eax
780 movl %eax, 8(%esp)
781 movl 12(%ebp), %eax
782 movl %eax, 4(%esp)
783 movl 8(%ebp), %eax
784 movl %eax, (%esp)
785
786 call ASM_PFX(SecUnixFdAddress)
787
788 addl $40, %esp
789 popl %ebp
790 ret
791
792
793 // EmuIoThunk SimpleFileSystem
794
795 ASM_GLOBAL ASM_PFX(GasketPosixOpenVolume)
796 ASM_PFX(GasketPosixOpenVolume):
797 pushl %ebp
798 movl %esp, %ebp
799 subl $40, %esp // sub extra 16 from the stack for alignment
800 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
801 movl 20(%ebp), %eax
802 movl %eax, 12(%esp)
803 movl 16(%ebp), %eax
804 movl %eax, 8(%esp)
805 movl 12(%ebp), %eax
806 movl %eax, 4(%esp)
807 movl 8(%ebp), %eax
808 movl %eax, (%esp)
809
810 call ASM_PFX(PosixOpenVolume)
811
812 addl $40, %esp
813 popl %ebp
814 ret
815
816
817 ASM_GLOBAL ASM_PFX(GasketPosixFileOpen)
818 ASM_PFX(GasketPosixFileOpen):
819 pushl %ebp
820 movl %esp, %ebp
821 subl $40, %esp // sub extra 16 from the stack for alignment
822 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
823 movl 24(%ebp), %eax
824 movl %eax, 16(%esp)
825 movl 20(%ebp), %eax
826 movl %eax, 12(%esp)
827 movl 16(%ebp), %eax
828 movl %eax, 8(%esp)
829 movl 12(%ebp), %eax
830 movl %eax, 4(%esp)
831 movl 8(%ebp), %eax
832 movl %eax, (%esp)
833
834 call ASM_PFX(PosixFileOpen)
835
836 addl $40, %esp
837 popl %ebp
838 ret
839
840
841 ASM_GLOBAL ASM_PFX(GasketPosixFileCLose)
842 ASM_PFX(GasketPosixFileCLose):
843 pushl %ebp
844 movl %esp, %ebp
845 subl $24, %esp // sub extra 16 from the stack for alignment
846 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
847 movl 8(%ebp), %eax
848 movl %eax, (%esp)
849
850 call ASM_PFX(PosixFileCLose)
851
852 addl $24, %esp
853 popl %ebp
854 ret
855
856
857 ASM_GLOBAL ASM_PFX(GasketPosixFileDelete)
858 ASM_PFX(GasketPosixFileDelete):
859 pushl %ebp
860 movl %esp, %ebp
861 subl $24, %esp // sub extra 16 from the stack for alignment
862 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
863 movl 8(%ebp), %eax
864 movl %eax, (%esp)
865
866 call ASM_PFX(PosixFileDelete)
867
868 addl $24, %esp
869 popl %ebp
870 ret
871
872
873 ASM_GLOBAL ASM_PFX(GasketPosixFileRead)
874 ASM_PFX(GasketPosixFileRead):
875 pushl %ebp
876 movl %esp, %ebp
877 subl $40, %esp // sub extra 16 from the stack for alignment
878 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
879 movl 16(%ebp), %eax
880 movl %eax, 8(%esp)
881 movl 12(%ebp), %eax
882 movl %eax, 4(%esp)
883 movl 8(%ebp), %eax
884 movl %eax, (%esp)
885
886 call ASM_PFX(PosixFileRead)
887
888 addl $40, %esp
889 popl %ebp
890 ret
891
892
893 ASM_GLOBAL ASM_PFX(GasketPosixFileWrite)
894 ASM_PFX(GasketPosixFileWrite):
895 pushl %ebp
896 movl %esp, %ebp
897 subl $40, %esp // sub extra 16 from the stack for alignment
898 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
899 movl 16(%ebp), %eax
900 movl %eax, 8(%esp)
901 movl 12(%ebp), %eax
902 movl %eax, 4(%esp)
903 movl 8(%ebp), %eax
904 movl %eax, (%esp)
905
906 call ASM_PFX(PosixFileWrite)
907
908 addl $40, %esp
909 popl %ebp
910 ret
911
912
913 ASM_GLOBAL ASM_PFX(GasketPosixFileSetPossition)
914 ASM_PFX(GasketPosixFileSetPossition):
915 pushl %ebp
916 movl %esp, %ebp
917 subl $24, %esp // sub extra 16 from the stack for alignment
918 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
919 movl 12(%ebp), %eax
920 movl %eax, 4(%esp)
921 movl 8(%ebp), %eax
922 movl %eax, (%esp)
923
924 call ASM_PFX(PosixFileSetPossition)
925
926 addl $24, %esp
927 popl %ebp
928 ret
929
930
931 ASM_GLOBAL ASM_PFX(GasketPosixFileGetPossition)
932 ASM_PFX(GasketPosixFileGetPossition):
933 pushl %ebp
934 movl %esp, %ebp
935 subl $24, %esp // sub extra 16 from the stack for alignment
936 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
937 movl 12(%ebp), %eax
938 movl %eax, 4(%esp)
939 movl 8(%ebp), %eax
940 movl %eax, (%esp)
941
942 call ASM_PFX(PosixFileGetPossition)
943
944 addl $24, %esp
945 popl %ebp
946 ret
947
948
949 ASM_GLOBAL ASM_PFX(GasketPosixFileGetInfo)
950 ASM_PFX(GasketPosixFileGetInfo):
951 pushl %ebp
952 movl %esp, %ebp
953 subl $40, %esp // sub extra 16 from the stack for alignment
954 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
955 movl 20(%ebp), %eax
956 movl %eax, 12(%esp)
957 movl 16(%ebp), %eax
958 movl %eax, 8(%esp)
959 movl 12(%ebp), %eax
960 movl %eax, 4(%esp)
961 movl 8(%ebp), %eax
962 movl %eax, (%esp)
963
964 call ASM_PFX(PosixFileGetInfo)
965
966 addl $40, %esp
967 popl %ebp
968 ret
969
970
971 ASM_GLOBAL ASM_PFX(GasketPosixFileSetInfo)
972 ASM_PFX(GasketPosixFileSetInfo):
973 pushl %ebp
974 movl %esp, %ebp
975 subl $40, %esp // sub extra 16 from the stack for alignment
976 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
977 movl 20(%ebp), %eax
978 movl %eax, 12(%esp)
979 movl 16(%ebp), %eax
980 movl %eax, 8(%esp)
981 movl 12(%ebp), %eax
982 movl %eax, 4(%esp)
983 movl 8(%ebp), %eax
984 movl %eax, (%esp)
985
986 call ASM_PFX(PosixFileSetInfo)
987
988 addl $40, %esp
989 popl %ebp
990 ret
991
992
993 ASM_GLOBAL ASM_PFX(GasketPosixFileFlush)
994 ASM_PFX(GasketPosixFileFlush):
995 pushl %ebp
996 movl %esp, %ebp
997 subl $24, %esp // sub extra 16 from the stack for alignment
998 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
999 movl 8(%ebp), %eax
1000 movl %eax, (%esp)
1001
1002 call ASM_PFX(PosixFileFlush)
1003
1004 addl $24, %esp
1005 popl %ebp
1006 ret
1007
1008
1009 ASM_GLOBAL ASM_PFX(GasketPosixFileSystmeThunkOpen)
1010 ASM_PFX(GasketPosixFileSystmeThunkOpen):
1011 pushl %ebp
1012 movl %esp, %ebp
1013 subl $24, %esp // sub extra 16 from the stack for alignment
1014 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1015 movl 8(%ebp), %eax
1016 movl %eax, (%esp)
1017
1018 call ASM_PFX(PosixFileSystmeThunkOpen)
1019
1020 addl $24, %esp
1021 popl %ebp
1022 ret
1023
1024
1025 ASM_GLOBAL ASM_PFX(GasketPosixFileSystmeThunkClose)
1026 ASM_PFX(GasketPosixFileSystmeThunkClose):
1027 pushl %ebp
1028 movl %esp, %ebp
1029 subl $24, %esp // sub extra 16 from the stack for alignment
1030 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1031 movl 8(%ebp), %eax
1032 movl %eax, (%esp)
1033
1034 call ASM_PFX(PosixFileSystmeThunkClose)
1035
1036 addl $24, %esp
1037 popl %ebp
1038 ret
1039
1040 ASM_GLOBAL ASM_PFX(GasketEmuBlockIoReset)
1041 ASM_PFX(GasketEmuBlockIoReset):
1042 pushl %ebp
1043 movl %esp, %ebp
1044 subl $24, %esp // sub extra 16 from the stack for alignment
1045 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1046 movl 12(%ebp), %eax
1047 movl %eax, 4(%esp)
1048 movl 8(%ebp), %eax
1049 movl %eax, (%esp)
1050
1051 call ASM_PFX(EmuBlockIoReset)
1052
1053 addl $24, %esp
1054 popl %ebp
1055 ret
1056
1057
1058 ASM_GLOBAL ASM_PFX(GasketEmuBlockIoReadBlocks)
1059 ASM_PFX(GasketEmuBlockIoReadBlocks):
1060 pushl %ebp
1061 movl %esp, %ebp
1062 subl $40, %esp // sub extra 16 from the stack for alignment
1063 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1064 movl 28(%ebp), %eax
1065 movl %eax, 20(%esp)
1066 movl 24(%ebp), %eax
1067 movl %eax, 16(%esp)
1068 movl 20(%ebp), %eax
1069 movl %eax, 12(%esp)
1070 movl 16(%ebp), %eax
1071 movl %eax, 8(%esp)
1072 movl 12(%ebp), %eax
1073 movl %eax, 4(%esp)
1074 movl 8(%ebp), %eax
1075 movl %eax, (%esp)
1076
1077 call ASM_PFX(EmuBlockIoReadBlocks)
1078
1079 addl $40, %esp
1080 popl %ebp
1081 ret
1082
1083
1084 ASM_GLOBAL ASM_PFX(GasketEmuBlockIoWriteBlocks)
1085 ASM_PFX(GasketEmuBlockIoWriteBlocks):
1086 pushl %ebp
1087 movl %esp, %ebp
1088 subl $40, %esp // sub extra 16 from the stack for alignment
1089 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1090 movl 28(%ebp), %eax
1091 movl %eax, 20(%esp)
1092 movl 24(%ebp), %eax
1093 movl %eax, 16(%esp)
1094 movl 20(%ebp), %eax
1095 movl %eax, 12(%esp)
1096 movl 16(%ebp), %eax
1097 movl %eax, 8(%esp)
1098 movl 12(%ebp), %eax
1099 movl %eax, 4(%esp)
1100 movl 8(%ebp), %eax
1101 movl %eax, (%esp)
1102
1103 call ASM_PFX(EmuBlockIoWriteBlocks)
1104
1105 addl $40, %esp
1106 popl %ebp
1107 ret
1108
1109
1110 ASM_GLOBAL ASM_PFX(GasketEmuBlockIoFlushBlocks)
1111 ASM_PFX(GasketEmuBlockIoFlushBlocks): pushl %ebp
1112 movl %esp, %ebp
1113 subl $24, %esp // sub extra 16 from the stack for alignment
1114 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1115 movl 12(%ebp), %eax
1116 movl %eax, 4(%esp)
1117 movl 8(%ebp), %eax
1118 movl %eax, (%esp)
1119
1120
1121 call ASM_PFX(EmuBlockIoFlushBlocks)
1122
1123 addl $24, %esp
1124 popl %ebp
1125 ret
1126
1127
1128 ASM_GLOBAL ASM_PFX(GasketEmuBlockIoCreateMapping)
1129 ASM_PFX(GasketEmuBlockIoCreateMapping):
1130 pushl %ebp
1131 movl %esp, %ebp
1132 subl $24, %esp // sub extra 16 from the stack for alignment
1133 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1134 movl 12(%ebp), %eax
1135 movl %eax, 4(%esp)
1136 movl 8(%ebp), %eax
1137 movl %eax, (%esp)
1138
1139 call ASM_PFX(EmuBlockIoCreateMapping)
1140
1141 addl $24, %esp
1142 popl %ebp
1143 ret
1144
1145
1146 ASM_GLOBAL ASM_PFX(GasketBlockIoThunkOpen)
1147 ASM_PFX(GasketBlockIoThunkOpen):
1148 pushl %ebp
1149 movl %esp, %ebp
1150 subl $24, %esp // sub extra 16 from the stack for alignment
1151 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1152 movl 8(%ebp), %eax
1153 movl %eax, (%esp)
1154
1155 call ASM_PFX(EmuBlockIoThunkOpen)
1156
1157 addl $24, %esp
1158 popl %ebp
1159 ret
1160
1161
1162 ASM_GLOBAL ASM_PFX(GasketBlockIoThunkClose)
1163 ASM_PFX(GasketBlockIoThunkClose):
1164 pushl %ebp
1165 movl %esp, %ebp
1166 subl $24, %esp // sub extra 16 from the stack for alignment
1167 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1168 movl 8(%ebp), %eax
1169 movl %eax, (%esp)
1170
1171 call ASM_PFX(EmuBlockIoThunkClose)
1172
1173 addl $24, %esp
1174 popl %ebp
1175 ret
1176
1177
1178
1179 ASM_GLOBAL ASM_PFX(GasketSnpCreateMapping)
1180 ASM_PFX(GasketSnpCreateMapping):
1181 pushl %ebp
1182 movl %esp, %ebp
1183 subl $24, %esp // sub extra 16 from the stack for alignment
1184 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1185 movl 12(%ebp), %eax
1186 movl %eax, 4(%esp)
1187 movl 8(%ebp), %eax
1188 movl %eax, (%esp)
1189
1190 call ASM_PFX(EmuSnpCreateMapping)
1191
1192 addl $24, %esp
1193 popl %ebp
1194 ret
1195
1196
1197 ASM_GLOBAL ASM_PFX(GasketSnpStart)
1198 ASM_PFX(GasketSnpStart):
1199 pushl %ebp
1200 movl %esp, %ebp
1201 subl $24, %esp // sub extra 16 from the stack for alignment
1202 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1203 movl 8(%ebp), %eax
1204 movl %eax, (%esp)
1205
1206 call ASM_PFX(EmuSnpStart)
1207
1208 addl $24, %esp
1209 popl %ebp
1210 ret
1211
1212
1213 ASM_GLOBAL ASM_PFX(GasketSnpStop)
1214 ASM_PFX(GasketSnpStop):
1215 pushl %ebp
1216 movl %esp, %ebp
1217 subl $24, %esp // sub extra 16 from the stack for alignment
1218 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1219 movl 8(%ebp), %eax
1220 movl %eax, (%esp)
1221
1222 call ASM_PFX(EmuSnpStop)
1223
1224 addl $24, %esp
1225 popl %ebp
1226 ret
1227
1228
1229 ASM_GLOBAL ASM_PFX(GasketSnpInitialize)
1230 ASM_PFX(GasketSnpInitialize):
1231 pushl %ebp
1232 movl %esp, %ebp
1233 subl $40, %esp // sub extra 16 from the stack for alignment
1234 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1235 movl 16(%ebp), %eax
1236 movl %eax, 8(%esp)
1237 movl 12(%ebp), %eax
1238 movl %eax, 4(%esp)
1239 movl 8(%ebp), %eax
1240 movl %eax, (%esp)
1241
1242 call ASM_PFX(EmuSnpInitialize)
1243
1244 addl $40, %esp
1245 popl %ebp
1246 ret
1247
1248
1249 ASM_GLOBAL ASM_PFX(GasketSnpReset)
1250 ASM_PFX(GasketSnpReset):
1251 pushl %ebp
1252 movl %esp, %ebp
1253 subl $24, %esp // sub extra 16 from the stack for alignment
1254 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1255 movl 12(%ebp), %eax
1256 movl %eax, 4(%esp)
1257 movl 8(%ebp), %eax
1258 movl %eax, (%esp)
1259
1260 call ASM_PFX(EmuSnpReset)
1261
1262 addl $24, %esp
1263 popl %ebp
1264 ret
1265
1266
1267 ASM_GLOBAL ASM_PFX(GasketSnpShutdown)
1268 ASM_PFX(GasketSnpShutdown):
1269 pushl %ebp
1270 movl %esp, %ebp
1271 subl $24, %esp // sub extra 16 from the stack for alignment
1272 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1273 movl 8(%ebp), %eax
1274 movl %eax, (%esp)
1275
1276 call ASM_PFX(EmuSnpShutdown)
1277
1278 addl $24, %esp
1279 popl %ebp
1280 ret
1281
1282
1283 ASM_GLOBAL ASM_PFX(GasketSnpReceiveFilters)
1284 ASM_PFX(GasketSnpReceiveFilters):
1285 pushl %ebp
1286 movl %esp, %ebp
1287 subl $40, %esp // sub extra 16 from the stack for alignment
1288 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1289 movl 28(%ebp), %eax
1290 movl %eax, 20(%esp)
1291 movl 24(%ebp), %eax
1292 movl %eax, 16(%esp)
1293 movl 20(%ebp), %eax
1294 movl %eax, 12(%esp)
1295 movl 16(%ebp), %eax
1296 movl %eax, 8(%esp)
1297 movl 12(%ebp), %eax
1298 movl %eax, 4(%esp)
1299 movl 8(%ebp), %eax
1300 movl %eax, (%esp)
1301
1302 call ASM_PFX(EmuSnpReceiveFilters)
1303
1304 addl $40, %esp
1305 popl %ebp
1306 ret
1307
1308
1309 ASM_GLOBAL ASM_PFX(GasketSnpStationAddress)
1310 ASM_PFX(GasketSnpStationAddress):
1311 pushl %ebp
1312 movl %esp, %ebp
1313 subl $40, %esp // sub extra 16 from the stack for alignment
1314 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1315 movl 16(%ebp), %eax
1316 movl %eax, 8(%esp)
1317 movl 12(%ebp), %eax
1318 movl %eax, 4(%esp)
1319 movl 8(%ebp), %eax
1320 movl %eax, (%esp)
1321
1322 addl $40, %esp
1323 popl %ebp
1324 ret
1325
1326
1327
1328 ASM_GLOBAL ASM_PFX(GasketSnpStatistics)
1329 ASM_PFX(GasketSnpStatistics):
1330 pushl %ebp
1331 movl %esp, %ebp
1332 subl $40, %esp // sub extra 16 from the stack for alignment
1333 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1334 movl 20(%ebp), %eax
1335 movl %eax, 12(%esp)
1336 movl 16(%ebp), %eax
1337 movl %eax, 8(%esp)
1338 movl 12(%ebp), %eax
1339 movl %eax, 4(%esp)
1340 movl 8(%ebp), %eax
1341 movl %eax, (%esp)
1342
1343 call ASM_PFX(EmuSnpStatistics)
1344
1345 addl $40, %esp
1346 popl %ebp
1347 ret
1348
1349
1350 ASM_GLOBAL ASM_PFX(GasketSnpMCastIpToMac)
1351 ASM_PFX(GasketSnpMCastIpToMac):
1352 pushl %ebp
1353 movl %esp, %ebp
1354 subl $40, %esp // sub extra 16 from the stack for alignment
1355 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1356 movl 20(%ebp), %eax
1357 movl %eax, 12(%esp)
1358 movl 16(%ebp), %eax
1359 movl %eax, 8(%esp)
1360 movl 12(%ebp), %eax
1361 movl %eax, 4(%esp)
1362 movl 8(%ebp), %eax
1363 movl %eax, (%esp)
1364
1365 call ASM_PFX(EmuSnpMCastIpToMac)
1366
1367 addl $40, %esp
1368 popl %ebp
1369 ret
1370
1371
1372 ASM_GLOBAL ASM_PFX(GasketSnpNvData)
1373 ASM_PFX(GasketSnpNvData):
1374 pushl %ebp
1375 movl %esp, %ebp
1376 subl $40, %esp // sub extra 16 from the stack for alignment
1377 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1378 movl 24(%ebp), %eax
1379 movl %eax, 16(%esp)
1380 movl 20(%ebp), %eax
1381 movl %eax, 12(%esp)
1382 movl 16(%ebp), %eax
1383 movl %eax, 8(%esp)
1384 movl 12(%ebp), %eax
1385 movl %eax, 4(%esp)
1386 movl 8(%ebp), %eax
1387 movl %eax, (%esp)
1388
1389 call ASM_PFX(EmuSnpNvData)
1390
1391 addl $40, %esp
1392 popl %ebp
1393 ret
1394
1395
1396 ASM_GLOBAL ASM_PFX(GasketSnpGetStatus)
1397 ASM_PFX(GasketSnpGetStatus):
1398 pushl %ebp
1399 movl %esp, %ebp
1400 subl $40, %esp // sub extra 16 from the stack for alignment
1401 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1402 movl 16(%ebp), %eax
1403 movl %eax, 8(%esp)
1404 movl 12(%ebp), %eax
1405 movl %eax, 4(%esp)
1406 movl 8(%ebp), %eax
1407 movl %eax, (%esp)
1408
1409 call ASM_PFX(EmuSnpGetStatus)
1410
1411 addl $40, %esp
1412 popl %ebp
1413 ret
1414
1415
1416
1417 ASM_GLOBAL ASM_PFX(GasketSnpTransmit)
1418 ASM_PFX(GasketSnpTransmit):
1419 pushl %ebp
1420 movl %esp, %ebp
1421 subl $56, %esp // sub extra 16 from the stack for alignment
1422 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1423 movl 32(%ebp), %eax
1424 movl %eax, 24(%esp)
1425 movl 28(%ebp), %eax
1426 movl %eax, 20(%esp)
1427 movl 24(%ebp), %eax
1428 movl %eax, 16(%esp)
1429 movl 20(%ebp), %eax
1430 movl %eax, 12(%esp)
1431 movl 16(%ebp), %eax
1432 movl %eax, 8(%esp)
1433 movl 12(%ebp), %eax
1434 movl %eax, 4(%esp)
1435 movl 8(%ebp), %eax
1436 movl %eax, (%esp)
1437
1438 call ASM_PFX(EmuSnpTransmit)
1439
1440 addl $56, %esp
1441 popl %ebp
1442 ret
1443
1444
1445
1446 ASM_GLOBAL ASM_PFX(GasketSnpReceive)
1447 ASM_PFX(GasketSnpReceive):
1448 pushl %ebp
1449 movl %esp, %ebp
1450 subl $56, %esp // sub extra 16 from the stack for alignment
1451 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1452 movl 32(%ebp), %eax
1453 movl %eax, 24(%esp)
1454 movl 28(%ebp), %eax
1455 movl %eax, 20(%esp)
1456 movl 24(%ebp), %eax
1457 movl %eax, 16(%esp)
1458 movl 20(%ebp), %eax
1459 movl %eax, 12(%esp)
1460 movl 16(%ebp), %eax
1461 movl %eax, 8(%esp)
1462 movl 12(%ebp), %eax
1463 movl %eax, 4(%esp)
1464 movl 8(%ebp), %eax
1465 movl %eax, (%esp)
1466
1467 call ASM_PFX(EmuSnpReceive)
1468
1469 addl $24, %esp
1470 popl %ebp
1471 ret
1472
1473
1474 ASM_GLOBAL ASM_PFX(GasketSnpThunkOpen)
1475 ASM_PFX(GasketSnpThunkOpen):
1476 pushl %ebp
1477 movl %esp, %ebp
1478 subl $24, %esp // sub extra 16 from the stack for alignment
1479 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1480 movl 8(%ebp), %eax
1481 movl %eax, (%esp)
1482
1483 call ASM_PFX(EmuSnpThunkOpen)
1484
1485 addl $24, %esp
1486 popl %ebp
1487 ret
1488
1489
1490 ASM_GLOBAL ASM_PFX(GasketSnpThunkClose)
1491 ASM_PFX(GasketSnpThunkClose):
1492 pushl %ebp
1493 movl %esp, %ebp
1494 subl $24, %esp // sub extra 16 from the stack for alignment
1495 and $-16, %esp // stack needs to end in 0xFFFFFFF0 before call
1496 movl 8(%ebp), %eax
1497 movl %eax, (%esp)
1498
1499 call ASM_PFX(EmuSnpThunkClose)
1500
1501 addl $24, %esp
1502 popl %ebp
1503 ret
1504
1505