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