]>
Commit | Line | Data |
---|---|---|
07a90790 | 1 | #------------------------------------------------------------------------------ |
2 | # | |
3 | # This template was generated from GasketEfiTemplate.c Unix x86_64 ABI | |
4 | # | |
2ff79f2e | 5 | # The EFI_UNIX_THUNK_PROTOCOL member functions call these these generic assembly |
6 | # routines. | |
07a90790 | 7 | # |
8 | # Some OS X POSIX calls get name mangled in C code and we need to fill in a C global | |
9 | # to get the correct binding (does not work from assembly). So we have 4 functions | |
10 | # that do an indirect call, while the others call POSIX APIs directly | |
11 | # | |
2ff79f2e | 12 | # movq _gUnixRmDir@GOTPCREL(%rip), %rax |
07a90790 | 13 | # |
14 | # | |
15 | # UNIX Arg passing: RCX, RDX, R8, R9 | |
a4902ccc | 16 | # EFI Arg passing: RDI, RSI, RDX, RCX, R8, R9 |
07a90790 | 17 | # Callee allocates 32 bytes on stack to spill registers |
18 | # RSI, RDI calle-save on EFI, scatch on UNIX callign | |
19 | # | |
20 | # | |
21 | # Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR> | |
22 | # This program and the accompanying materials | |
23 | # are licensed and made available under the terms and conditions of the BSD License | |
24 | # which accompanies this distribution. The full text of the license may be found at | |
25 | # http://opensource.org/licenses/bsd-license.php | |
26 | # | |
27 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, | |
28 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. | |
29 | # | |
30 | #------------------------------------------------------------------------------ | |
31 | ||
a4902ccc | 32 | // |
33 | // Gaskets are EFI ABI to UNIX ABI calls | |
34 | // EFI ABI code will sub 40 (0x28) from %rsp before calling a function | |
35 | // This is the 32 (0x20) byte to spill registers and 8 bytes to align stack on 16 byte boundry. | |
36 | // | |
07a90790 | 37 | .text |
a4902ccc | 38 | |
39 | // 32 byte shadow to spill rcx-r9, 8 bytes to align stack on 16 byte boundry | |
40 | // Any call with 0 - 4 arguments allocates 40 bytes on the stack. | |
2ff79f2e | 41 | // For more than 4 args you always have to increase in quanta of 16 so 5 or 6 args is 56, |
a4902ccc | 42 | // 7 or 8 args is 72, and 9 or 10 args is 88 |
2ff79f2e | 43 | #define EFI_STACK_SHADOW_SPACE 40 |
44 | #define EFI_STACK_SHADOW_SPACE_5_6 56 | |
45 | #define EFI_STACK_SHADOW_SPACE_7_8 72 | |
46 | #define EFI_STACK_SHADOW_SPACE_9_10 88 | |
a4902ccc | 47 | |
48 | ||
49 | ||
50 | .text | |
51 | ||
52 | ||
3ff2e324 | 53 | ASM_GLOBAL ASM_PFX(Gasketrmdir) |
54 | ASM_PFX(Gasketrmdir): | |
2ff79f2e | 55 | pushq %rbp // stack frame is for the debugger |
56 | movq %rsp, %rbp | |
57 | ||
58 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
a4902ccc | 59 | pushq %rdi |
07a90790 | 60 | |
2ff79f2e | 61 | movq %rcx, %rdi // Swizzle args |
07a90790 | 62 | |
3ff2e324 | 63 | movq ASM_PFX(gUnixRmDir)@GOTPCREL(%rip), %rax // Get function name mangled by C |
a4902ccc | 64 | movq (%rax), %rax |
07a90790 | 65 | call *%rax |
3ff2e324 | 66 | |
2ff79f2e | 67 | |
68 | popq %rdi // restore state | |
69 | popq %rsi | |
70 | popq %rbp | |
a4902ccc | 71 | ret |
72 | ||
07a90790 | 73 | |
3ff2e324 | 74 | ASM_GLOBAL ASM_PFX(Gasketopendir) |
75 | ASM_PFX(Gasketopendir): | |
2ff79f2e | 76 | pushq %rbp // stack frame is for the debugger |
77 | movq %rsp, %rbp | |
78 | ||
79 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
a4902ccc | 80 | pushq %rdi |
07a90790 | 81 | |
2ff79f2e | 82 | movq %rcx, %rdi // Swizzle args |
07a90790 | 83 | |
3ff2e324 | 84 | movq ASM_PFX(gUnixOpenDir)@GOTPCREL(%rip), %rax // Get function name mangled by C |
a4902ccc | 85 | movq (%rax), %rax |
07a90790 | 86 | call *%rax |
2ff79f2e | 87 | |
a4902ccc | 88 | popq %rdi // restore state |
07a90790 | 89 | popq %rsi |
2ff79f2e | 90 | popq %rbp |
07a90790 | 91 | ret |
92 | ||
93 | ||
94 | ||
3ff2e324 | 95 | ASM_GLOBAL ASM_PFX(Gasketstat) |
96 | ASM_PFX(Gasketstat): | |
2ff79f2e | 97 | pushq %rbp // stack frame is for the debugger |
98 | movq %rsp, %rbp | |
99 | ||
100 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
a4902ccc | 101 | pushq %rdi |
07a90790 | 102 | |
2ff79f2e | 103 | movq %rcx, %rdi // Swizzle args |
104 | movq %rdx, %rsi | |
a4902ccc | 105 | |
3ff2e324 | 106 | movq ASM_PFX(gUnixStat)@GOTPCREL(%rip), %rax // Get function name mangled by C |
a4902ccc | 107 | movq (%rax), %rax |
07a90790 | 108 | call *%rax |
2ff79f2e | 109 | |
3ff2e324 | 110 | |
a4902ccc | 111 | popq %rdi // restore state |
07a90790 | 112 | popq %rsi |
2ff79f2e | 113 | popq %rbp |
07a90790 | 114 | ret |
2ff79f2e | 115 | |
116 | ||
3ff2e324 | 117 | ASM_GLOBAL ASM_PFX(Gasketstatfs) |
118 | ASM_PFX(Gasketstatfs): | |
2ff79f2e | 119 | pushq %rbp // stack frame is for the debugger |
120 | movq %rsp, %rbp | |
121 | ||
122 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
a4902ccc | 123 | pushq %rdi |
124 | ||
2ff79f2e | 125 | movq %rcx, %rdi // Swizzle args |
126 | movq %rdx, %rsi | |
a4902ccc | 127 | |
3ff2e324 | 128 | movq ASM_PFX(gUnixStatFs)@GOTPCREL(%rip), %rax // Get function name mangled by C |
07a90790 | 129 | movq (%rax), %rax |
a4902ccc | 130 | call *%rax |
2ff79f2e | 131 | |
a4902ccc | 132 | popq %rdi // restore state |
133 | popq %rsi | |
2ff79f2e | 134 | popq %rbp |
a4902ccc | 135 | ret |
2ff79f2e | 136 | |
3ff2e324 | 137 | ASM_GLOBAL ASM_PFX(Gasketrewinddir) |
138 | ASM_PFX(Gasketrewinddir): | |
2ff79f2e | 139 | pushq %rbp // stack frame is for the debugger |
140 | movq %rsp, %rbp | |
a4902ccc | 141 | |
2ff79f2e | 142 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI |
143 | pushq %rdi | |
144 | ||
145 | movq %rcx, %rdi // Swizzle args | |
07a90790 | 146 | |
3ff2e324 | 147 | movq ASM_PFX(gUnixRewinddir)@GOTPCREL(%rip), %rax // Get function name mangled by C |
a4902ccc | 148 | movq (%rax), %rax |
07a90790 | 149 | call *%rax |
2ff79f2e | 150 | |
a4902ccc | 151 | popq %rdi // restore state |
07a90790 | 152 | popq %rsi |
2ff79f2e | 153 | popq %rbp |
07a90790 | 154 | ret |
2ff79f2e | 155 | |
3ff2e324 | 156 | ASM_GLOBAL ASM_PFX(Gasketreaddir) |
157 | ASM_PFX(Gasketreaddir): | |
2ff79f2e | 158 | pushq %rbp // stack frame is for the debugger |
159 | movq %rsp, %rbp | |
07a90790 | 160 | |
2ff79f2e | 161 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI |
162 | pushq %rdi | |
163 | ||
164 | movq %rcx, %rdi // Swizzle args | |
a4902ccc | 165 | |
3ff2e324 | 166 | movq ASM_PFX(gUnixReaddir)@GOTPCREL(%rip), %rax // Get function name mangled by C |
a4902ccc | 167 | movq (%rax), %rax |
168 | call *%rax | |
2ff79f2e | 169 | |
a4902ccc | 170 | popq %rdi // restore state |
171 | popq %rsi | |
2ff79f2e | 172 | popq %rbp |
a4902ccc | 173 | ret |
2ff79f2e | 174 | |
3ff2e324 | 175 | |
176 | ASM_GLOBAL ASM_PFX(GasketmsSleep) | |
177 | ASM_PFX(GasketmsSleep): | |
2ff79f2e | 178 | pushq %rbp // stack frame is for the debugger |
179 | movq %rsp, %rbp | |
180 | ||
181 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
a4902ccc | 182 | pushq %rdi |
07a90790 | 183 | |
2ff79f2e | 184 | movq %rcx, %rdi // Swizzle args |
3ff2e324 | 185 | |
186 | call ASM_PFX(msSleep) | |
2ff79f2e | 187 | |
a4902ccc | 188 | popq %rdi // restore state |
07a90790 | 189 | popq %rsi |
2ff79f2e | 190 | popq %rbp |
07a90790 | 191 | ret |
2ff79f2e | 192 | |
193 | ||
3ff2e324 | 194 | ASM_GLOBAL ASM_PFX(Gasketexit) |
195 | ASM_PFX(Gasketexit): | |
2ff79f2e | 196 | movq %rcx, %rdi // Swizzle args |
3ff2e324 | 197 | call ASM_PFX(exit) // Less to do as we will never return to EFI ABI world |
07a90790 | 198 | LDEAD_LOOP: |
bb111c23 | 199 | jmp LDEAD_LOOP // _exit should never return |
a4902ccc | 200 | |
07a90790 | 201 | |
202 | ||
3ff2e324 | 203 | ASM_GLOBAL ASM_PFX(GasketSetTimer) |
204 | ASM_PFX(GasketSetTimer): | |
2ff79f2e | 205 | pushq %rbp // stack frame is for the debugger |
206 | movq %rsp, %rbp | |
207 | ||
208 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
a4902ccc | 209 | pushq %rdi |
210 | ||
2ff79f2e | 211 | movq %rcx, %rdi // Swizzle args |
212 | movq %rdx, %rsi | |
3ff2e324 | 213 | |
214 | call ASM_PFX(SetTimer) | |
2ff79f2e | 215 | |
a4902ccc | 216 | popq %rdi // restore state |
217 | popq %rsi | |
2ff79f2e | 218 | popq %rbp |
a4902ccc | 219 | ret |
220 | ||
2ff79f2e | 221 | |
3ff2e324 | 222 | ASM_GLOBAL ASM_PFX(GasketGetLocalTime) |
223 | ASM_PFX(GasketGetLocalTime): | |
2ff79f2e | 224 | pushq %rbp // stack frame is for the debugger |
225 | movq %rsp, %rbp | |
226 | ||
227 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
228 | pushq %rdi | |
a4902ccc | 229 | |
2ff79f2e | 230 | movq %rcx, %rdi // Swizzle args |
3ff2e324 | 231 | |
232 | call ASM_PFX(GetLocalTime) | |
a4902ccc | 233 | |
2ff79f2e | 234 | popq %rdi // restore state |
235 | popq %rsi | |
236 | popq %rbp | |
a4902ccc | 237 | ret |
238 | ||
2ff79f2e | 239 | |
3ff2e324 | 240 | |
241 | ASM_GLOBAL ASM_PFX(Gasketgmtime) | |
242 | ASM_PFX(Gasketgmtime): | |
2ff79f2e | 243 | pushq %rbp // stack frame is for the debugger |
244 | movq %rsp, %rbp | |
a4902ccc | 245 | |
2ff79f2e | 246 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI |
247 | pushq %rdi | |
248 | ||
249 | movq %rcx, %rdi // Swizzle args | |
3ff2e324 | 250 | |
251 | call ASM_PFX(localtime) | |
a4902ccc | 252 | |
2ff79f2e | 253 | popq %rdi // restore state |
254 | popq %rsi | |
255 | popq %rbp | |
a4902ccc | 256 | ret |
257 | ||
258 | ||
259 | ||
3ff2e324 | 260 | ASM_GLOBAL ASM_PFX(GasketGetTimeZone) |
261 | ASM_PFX(GasketGetTimeZone): | |
2ff79f2e | 262 | pushq %rbp // stack frame is for the debugger |
263 | movq %rsp, %rbp | |
264 | ||
265 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
266 | pushq %rdi | |
a4902ccc | 267 | |
3ff2e324 | 268 | call ASM_PFX(GetTimeZone) |
269 | ||
2ff79f2e | 270 | popq %rdi // restore state |
271 | popq %rsi | |
272 | popq %rbp | |
a4902ccc | 273 | ret |
274 | ||
2ff79f2e | 275 | |
3ff2e324 | 276 | ASM_GLOBAL ASM_PFX(GasketGetDayLight) |
277 | ASM_PFX(GasketGetDayLight): | |
2ff79f2e | 278 | pushq %rbp // stack frame is for the debugger |
279 | movq %rsp, %rbp | |
280 | ||
281 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
282 | pushq %rdi | |
a4902ccc | 283 | |
3ff2e324 | 284 | call ASM_PFX(GetDayLight) |
285 | ||
2ff79f2e | 286 | popq %rdi // restore state |
287 | popq %rsi | |
288 | popq %rbp | |
a4902ccc | 289 | ret |
290 | ||
291 | ||
3ff2e324 | 292 | ASM_GLOBAL ASM_PFX(Gasketpoll) |
293 | ASM_PFX(Gasketpoll): | |
2ff79f2e | 294 | pushq %rbp // stack frame is for the debugger |
295 | movq %rsp, %rbp | |
a4902ccc | 296 | |
2ff79f2e | 297 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI |
298 | pushq %rdi | |
299 | ||
300 | movq %rcx, %rdi // Swizzle args | |
301 | movq %rdx, %rsi | |
a4902ccc | 302 | movq %r8, %rdx |
303 | ||
3ff2e324 | 304 | call ASM_PFX(poll) |
305 | ||
2ff79f2e | 306 | popq %rdi // restore state |
307 | popq %rsi | |
308 | popq %rbp | |
a4902ccc | 309 | ret |
310 | ||
311 | ||
312 | ||
3ff2e324 | 313 | ASM_GLOBAL ASM_PFX(Gasketread) |
314 | ASM_PFX(Gasketread): | |
2ff79f2e | 315 | pushq %rbp // stack frame is for the debugger |
316 | movq %rsp, %rbp | |
a4902ccc | 317 | |
2ff79f2e | 318 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI |
319 | pushq %rdi | |
320 | ||
321 | movq %rcx, %rdi // Swizzle args | |
322 | movq %rdx, %rsi | |
a4902ccc | 323 | movq %r8, %rdx |
324 | ||
3ff2e324 | 325 | call ASM_PFX(read) |
326 | ||
2ff79f2e | 327 | popq %rdi // restore state |
328 | popq %rsi | |
329 | popq %rbp | |
a4902ccc | 330 | ret |
331 | ||
332 | ||
3ff2e324 | 333 | ASM_GLOBAL ASM_PFX(Gasketwrite) |
334 | ASM_PFX(Gasketwrite): | |
2ff79f2e | 335 | pushq %rbp // stack frame is for the debugger |
336 | movq %rsp, %rbp | |
337 | ||
338 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
339 | pushq %rdi | |
a4902ccc | 340 | |
2ff79f2e | 341 | movq %rcx, %rdi // Swizzle args |
342 | movq %rdx, %rsi | |
a4902ccc | 343 | movq %r8, %rdx |
344 | ||
3ff2e324 | 345 | call ASM_PFX(write) |
346 | ||
2ff79f2e | 347 | popq %rdi // restore state |
348 | popq %rsi | |
349 | popq %rbp | |
a4902ccc | 350 | ret |
351 | ||
352 | ||
3ff2e324 | 353 | ASM_GLOBAL ASM_PFX(Gasketgetenv) |
354 | ASM_PFX(Gasketgetenv): | |
2ff79f2e | 355 | pushq %rbp // stack frame is for the debugger |
356 | movq %rsp, %rbp | |
a4902ccc | 357 | |
2ff79f2e | 358 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI |
359 | pushq %rdi | |
3ff2e324 | 360 | |
2ff79f2e | 361 | movq %rcx, %rdi // Swizzle args |
a4902ccc | 362 | |
2ff79f2e | 363 | call ASM_PFX(getenv) |
364 | ||
365 | popq %rdi // restore state | |
366 | popq %rsi | |
367 | popq %rbp | |
a4902ccc | 368 | ret |
369 | ||
370 | ||
3ff2e324 | 371 | ASM_GLOBAL ASM_PFX(Gasketopen) |
372 | ASM_PFX(Gasketopen): | |
2ff79f2e | 373 | pushq %rbp // stack frame is for the debugger |
374 | movq %rsp, %rbp | |
375 | ||
376 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
377 | pushq %rdi | |
a4902ccc | 378 | |
2ff79f2e | 379 | movq %rcx, %rdi // Swizzle args |
380 | movq %rdx, %rsi | |
a4902ccc | 381 | movq %r8, %rdx |
382 | ||
3ff2e324 | 383 | call ASM_PFX(open) |
2ff79f2e | 384 | |
385 | popq %rdi // restore state | |
386 | popq %rsi | |
387 | popq %rbp | |
a4902ccc | 388 | ret |
389 | ||
390 | ||
3ff2e324 | 391 | ASM_GLOBAL ASM_PFX(Gasketlseek) |
392 | ASM_PFX(Gasketlseek): | |
2ff79f2e | 393 | pushq %rbp // stack frame is for the debugger |
394 | movq %rsp, %rbp | |
395 | ||
396 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
397 | pushq %rdi | |
a4902ccc | 398 | |
2ff79f2e | 399 | movq %rcx, %rdi // Swizzle args |
400 | movq %rdx, %rsi | |
a4902ccc | 401 | movq %r8, %rdx |
402 | ||
3ff2e324 | 403 | call ASM_PFX(lseek) |
2ff79f2e | 404 | |
405 | popq %rdi // restore state | |
406 | popq %rsi | |
407 | popq %rbp | |
a4902ccc | 408 | ret |
409 | ||
410 | ||
3ff2e324 | 411 | ASM_GLOBAL ASM_PFX(Gasketftruncate) |
412 | ASM_PFX(Gasketftruncate): | |
2ff79f2e | 413 | pushq %rbp // stack frame is for the debugger |
414 | movq %rsp, %rbp | |
415 | ||
416 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
417 | pushq %rdi | |
a4902ccc | 418 | |
2ff79f2e | 419 | movq %rcx, %rdi // Swizzle args |
420 | movq %rdx, %rsi | |
a4902ccc | 421 | movq %r8, %rdx |
422 | ||
3ff2e324 | 423 | call ASM_PFX(ftruncate) |
424 | ||
2ff79f2e | 425 | popq %rdi // restore state |
426 | popq %rsi | |
427 | popq %rbp | |
a4902ccc | 428 | ret |
429 | ||
430 | ||
3ff2e324 | 431 | ASM_GLOBAL ASM_PFX(Gasketclose) |
432 | ASM_PFX(Gasketclose): | |
2ff79f2e | 433 | pushq %rbp // stack frame is for the debugger |
434 | movq %rsp, %rbp | |
a4902ccc | 435 | |
2ff79f2e | 436 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI |
437 | pushq %rdi | |
3ff2e324 | 438 | |
2ff79f2e | 439 | movq %rcx, %rdi // Swizzle args |
a4902ccc | 440 | |
2ff79f2e | 441 | call ASM_PFX(close) |
442 | ||
443 | popq %rdi // restore state | |
444 | popq %rsi | |
445 | popq %rbp | |
a4902ccc | 446 | ret |
447 | ||
448 | ||
449 | ||
3ff2e324 | 450 | ASM_GLOBAL ASM_PFX(Gasketmkdir) |
451 | ASM_PFX(Gasketmkdir): | |
2ff79f2e | 452 | pushq %rbp // stack frame is for the debugger |
453 | movq %rsp, %rbp | |
454 | ||
455 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
456 | pushq %rdi | |
a4902ccc | 457 | |
2ff79f2e | 458 | movq %rcx, %rdi // Swizzle args |
459 | movq %rdx, %rsi | |
3ff2e324 | 460 | |
461 | call ASM_PFX(mkdir) | |
a4902ccc | 462 | |
2ff79f2e | 463 | popq %rdi // restore state |
464 | popq %rsi | |
465 | popq %rbp | |
a4902ccc | 466 | ret |
467 | ||
468 | ||
3ff2e324 | 469 | ASM_GLOBAL ASM_PFX(Gasketunlink) |
470 | ASM_PFX(Gasketunlink): | |
2ff79f2e | 471 | pushq %rbp // stack frame is for the debugger |
472 | movq %rsp, %rbp | |
a4902ccc | 473 | |
2ff79f2e | 474 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI |
475 | pushq %rdi | |
3ff2e324 | 476 | |
2ff79f2e | 477 | movq %rcx, %rdi // Swizzle args |
a4902ccc | 478 | |
2ff79f2e | 479 | call ASM_PFX(unlink) |
480 | ||
481 | popq %rdi // restore state | |
482 | popq %rsi | |
483 | popq %rbp | |
a4902ccc | 484 | ret |
485 | ||
486 | ||
3ff2e324 | 487 | ASM_GLOBAL ASM_PFX(GasketGetErrno) |
488 | ASM_PFX(GasketGetErrno): | |
2ff79f2e | 489 | pushq %rbp // stack frame is for the debugger |
490 | movq %rsp, %rbp | |
a4902ccc | 491 | |
2ff79f2e | 492 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI |
493 | pushq %rdi | |
3ff2e324 | 494 | |
2ff79f2e | 495 | call ASM_PFX(GetErrno) |
496 | ||
497 | popq %rdi // restore state | |
498 | popq %rsi | |
499 | popq %rbp | |
a4902ccc | 500 | ret |
501 | ||
3ff2e324 | 502 | ASM_GLOBAL ASM_PFX(Gasketclosedir) |
503 | ASM_PFX(Gasketclosedir): | |
2ff79f2e | 504 | pushq %rbp // stack frame is for the debugger |
505 | movq %rsp, %rbp | |
a4902ccc | 506 | |
2ff79f2e | 507 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI |
508 | pushq %rdi | |
509 | ||
510 | movq %rcx, %rdi // Swizzle args | |
3ff2e324 | 511 | |
512 | call ASM_PFX(closedir) | |
a4902ccc | 513 | |
2ff79f2e | 514 | popq %rdi // restore state |
515 | popq %rsi | |
516 | popq %rbp | |
a4902ccc | 517 | ret |
518 | ||
519 | ||
3ff2e324 | 520 | ASM_GLOBAL ASM_PFX(Gasketrename) |
521 | ASM_PFX(Gasketrename): | |
2ff79f2e | 522 | pushq %rbp // stack frame is for the debugger |
523 | movq %rsp, %rbp | |
a4902ccc | 524 | |
2ff79f2e | 525 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI |
526 | pushq %rdi | |
527 | ||
528 | movq %rcx, %rdi // Swizzle args | |
529 | movq %rdx, %rsi | |
3ff2e324 | 530 | |
531 | call ASM_PFX(rename) | |
a4902ccc | 532 | |
2ff79f2e | 533 | popq %rdi // restore state |
534 | popq %rsi | |
535 | popq %rbp | |
a4902ccc | 536 | ret |
537 | ||
538 | ||
3ff2e324 | 539 | ASM_GLOBAL ASM_PFX(Gasketmktime) |
540 | ASM_PFX(Gasketmktime): | |
2ff79f2e | 541 | pushq %rbp // stack frame is for the debugger |
542 | movq %rsp, %rbp | |
543 | ||
544 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
545 | pushq %rdi | |
a4902ccc | 546 | |
2ff79f2e | 547 | movq %rcx, %rdi // Swizzle args |
548 | movq %rdx, %rsi | |
3ff2e324 | 549 | |
550 | call ASM_PFX(mktime) | |
a4902ccc | 551 | |
2ff79f2e | 552 | popq %rdi // restore state |
553 | popq %rsi | |
554 | popq %rbp | |
a4902ccc | 555 | ret |
556 | ||
557 | ||
3ff2e324 | 558 | ASM_GLOBAL ASM_PFX(Gasketfsync) |
559 | ASM_PFX(Gasketfsync): | |
2ff79f2e | 560 | pushq %rbp // stack frame is for the debugger |
561 | movq %rsp, %rbp | |
a4902ccc | 562 | |
2ff79f2e | 563 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI |
564 | pushq %rdi | |
565 | ||
566 | movq %rcx, %rdi // Swizzle args | |
567 | movq %rdx, %rsi | |
3ff2e324 | 568 | |
569 | call ASM_PFX(fsync) | |
a4902ccc | 570 | |
2ff79f2e | 571 | popq %rdi // restore state |
572 | popq %rsi | |
573 | popq %rbp | |
a4902ccc | 574 | ret |
575 | ||
576 | ||
3ff2e324 | 577 | ASM_GLOBAL ASM_PFX(Gasketchmod) |
578 | ASM_PFX(Gasketchmod): | |
2ff79f2e | 579 | pushq %rbp // stack frame is for the debugger |
580 | movq %rsp, %rbp | |
581 | ||
582 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
583 | pushq %rdi | |
a4902ccc | 584 | |
2ff79f2e | 585 | movq %rcx, %rdi // Swizzle args |
586 | movq %rdx, %rsi | |
3ff2e324 | 587 | |
588 | call ASM_PFX(chmod) | |
a4902ccc | 589 | |
2ff79f2e | 590 | popq %rdi // restore state |
591 | popq %rsi | |
592 | popq %rbp | |
a4902ccc | 593 | ret |
594 | ||
595 | ||
3ff2e324 | 596 | ASM_GLOBAL ASM_PFX(Gasketutime) |
597 | ASM_PFX(Gasketutime): | |
2ff79f2e | 598 | pushq %rbp // stack frame is for the debugger |
599 | movq %rsp, %rbp | |
a4902ccc | 600 | |
2ff79f2e | 601 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI |
602 | pushq %rdi | |
3ff2e324 | 603 | |
2ff79f2e | 604 | movq %rcx, %rdi // Swizzle args |
605 | movq %rdx, %rsi | |
a4902ccc | 606 | |
2ff79f2e | 607 | call ASM_PFX(utime) |
608 | ||
609 | popq %rdi // restore state | |
610 | popq %rsi | |
611 | popq %rbp | |
a4902ccc | 612 | ret |
613 | ||
614 | ||
3ff2e324 | 615 | ASM_GLOBAL ASM_PFX(Gaskettcflush) |
616 | ASM_PFX(Gaskettcflush): | |
2ff79f2e | 617 | pushq %rbp // stack frame is for the debugger |
618 | movq %rsp, %rbp | |
a4902ccc | 619 | |
2ff79f2e | 620 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI |
621 | pushq %rdi | |
3ff2e324 | 622 | |
2ff79f2e | 623 | movq %rcx, %rdi // Swizzle args |
624 | movq %rdx, %rsi | |
a4902ccc | 625 | |
2ff79f2e | 626 | call ASM_PFX(tcflush) |
627 | ||
628 | popq %rdi // restore state | |
629 | popq %rsi | |
630 | popq %rbp | |
a4902ccc | 631 | ret |
a4902ccc | 632 | |
633 | ||
3ff2e324 | 634 | ASM_GLOBAL ASM_PFX(GasketUgaCreate) |
635 | ASM_PFX(GasketUgaCreate): | |
2ff79f2e | 636 | pushq %rbp // stack frame is for the debugger |
637 | movq %rsp, %rbp | |
a4902ccc | 638 | |
2ff79f2e | 639 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI |
640 | pushq %rdi | |
3ff2e324 | 641 | |
2ff79f2e | 642 | movq %rcx, %rdi // Swizzle args |
643 | movq %rdx, %rsi | |
a4902ccc | 644 | |
2ff79f2e | 645 | call ASM_PFX(UgaCreate) |
646 | ||
647 | popq %rdi // restore state | |
648 | popq %rsi | |
649 | popq %rbp | |
a4902ccc | 650 | ret |
651 | ||
652 | ||
3ff2e324 | 653 | ASM_GLOBAL ASM_PFX(Gasketperror) |
654 | ASM_PFX(Gasketperror): | |
2ff79f2e | 655 | pushq %rbp // stack frame is for the debugger |
656 | movq %rsp, %rbp | |
a4902ccc | 657 | |
2ff79f2e | 658 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI |
659 | pushq %rdi | |
3ff2e324 | 660 | |
2ff79f2e | 661 | movq %rcx, %rdi // Swizzle args |
662 | movq %rdx, %rsi | |
a4902ccc | 663 | |
2ff79f2e | 664 | call ASM_PFX(perror) |
665 | ||
666 | popq %rdi // restore state | |
667 | popq %rsi | |
668 | popq %rbp | |
a4902ccc | 669 | ret |
670 | ||
671 | ||
3ff2e324 | 672 | ASM_GLOBAL ASM_PFX(Gasketioctl) |
673 | ASM_PFX(Gasketioctl): | |
2ff79f2e | 674 | pushq %rbp // stack frame is for the debugger |
675 | movq %rsp, %rbp | |
676 | ||
677 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
678 | pushq %rdi | |
a4902ccc | 679 | |
2ff79f2e | 680 | movq %rcx, %rdi // Swizzle args |
681 | movq %rdx, %rsi | |
a4902ccc | 682 | movq %r8, %rdx |
683 | ||
3ff2e324 | 684 | call ASM_PFX(UnixIoCtl1) |
2ff79f2e | 685 | |
686 | popq %rdi // restore state | |
687 | popq %rsi | |
688 | popq %rbp | |
a4902ccc | 689 | ret |
690 | ||
691 | ||
3ff2e324 | 692 | ASM_GLOBAL ASM_PFX(Gasketfcntl) |
693 | ASM_PFX(Gasketfcntl): | |
2ff79f2e | 694 | pushq %rbp // stack frame is for the debugger |
695 | movq %rsp, %rbp | |
696 | ||
697 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
698 | pushq %rdi | |
a4902ccc | 699 | |
2ff79f2e | 700 | movq %rcx, %rdi // Swizzle args |
701 | movq %rdx, %rsi | |
a4902ccc | 702 | movq %r8, %rdx |
703 | ||
3ff2e324 | 704 | call ASM_PFX(UnixFcntl1) |
2ff79f2e | 705 | |
706 | popq %rdi // restore state | |
707 | popq %rsi | |
708 | popq %rbp | |
a4902ccc | 709 | ret |
710 | ||
711 | ||
712 | ||
3ff2e324 | 713 | ASM_GLOBAL ASM_PFX(Gasketcfsetispeed) |
714 | ASM_PFX(Gasketcfsetispeed): | |
2ff79f2e | 715 | pushq %rbp // stack frame is for the debugger |
716 | movq %rsp, %rbp | |
a4902ccc | 717 | |
2ff79f2e | 718 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI |
719 | pushq %rdi | |
3ff2e324 | 720 | |
2ff79f2e | 721 | movq %rcx, %rdi // Swizzle args |
722 | movq %rdx, %rsi | |
a4902ccc | 723 | |
2ff79f2e | 724 | call ASM_PFX(cfsetispeed) |
725 | ||
726 | popq %rdi // restore state | |
727 | popq %rsi | |
728 | popq %rbp | |
a4902ccc | 729 | ret |
730 | ||
731 | ||
732 | ||
3ff2e324 | 733 | ASM_GLOBAL ASM_PFX(Gasketcfsetospeed) |
734 | ASM_PFX(Gasketcfsetospeed): | |
2ff79f2e | 735 | pushq %rbp // stack frame is for the debugger |
736 | movq %rsp, %rbp | |
a4902ccc | 737 | |
2ff79f2e | 738 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI |
739 | pushq %rdi | |
3ff2e324 | 740 | |
2ff79f2e | 741 | movq %rcx, %rdi // Swizzle args |
742 | movq %rdx, %rsi | |
a4902ccc | 743 | |
2ff79f2e | 744 | call ASM_PFX(cfsetospeed) |
745 | ||
746 | popq %rdi // restore state | |
747 | popq %rsi | |
748 | popq %rbp | |
a4902ccc | 749 | ret |
750 | ||
751 | ||
3ff2e324 | 752 | ASM_GLOBAL ASM_PFX(Gaskettcgetattr) |
753 | ASM_PFX(Gaskettcgetattr): | |
2ff79f2e | 754 | pushq %rbp // stack frame is for the debugger |
755 | movq %rsp, %rbp | |
756 | ||
757 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
758 | pushq %rdi | |
a4902ccc | 759 | |
2ff79f2e | 760 | movq %rcx, %rdi // Swizzle args |
761 | movq %rdx, %rsi | |
a4902ccc | 762 | movq %r8, %rdx |
763 | ||
3ff2e324 | 764 | call ASM_PFX(tcgetattr) |
2ff79f2e | 765 | |
766 | popq %rdi // restore state | |
767 | popq %rsi | |
768 | popq %rbp | |
a4902ccc | 769 | ret |
770 | ||
771 | ||
3ff2e324 | 772 | ASM_GLOBAL ASM_PFX(Gaskettcsetattr) |
773 | ASM_PFX(Gaskettcsetattr): | |
2ff79f2e | 774 | pushq %rbp // stack frame is for the debugger |
775 | movq %rsp, %rbp | |
776 | ||
777 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
778 | pushq %rdi | |
a4902ccc | 779 | |
2ff79f2e | 780 | movq %rcx, %rdi // Swizzle args |
781 | movq %rdx, %rsi | |
a4902ccc | 782 | movq %r8, %rdx |
783 | ||
3ff2e324 | 784 | call ASM_PFX(tcsetattr) |
2ff79f2e | 785 | |
786 | popq %rdi // restore state | |
787 | popq %rsi | |
788 | popq %rbp | |
a4902ccc | 789 | ret |
790 | ||
791 | ||
3ff2e324 | 792 | ASM_GLOBAL ASM_PFX(GasketUnixPeCoffGetEntryPoint) |
793 | ASM_PFX(GasketUnixPeCoffGetEntryPoint): | |
2ff79f2e | 794 | pushq %rbp // stack frame is for the debugger |
795 | movq %rsp, %rbp | |
a4902ccc | 796 | |
2ff79f2e | 797 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI |
798 | pushq %rdi | |
3ff2e324 | 799 | |
2ff79f2e | 800 | movq %rcx, %rdi // Swizzle args |
801 | movq %rdx, %rsi | |
a4902ccc | 802 | |
2ff79f2e | 803 | call ASM_PFX(SecPeCoffGetEntryPoint) |
804 | ||
805 | popq %rdi // restore state | |
806 | popq %rsi | |
807 | popq %rbp | |
a4902ccc | 808 | ret |
809 | ||
810 | ||
811 | ||
3ff2e324 | 812 | ASM_GLOBAL ASM_PFX(GasketUnixPeCoffRelocateImageExtraAction) |
813 | ASM_PFX(GasketUnixPeCoffRelocateImageExtraAction): | |
2ff79f2e | 814 | pushq %rbp // stack frame is for the debugger |
815 | movq %rsp, %rbp | |
a4902ccc | 816 | |
2ff79f2e | 817 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI |
818 | pushq %rdi | |
3ff2e324 | 819 | |
2ff79f2e | 820 | movq %rcx, %rdi // Swizzle args |
a4902ccc | 821 | |
2ff79f2e | 822 | call ASM_PFX(SecPeCoffRelocateImageExtraAction) |
823 | ||
824 | popq %rdi // restore state | |
825 | popq %rsi | |
826 | popq %rbp | |
a4902ccc | 827 | ret |
828 | ||
829 | ||
3ff2e324 | 830 | ASM_GLOBAL ASM_PFX(GasketUnixPeCoffUnloadImageExtraAction) |
831 | ASM_PFX(GasketUnixPeCoffUnloadImageExtraAction): | |
2ff79f2e | 832 | pushq %rbp // stack frame is for the debugger |
833 | movq %rsp, %rbp | |
a4902ccc | 834 | |
2ff79f2e | 835 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI |
836 | pushq %rdi | |
837 | ||
838 | movq %rcx, %rdi // Swizzle args | |
3ff2e324 | 839 | |
840 | call ASM_PFX(SecPeCoffLoaderUnloadImageExtraAction) | |
2ff79f2e | 841 | |
842 | popq %rdi // restore state | |
843 | popq %rsi | |
844 | popq %rbp | |
845 | ret | |
a4902ccc | 846 | |
2ff79f2e | 847 | |
848 | ||
849 | ||
850 | ||
851 | ASM_GLOBAL ASM_PFX(Gasketsocket) | |
852 | ASM_PFX(Gasketsocket): | |
853 | pushq %rbp // stack frame is for the debugger | |
854 | movq %rsp, %rbp | |
855 | ||
856 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
857 | pushq %rdi | |
858 | ||
859 | movq %rcx, %rdi // Swizzle args | |
860 | movq %rdx, %rsi | |
861 | movq %r8, %rdx | |
862 | ||
863 | call ASM_PFX(socket) | |
864 | ||
865 | ||
866 | popq %rdi // restore state | |
867 | popq %rsi | |
868 | popq %rbp | |
869 | ret | |
870 | ||
871 | ||
872 | ||
873 | ASM_GLOBAL ASM_PFX(Gasketgetifaddrs) | |
874 | ASM_PFX(Gasketgetifaddrs): | |
875 | pushq %rbp // stack frame is for the debugger | |
876 | movq %rsp, %rbp | |
877 | ||
878 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
879 | pushq %rdi | |
880 | ||
881 | movq %rcx, %rdi // Swizzle args | |
882 | ||
883 | call ASM_PFX(getifaddrs) | |
884 | ||
885 | ||
886 | popq %rbp | |
887 | popq %rsi | |
888 | popq %rbp | |
a4902ccc | 889 | ret |
890 | ||
891 | ||
2ff79f2e | 892 | |
893 | ASM_GLOBAL _Gasketfreeifaddrs | |
894 | _Gasketfreeifaddrs: | |
895 | pushq %rbp // stack frame is for the debugger | |
896 | movq %rsp, %rbp | |
897 | ||
898 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
899 | pushq %rdi | |
900 | ||
901 | movq %rcx, %rdi // Swizzle args | |
902 | ||
903 | call _freeifaddrs | |
904 | ||
905 | ||
906 | popq %rdi // restore state | |
907 | popq %rsi | |
908 | popq %rbp | |
909 | ret | |
910 | ||
911 | ||
912 | ||
913 | ||
914 | ||
3ff2e324 | 915 | ASM_GLOBAL ASM_PFX(GasketUgaClose) |
916 | ASM_PFX(GasketUgaClose): | |
2ff79f2e | 917 | pushq %rbp // stack frame is for the debugger |
918 | movq %rsp, %rbp | |
a4902ccc | 919 | |
2ff79f2e | 920 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI |
921 | pushq %rdi | |
3ff2e324 | 922 | |
2ff79f2e | 923 | movq %rcx, %rdi // Swizzle args |
a4902ccc | 924 | |
2ff79f2e | 925 | call ASM_PFX(UgaClose) |
926 | ||
927 | popq %rdi // restore state | |
928 | popq %rsi | |
929 | popq %rbp | |
a4902ccc | 930 | ret |
931 | ||
932 | ||
2ff79f2e | 933 | |
934 | ||
3ff2e324 | 935 | ASM_GLOBAL ASM_PFX(GasketUgaSize) |
936 | ASM_PFX(GasketUgaSize): | |
2ff79f2e | 937 | pushq %rbp // stack frame is for the debugger |
938 | movq %rsp, %rbp | |
939 | ||
940 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
941 | pushq %rdi | |
a4902ccc | 942 | |
2ff79f2e | 943 | movq %rcx, %rdi // Swizzle args |
944 | movq %rdx, %rsi | |
a4902ccc | 945 | movq %r8, %rdx |
946 | ||
3ff2e324 | 947 | call ASM_PFX(UgaSize) |
2ff79f2e | 948 | |
949 | popq %rdi // restore state | |
950 | popq %rsi | |
951 | popq %rbp | |
a4902ccc | 952 | ret |
953 | ||
954 | ||
3ff2e324 | 955 | ASM_GLOBAL ASM_PFX(GasketUgaCheckKey) |
956 | ASM_PFX(GasketUgaCheckKey): | |
2ff79f2e | 957 | pushq %rbp // stack frame is for the debugger |
958 | movq %rsp, %rbp | |
a4902ccc | 959 | |
2ff79f2e | 960 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI |
961 | pushq %rdi | |
3ff2e324 | 962 | |
2ff79f2e | 963 | movq %rcx, %rdi // Swizzle args |
a4902ccc | 964 | |
2ff79f2e | 965 | call ASM_PFX(UgaCheckKey) |
966 | ||
967 | popq %rdi // restore state | |
968 | popq %rsi | |
969 | popq %rbp | |
a4902ccc | 970 | ret |
971 | ||
972 | ||
3ff2e324 | 973 | ASM_GLOBAL ASM_PFX(GasketUgaGetKey) |
974 | ASM_PFX(GasketUgaGetKey): | |
2ff79f2e | 975 | pushq %rbp // stack frame is for the debugger |
976 | movq %rsp, %rbp | |
977 | ||
978 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
979 | pushq %rdi | |
a4902ccc | 980 | |
2ff79f2e | 981 | movq %rcx, %rdi // Swizzle args |
982 | movq %rdx, %rsi | |
3ff2e324 | 983 | |
984 | call ASM_PFX(UgaGetKey) | |
2ff79f2e | 985 | |
986 | popq %rdi // restore state | |
987 | popq %rsi | |
988 | popq %rbp | |
989 | ret | |
a4902ccc | 990 | |
2ff79f2e | 991 | ASM_GLOBAL ASM_PFX(GasketUgaKeySetState) |
992 | ASM_PFX(GasketUgaKeySetState): | |
993 | pushq %rbp // stack frame is for the debugger | |
994 | movq %rsp, %rbp | |
995 | ||
996 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
997 | pushq %rdi | |
998 | ||
999 | movq %rcx, %rdi // Swizzle args | |
1000 | movq %rdx, %rsi | |
1001 | ||
1002 | call ASM_PFX(UgaKeySetState) | |
1003 | ||
1004 | popq %rdi // restore state | |
1005 | popq %rsi | |
1006 | popq %rbp | |
1007 | ret | |
1008 | ||
1009 | ||
1010 | ASM_GLOBAL ASM_PFX(GasketUgaRegisterKeyNotify) | |
1011 | ASM_PFX(GasketUgaRegisterKeyNotify): | |
1012 | pushq %rbp // stack frame is for the debugger | |
1013 | movq %rsp, %rbp | |
1014 | ||
1015 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
1016 | pushq %rdi | |
1017 | ||
1018 | movq %rcx, %rdi // Swizzle args | |
1019 | movq %rdx, %rsi | |
1020 | movq %r8, %rdx | |
1021 | ||
1022 | call ASM_PFX(UgaRegisterKeyNotify) | |
1023 | ||
1024 | popq %rdi // restore state | |
1025 | popq %rsi | |
1026 | popq %rbp | |
a4902ccc | 1027 | ret |
1028 | ||
1029 | ||
2ff79f2e | 1030 | |
1031 | ||
1032 | ||
3ff2e324 | 1033 | ASM_GLOBAL ASM_PFX(GasketUgaBlt) |
1034 | ASM_PFX(GasketUgaBlt): | |
2ff79f2e | 1035 | pushq %rbp // stack frame is for the debugger |
1036 | movq %rsp, %rbp | |
1037 | ||
1038 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
1039 | pushq %rdi | |
07a90790 | 1040 | |
2ff79f2e | 1041 | movq %rcx, %rdi // Swizzle args |
1042 | movq %rdx, %rsi | |
a4902ccc | 1043 | movq %r8, %rdx |
1044 | movq %r9, %rcx | |
1045 | ||
3ff2e324 | 1046 | call ASM_PFX(UgaBlt) |
2ff79f2e | 1047 | |
1048 | popq %rdi // restore state | |
1049 | popq %rsi | |
1050 | popq %rbp | |
1051 | ret | |
3ff2e324 | 1052 | |
2ff79f2e | 1053 | |
1054 | ASM_GLOBAL ASM_PFX(GasketUgaCheckPointer) | |
1055 | ASM_PFX(GasketUgaCheckPointer): | |
1056 | pushq %rbp // stack frame is for the debugger | |
1057 | movq %rsp, %rbp | |
1058 | ||
1059 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
1060 | pushq %rdi | |
1061 | ||
1062 | movq %rcx, %rdi // Swizzle args | |
1063 | ||
1064 | call ASM_PFX(UgaCheckPointer) | |
1065 | ||
1066 | popq %rdi // restore state | |
1067 | popq %rsi | |
1068 | popq %rbp | |
bb111c23 | 1069 | ret |
a4902ccc | 1070 | |
1071 | ||
2ff79f2e | 1072 | ASM_GLOBAL ASM_PFX(GasketUgaGetPointerState) |
1073 | ASM_PFX(GasketUgaGetPointerState): | |
1074 | pushq %rbp // stack frame is for the debugger | |
1075 | movq %rsp, %rbp | |
1076 | ||
1077 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
1078 | pushq %rdi | |
1079 | ||
1080 | movq %rcx, %rdi // Swizzle args | |
1081 | movq %rdx, %rsi | |
1082 | ||
1083 | call ASM_PFX(UgaGetPointerState) | |
1084 | ||
1085 | popq %rdi // restore state | |
1086 | popq %rsi | |
1087 | popq %rbp | |
1088 | ret | |
1089 | ||
1090 | ||
1091 | ASM_GLOBAL ASM_PFX(GasketUnixEnableInterrupt) | |
1092 | ASM_PFX(GasketUnixEnableInterrupt): | |
1093 | pushq %rbp // stack frame is for the debugger | |
1094 | movq %rsp, %rbp | |
1095 | ||
1096 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
1097 | pushq %rdi | |
1098 | ||
1099 | call ASM_PFX(UnixEnableInterrupt) | |
1100 | ||
1101 | popq %rdi // restore state | |
1102 | popq %rsi | |
1103 | popq %rbp | |
1104 | ret | |
1105 | ||
1106 | ASM_GLOBAL ASM_PFX(GasketUnixDisableInterrupt) | |
1107 | ASM_PFX(GasketUnixDisableInterrupt): | |
1108 | pushq %rbp // stack frame is for the debugger | |
1109 | movq %rsp, %rbp | |
1110 | ||
1111 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
1112 | pushq %rdi | |
1113 | ||
1114 | call ASM_PFX(UnixDisableInterrupt) | |
1115 | ||
1116 | popq %rdi // restore state | |
1117 | popq %rsi | |
1118 | popq %rbp | |
1119 | ret | |
1120 | ||
a4902ccc | 1121 | // |
1122 | // UNIX ABI to EFI ABI call | |
1123 | // | |
1124 | // UINTN | |
1125 | // ReverseGasketUint64 ( | |
1126 | // void *Api, | |
2ff79f2e | 1127 | // UINTN Arg1 |
a4902ccc | 1128 | // ); |
3ff2e324 | 1129 | ASM_GLOBAL ASM_PFX(ReverseGasketUint64) |
1130 | ASM_PFX(ReverseGasketUint64): | |
2ff79f2e | 1131 | pushq %rbp // stack frame is for the debugger |
1132 | movq %rsp, %rbp | |
a4902ccc | 1133 | |
2ff79f2e | 1134 | movq %rdi, %rax // Swizzle args |
1135 | movq %rsi, %rcx | |
a4902ccc | 1136 | |
2ff79f2e | 1137 | subq $32, %rsp // 32-byte shadow space |
1138 | call *%rax | |
1139 | addq $32, %rsp | |
3ff2e324 | 1140 | |
2ff79f2e | 1141 | popq %rbp |
1142 | ret | |
1143 | ||
1144 | // | |
1145 | // UNIX ABI to EFI ABI call | |
1146 | // | |
1147 | // UINTN | |
1148 | // ReverseGasketUint64Uint64 ( | |
1149 | // void *Api, | |
1150 | // UINTN Arg1 | |
1151 | // UINTN Arg2 | |
1152 | // ); | |
1153 | ASM_GLOBAL ASM_PFX(ReverseGasketUint64Uint64) | |
1154 | ASM_PFX(ReverseGasketUint64Uint64): | |
1155 | pushq %rbp // stack frame is for the debugger | |
1156 | movq %rsp, %rbp | |
1157 | ||
1158 | movq %rdi, %rax // Swizzle args | |
1159 | movq %rsi, %rcx | |
1160 | ||
1161 | subq $32, %rsp // 32-byte shadow space | |
1162 | call *%rax | |
1163 | addq $32, %rsp | |
1164 | ||
1165 | popq %rbp | |
1166 | ret | |
1167 | ||
07a90790 | 1168 | |
bb111c23 | 1169 | // Sec PPI Callbacks |
1170 | ||
3ff2e324 | 1171 | ASM_GLOBAL ASM_PFX(GasketSecUnixPeiLoadFile) |
1172 | ASM_PFX(GasketSecUnixPeiLoadFile): | |
2ff79f2e | 1173 | pushq %rbp // stack frame is for the debugger |
1174 | movq %rsp, %rbp | |
bb111c23 | 1175 | |
2ff79f2e | 1176 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI |
1177 | pushq %rdi | |
1178 | ||
1179 | movq %rcx, %rdi // Swizzle args | |
1180 | movq %rdx, %rsi | |
bb111c23 | 1181 | movq %r8, %rdx |
1182 | movq %r9, %rcx | |
1183 | ||
3ff2e324 | 1184 | call ASM_PFX(SecUnixPeiLoadFile) |
2ff79f2e | 1185 | |
1186 | popq %rdi // restore state | |
1187 | popq %rsi | |
1188 | popq %rbp | |
bb111c23 | 1189 | ret |
1190 | ||
1191 | ||
1192 | ||
3ff2e324 | 1193 | ASM_GLOBAL ASM_PFX(GasketSecUnixPeiAutoScan) |
1194 | ASM_PFX(GasketSecUnixPeiAutoScan): | |
2ff79f2e | 1195 | pushq %rbp // stack frame is for the debugger |
1196 | movq %rsp, %rbp | |
bb111c23 | 1197 | |
2ff79f2e | 1198 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI |
1199 | pushq %rdi | |
1200 | ||
1201 | movq %rcx, %rdi // Swizzle args | |
1202 | movq %rdx, %rsi | |
bb111c23 | 1203 | movq %r8, %rdx |
1204 | ||
3ff2e324 | 1205 | call ASM_PFX(SecUnixPeiAutoScan) |
2ff79f2e | 1206 | |
1207 | popq %rdi // restore state | |
1208 | popq %rsi | |
1209 | popq %rbp | |
bb111c23 | 1210 | ret |
1211 | ||
3ff2e324 | 1212 | ASM_GLOBAL ASM_PFX(GasketSecUnixUnixThunkAddress) |
1213 | ASM_PFX(GasketSecUnixUnixThunkAddress): | |
2ff79f2e | 1214 | pushq %rbp // stack frame is for the debugger |
1215 | movq %rsp, %rbp | |
1216 | ||
1217 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
1218 | pushq %rdi | |
bb111c23 | 1219 | |
3ff2e324 | 1220 | call ASM_PFX(SecUnixUnixThunkAddress) |
2ff79f2e | 1221 | |
3ff2e324 | 1222 | |
2ff79f2e | 1223 | popq %rdi |
bb111c23 | 1224 | popq %rsi |
2ff79f2e | 1225 | popq %rbp |
bb111c23 | 1226 | ret |
1227 | ||
1228 | ||
3ff2e324 | 1229 | ASM_GLOBAL ASM_PFX(GasketSecPeiReportStatusCode) |
1230 | ASM_PFX(GasketSecPeiReportStatusCode): | |
2ff79f2e | 1231 | pushq %rbp // stack frame is for the debugger |
1232 | movq %rsp, %rbp | |
bb111c23 | 1233 | |
2ff79f2e | 1234 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI |
1235 | pushq %rdi | |
1236 | ||
1237 | movq %rcx, %rdi // Swizzle args | |
1238 | movq %rdx, %rsi | |
bb111c23 | 1239 | movq %r8, %rdx |
1240 | movq %r9, %rcx | |
1241 | movq $0, %r8 // BugBug: This should come from the stack | |
1242 | movq $0, %r9 // But we can cheat since they are optional for bringup.... | |
1243 | ||
3ff2e324 | 1244 | call ASM_PFX(SecPeiReportStatusCode) |
2ff79f2e | 1245 | |
1246 | popq %rdi // restore state | |
1247 | popq %rsi | |
1248 | popq %rbp | |
bb111c23 | 1249 | ret |
1250 | ||
1251 | ||
3ff2e324 | 1252 | ASM_GLOBAL ASM_PFX(GasketSecUnixFdAddress) |
1253 | ASM_PFX(GasketSecUnixFdAddress): | |
2ff79f2e | 1254 | pushq %rbp // stack frame is for the debugger |
1255 | movq %rsp, %rbp | |
bb111c23 | 1256 | |
2ff79f2e | 1257 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI |
1258 | pushq %rdi | |
1259 | ||
1260 | movq %rcx, %rdi // Swizzle args | |
1261 | movq %rdx, %rsi | |
bb111c23 | 1262 | movq %r8, %rdx |
1263 | movq %r9, %rcx | |
1264 | ||
3ff2e324 | 1265 | call ASM_PFX(SecUnixFdAddress) |
1266 | ||
2ff79f2e | 1267 | popq %rdi // restore state |
1268 | popq %rsi | |
1269 | popq %rbp | |
bb111c23 | 1270 | ret |
1271 | ||
1272 | ||
1273 | ||
1274 | ||
3ff2e324 | 1275 | ASM_GLOBAL ASM_PFX(GasketSecTemporaryRamSupport) |
1276 | ASM_PFX(GasketSecTemporaryRamSupport): | |
2ff79f2e | 1277 | pushq %rbp // stack frame is for the debugger |
1278 | movq %rsp, %rbp | |
1279 | ||
1280 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
1281 | pushq %rdi | |
bb111c23 | 1282 | |
2ff79f2e | 1283 | movq %rcx, %rdi // Swizzle args |
1284 | movq %rdx, %rsi | |
bb111c23 | 1285 | movq %r8, %rdx |
1286 | movq %r9, %rcx | |
1287 | ||
3ff2e324 | 1288 | call ASM_PFX(SecTemporaryRamSupport) |
2ff79f2e | 1289 | |
1290 | popq %rdi // restore state | |
1291 | popq %rsi | |
1292 | popq %rbp | |
bb111c23 | 1293 | ret |
1294 | ||
1295 | ||
1296 | ||
1297 | ||
1298 |