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