]>
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 | # | |
2ac288f9 | 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 | // | |
2ac288f9 | 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 | ||
2ac288f9 | 50 | .text |
a4902ccc | 51 | |
52 | ||
3ff2e324 | 53 | ASM_GLOBAL ASM_PFX(Gasketrmdir) |
54 | ASM_PFX(Gasketrmdir): | |
2ac288f9 | 55 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 56 | movq %rsp, %rbp |
57 | ||
2ac288f9 | 58 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI |
59 | pushq %rdi | |
07a90790 | 60 | |
2ff79f2e | 61 | movq %rcx, %rdi // Swizzle args |
07a90790 | 62 | |
2ac288f9 | 63 | movq ASM_PFX(gUnixRmDir)@GOTPCREL(%rip), %rax // Get function name mangled by C |
64 | movq (%rax), %rax | |
65 | call *%rax | |
3ff2e324 | 66 | |
2ff79f2e | 67 | |
2ac288f9 | 68 | popq %rdi // restore state |
69 | popq %rsi | |
70 | popq %rbp | |
71 | ret | |
a4902ccc | 72 | |
07a90790 | 73 | |
3ff2e324 | 74 | ASM_GLOBAL ASM_PFX(Gasketopendir) |
75 | ASM_PFX(Gasketopendir): | |
2ac288f9 | 76 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 77 | movq %rsp, %rbp |
78 | ||
2ac288f9 | 79 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI |
80 | pushq %rdi | |
07a90790 | 81 | |
2ff79f2e | 82 | movq %rcx, %rdi // Swizzle args |
07a90790 | 83 | |
2ac288f9 | 84 | movq ASM_PFX(gUnixOpenDir)@GOTPCREL(%rip), %rax // Get function name mangled by C |
85 | movq (%rax), %rax | |
86 | call *%rax | |
87 | ||
88 | popq %rdi // restore state | |
89 | popq %rsi | |
90 | popq %rbp | |
07a90790 | 91 | ret |
92 | ||
93 | ||
94 | ||
3ff2e324 | 95 | ASM_GLOBAL ASM_PFX(Gasketstat) |
96 | ASM_PFX(Gasketstat): | |
2ac288f9 | 97 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 98 | movq %rsp, %rbp |
99 | ||
2ac288f9 | 100 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI |
101 | pushq %rdi | |
07a90790 | 102 | |
2ff79f2e | 103 | movq %rcx, %rdi // Swizzle args |
104 | movq %rdx, %rsi | |
a4902ccc | 105 | |
2ac288f9 | 106 | movq ASM_PFX(gUnixStat)@GOTPCREL(%rip), %rax // Get function name mangled by C |
107 | movq (%rax), %rax | |
108 | call *%rax | |
109 | ||
3ff2e324 | 110 | |
2ac288f9 | 111 | popq %rdi // restore state |
112 | popq %rsi | |
113 | popq %rbp | |
07a90790 | 114 | ret |
2ac288f9 | 115 | |
116 | ||
3ff2e324 | 117 | ASM_GLOBAL ASM_PFX(Gasketstatfs) |
118 | ASM_PFX(Gasketstatfs): | |
2ac288f9 | 119 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 120 | movq %rsp, %rbp |
121 | ||
2ac288f9 | 122 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI |
123 | pushq %rdi | |
a4902ccc | 124 | |
2ff79f2e | 125 | movq %rcx, %rdi // Swizzle args |
126 | movq %rdx, %rsi | |
a4902ccc | 127 | |
2ac288f9 | 128 | movq ASM_PFX(gUnixStatFs)@GOTPCREL(%rip), %rax // Get function name mangled by C |
129 | movq (%rax), %rax | |
130 | call *%rax | |
131 | ||
132 | popq %rdi // restore state | |
133 | popq %rsi | |
134 | popq %rbp | |
a4902ccc | 135 | ret |
2ac288f9 | 136 | |
3ff2e324 | 137 | ASM_GLOBAL ASM_PFX(Gasketrewinddir) |
138 | ASM_PFX(Gasketrewinddir): | |
2ac288f9 | 139 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 140 | movq %rsp, %rbp |
a4902ccc | 141 | |
2ac288f9 | 142 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI |
143 | pushq %rdi | |
2ff79f2e | 144 | |
145 | movq %rcx, %rdi // Swizzle args | |
07a90790 | 146 | |
2ac288f9 | 147 | movq ASM_PFX(gUnixRewinddir)@GOTPCREL(%rip), %rax // Get function name mangled by C |
148 | movq (%rax), %rax | |
149 | call *%rax | |
150 | ||
151 | popq %rdi // restore state | |
152 | popq %rsi | |
153 | popq %rbp | |
07a90790 | 154 | ret |
2ac288f9 | 155 | |
3ff2e324 | 156 | ASM_GLOBAL ASM_PFX(Gasketreaddir) |
157 | ASM_PFX(Gasketreaddir): | |
2ac288f9 | 158 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 159 | movq %rsp, %rbp |
07a90790 | 160 | |
2ac288f9 | 161 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI |
162 | pushq %rdi | |
2ff79f2e | 163 | |
164 | movq %rcx, %rdi // Swizzle args | |
a4902ccc | 165 | |
2ac288f9 | 166 | movq ASM_PFX(gUnixReaddir)@GOTPCREL(%rip), %rax // Get function name mangled by C |
167 | movq (%rax), %rax | |
168 | call *%rax | |
169 | ||
170 | popq %rdi // restore state | |
171 | popq %rsi | |
172 | popq %rbp | |
a4902ccc | 173 | ret |
2ac288f9 | 174 | |
3ff2e324 | 175 | |
176 | ASM_GLOBAL ASM_PFX(GasketmsSleep) | |
177 | ASM_PFX(GasketmsSleep): | |
2ac288f9 | 178 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 179 | movq %rsp, %rbp |
180 | ||
2ac288f9 | 181 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI |
182 | pushq %rdi | |
07a90790 | 183 | |
2ff79f2e | 184 | movq %rcx, %rdi // Swizzle args |
3ff2e324 | 185 | |
2ac288f9 | 186 | call ASM_PFX(msSleep) |
187 | ||
188 | popq %rdi // restore state | |
189 | popq %rsi | |
190 | popq %rbp | |
07a90790 | 191 | ret |
2ac288f9 | 192 | |
193 | ||
3ff2e324 | 194 | ASM_GLOBAL ASM_PFX(Gasketexit) |
195 | ASM_PFX(Gasketexit): | |
2ff79f2e | 196 | movq %rcx, %rdi // Swizzle args |
2ac288f9 | 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): | |
2ac288f9 | 205 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 206 | movq %rsp, %rbp |
207 | ||
2ac288f9 | 208 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI |
209 | pushq %rdi | |
a4902ccc | 210 | |
2ff79f2e | 211 | movq %rcx, %rdi // Swizzle args |
212 | movq %rdx, %rsi | |
3ff2e324 | 213 | |
2ac288f9 | 214 | call ASM_PFX(SetTimer) |
215 | ||
216 | popq %rdi // restore state | |
217 | popq %rsi | |
218 | popq %rbp | |
a4902ccc | 219 | ret |
220 | ||
2ac288f9 | 221 | |
3ff2e324 | 222 | ASM_GLOBAL ASM_PFX(GasketGetLocalTime) |
223 | ASM_PFX(GasketGetLocalTime): | |
2ac288f9 | 224 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 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 | |
2ac288f9 | 232 | call ASM_PFX(GetLocalTime) |
a4902ccc | 233 | |
2ff79f2e | 234 | popq %rdi // restore state |
235 | popq %rsi | |
2ac288f9 | 236 | popq %rbp |
a4902ccc | 237 | ret |
238 | ||
2ff79f2e | 239 | |
3ff2e324 | 240 | |
241 | ASM_GLOBAL ASM_PFX(Gasketgmtime) | |
242 | ASM_PFX(Gasketgmtime): | |
2ac288f9 | 243 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 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 | |
2ac288f9 | 251 | call ASM_PFX(localtime) |
a4902ccc | 252 | |
2ff79f2e | 253 | popq %rdi // restore state |
254 | popq %rsi | |
2ac288f9 | 255 | popq %rbp |
a4902ccc | 256 | ret |
257 | ||
258 | ||
259 | ||
3ff2e324 | 260 | ASM_GLOBAL ASM_PFX(GasketGetTimeZone) |
261 | ASM_PFX(GasketGetTimeZone): | |
2ac288f9 | 262 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 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 | |
2ac288f9 | 268 | call ASM_PFX(GetTimeZone) |
3ff2e324 | 269 | |
2ff79f2e | 270 | popq %rdi // restore state |
271 | popq %rsi | |
2ac288f9 | 272 | popq %rbp |
a4902ccc | 273 | ret |
274 | ||
2ff79f2e | 275 | |
3ff2e324 | 276 | ASM_GLOBAL ASM_PFX(GasketGetDayLight) |
277 | ASM_PFX(GasketGetDayLight): | |
2ac288f9 | 278 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 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 | |
2ac288f9 | 284 | call ASM_PFX(GetDayLight) |
3ff2e324 | 285 | |
2ff79f2e | 286 | popq %rdi // restore state |
287 | popq %rsi | |
2ac288f9 | 288 | popq %rbp |
a4902ccc | 289 | ret |
290 | ||
291 | ||
3ff2e324 | 292 | ASM_GLOBAL ASM_PFX(Gasketpoll) |
293 | ASM_PFX(Gasketpoll): | |
2ac288f9 | 294 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 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 | ||
2ac288f9 | 304 | call ASM_PFX(poll) |
3ff2e324 | 305 | |
2ff79f2e | 306 | popq %rdi // restore state |
307 | popq %rsi | |
2ac288f9 | 308 | popq %rbp |
a4902ccc | 309 | ret |
310 | ||
311 | ||
312 | ||
3ff2e324 | 313 | ASM_GLOBAL ASM_PFX(Gasketread) |
314 | ASM_PFX(Gasketread): | |
2ac288f9 | 315 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 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 | ||
2ac288f9 | 325 | call ASM_PFX(read) |
3ff2e324 | 326 | |
2ff79f2e | 327 | popq %rdi // restore state |
328 | popq %rsi | |
2ac288f9 | 329 | popq %rbp |
a4902ccc | 330 | ret |
331 | ||
332 | ||
3ff2e324 | 333 | ASM_GLOBAL ASM_PFX(Gasketwrite) |
334 | ASM_PFX(Gasketwrite): | |
2ac288f9 | 335 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 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 | ||
2ac288f9 | 345 | call ASM_PFX(write) |
3ff2e324 | 346 | |
2ff79f2e | 347 | popq %rdi // restore state |
348 | popq %rsi | |
2ac288f9 | 349 | popq %rbp |
a4902ccc | 350 | ret |
351 | ||
352 | ||
3ff2e324 | 353 | ASM_GLOBAL ASM_PFX(Gasketgetenv) |
354 | ASM_PFX(Gasketgetenv): | |
2ac288f9 | 355 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 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 | |
2ac288f9 | 363 | call ASM_PFX(getenv) |
2ff79f2e | 364 | |
365 | popq %rdi // restore state | |
366 | popq %rsi | |
2ac288f9 | 367 | popq %rbp |
a4902ccc | 368 | ret |
369 | ||
370 | ||
3ff2e324 | 371 | ASM_GLOBAL ASM_PFX(Gasketopen) |
372 | ASM_PFX(Gasketopen): | |
2ac288f9 | 373 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 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 | ||
2ac288f9 | 383 | call ASM_PFX(open) |
2ff79f2e | 384 | |
385 | popq %rdi // restore state | |
386 | popq %rsi | |
2ac288f9 | 387 | popq %rbp |
a4902ccc | 388 | ret |
389 | ||
390 | ||
3ff2e324 | 391 | ASM_GLOBAL ASM_PFX(Gasketlseek) |
392 | ASM_PFX(Gasketlseek): | |
2ac288f9 | 393 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 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 | ||
2ac288f9 | 403 | call ASM_PFX(lseek) |
2ff79f2e | 404 | |
405 | popq %rdi // restore state | |
406 | popq %rsi | |
2ac288f9 | 407 | popq %rbp |
a4902ccc | 408 | ret |
409 | ||
410 | ||
3ff2e324 | 411 | ASM_GLOBAL ASM_PFX(Gasketftruncate) |
412 | ASM_PFX(Gasketftruncate): | |
2ac288f9 | 413 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 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 | ||
2ac288f9 | 423 | call ASM_PFX(ftruncate) |
3ff2e324 | 424 | |
2ff79f2e | 425 | popq %rdi // restore state |
426 | popq %rsi | |
2ac288f9 | 427 | popq %rbp |
a4902ccc | 428 | ret |
429 | ||
430 | ||
3ff2e324 | 431 | ASM_GLOBAL ASM_PFX(Gasketclose) |
432 | ASM_PFX(Gasketclose): | |
2ac288f9 | 433 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 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 | |
2ac288f9 | 441 | call ASM_PFX(close) |
2ff79f2e | 442 | |
443 | popq %rdi // restore state | |
444 | popq %rsi | |
2ac288f9 | 445 | popq %rbp |
a4902ccc | 446 | ret |
447 | ||
448 | ||
449 | ||
3ff2e324 | 450 | ASM_GLOBAL ASM_PFX(Gasketmkdir) |
451 | ASM_PFX(Gasketmkdir): | |
2ac288f9 | 452 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 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 | |
2ac288f9 | 461 | call ASM_PFX(mkdir) |
a4902ccc | 462 | |
2ff79f2e | 463 | popq %rdi // restore state |
464 | popq %rsi | |
2ac288f9 | 465 | popq %rbp |
a4902ccc | 466 | ret |
467 | ||
468 | ||
3ff2e324 | 469 | ASM_GLOBAL ASM_PFX(Gasketunlink) |
470 | ASM_PFX(Gasketunlink): | |
2ac288f9 | 471 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 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 | |
2ac288f9 | 479 | call ASM_PFX(unlink) |
2ff79f2e | 480 | |
481 | popq %rdi // restore state | |
482 | popq %rsi | |
2ac288f9 | 483 | popq %rbp |
a4902ccc | 484 | ret |
485 | ||
486 | ||
3ff2e324 | 487 | ASM_GLOBAL ASM_PFX(GasketGetErrno) |
488 | ASM_PFX(GasketGetErrno): | |
2ac288f9 | 489 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 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 | |
2ac288f9 | 495 | call ASM_PFX(GetErrno) |
2ff79f2e | 496 | |
497 | popq %rdi // restore state | |
498 | popq %rsi | |
2ac288f9 | 499 | popq %rbp |
a4902ccc | 500 | ret |
501 | ||
3ff2e324 | 502 | ASM_GLOBAL ASM_PFX(Gasketclosedir) |
503 | ASM_PFX(Gasketclosedir): | |
2ac288f9 | 504 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 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 | |
2ac288f9 | 512 | call ASM_PFX(closedir) |
a4902ccc | 513 | |
2ff79f2e | 514 | popq %rdi // restore state |
515 | popq %rsi | |
2ac288f9 | 516 | popq %rbp |
a4902ccc | 517 | ret |
518 | ||
519 | ||
3ff2e324 | 520 | ASM_GLOBAL ASM_PFX(Gasketrename) |
521 | ASM_PFX(Gasketrename): | |
2ac288f9 | 522 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 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 | |
2ac288f9 | 531 | call ASM_PFX(rename) |
a4902ccc | 532 | |
2ff79f2e | 533 | popq %rdi // restore state |
534 | popq %rsi | |
2ac288f9 | 535 | popq %rbp |
a4902ccc | 536 | ret |
537 | ||
538 | ||
3ff2e324 | 539 | ASM_GLOBAL ASM_PFX(Gasketmktime) |
540 | ASM_PFX(Gasketmktime): | |
2ac288f9 | 541 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 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 | |
2ac288f9 | 550 | call ASM_PFX(mktime) |
a4902ccc | 551 | |
2ff79f2e | 552 | popq %rdi // restore state |
553 | popq %rsi | |
2ac288f9 | 554 | popq %rbp |
a4902ccc | 555 | ret |
556 | ||
557 | ||
3ff2e324 | 558 | ASM_GLOBAL ASM_PFX(Gasketfsync) |
559 | ASM_PFX(Gasketfsync): | |
2ac288f9 | 560 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 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 | |
2ac288f9 | 569 | call ASM_PFX(fsync) |
a4902ccc | 570 | |
2ff79f2e | 571 | popq %rdi // restore state |
572 | popq %rsi | |
2ac288f9 | 573 | popq %rbp |
a4902ccc | 574 | ret |
575 | ||
576 | ||
3ff2e324 | 577 | ASM_GLOBAL ASM_PFX(Gasketchmod) |
578 | ASM_PFX(Gasketchmod): | |
2ac288f9 | 579 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 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 | |
2ac288f9 | 588 | call ASM_PFX(chmod) |
a4902ccc | 589 | |
2ff79f2e | 590 | popq %rdi // restore state |
591 | popq %rsi | |
2ac288f9 | 592 | popq %rbp |
a4902ccc | 593 | ret |
594 | ||
595 | ||
3ff2e324 | 596 | ASM_GLOBAL ASM_PFX(Gasketutime) |
597 | ASM_PFX(Gasketutime): | |
2ac288f9 | 598 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 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 | |
2ac288f9 | 607 | call ASM_PFX(utime) |
2ff79f2e | 608 | |
609 | popq %rdi // restore state | |
610 | popq %rsi | |
2ac288f9 | 611 | popq %rbp |
a4902ccc | 612 | ret |
613 | ||
614 | ||
3ff2e324 | 615 | ASM_GLOBAL ASM_PFX(Gaskettcflush) |
616 | ASM_PFX(Gaskettcflush): | |
2ac288f9 | 617 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 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 | |
2ac288f9 | 626 | call ASM_PFX(tcflush) |
2ff79f2e | 627 | |
628 | popq %rdi // restore state | |
629 | popq %rsi | |
2ac288f9 | 630 | popq %rbp |
a4902ccc | 631 | ret |
a4902ccc | 632 | |
633 | ||
3ff2e324 | 634 | ASM_GLOBAL ASM_PFX(GasketUgaCreate) |
635 | ASM_PFX(GasketUgaCreate): | |
2ac288f9 | 636 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 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 | |
2ac288f9 | 645 | call ASM_PFX(UgaCreate) |
2ff79f2e | 646 | |
647 | popq %rdi // restore state | |
648 | popq %rsi | |
2ac288f9 | 649 | popq %rbp |
a4902ccc | 650 | ret |
651 | ||
652 | ||
3ff2e324 | 653 | ASM_GLOBAL ASM_PFX(Gasketperror) |
654 | ASM_PFX(Gasketperror): | |
2ac288f9 | 655 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 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 | |
2ac288f9 | 664 | call ASM_PFX(perror) |
2ff79f2e | 665 | |
666 | popq %rdi // restore state | |
667 | popq %rsi | |
2ac288f9 | 668 | popq %rbp |
a4902ccc | 669 | ret |
670 | ||
671 | ||
3ff2e324 | 672 | ASM_GLOBAL ASM_PFX(Gasketioctl) |
673 | ASM_PFX(Gasketioctl): | |
2ac288f9 | 674 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 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 | ||
2ac288f9 | 684 | call ASM_PFX(UnixIoCtl1) |
2ff79f2e | 685 | |
686 | popq %rdi // restore state | |
687 | popq %rsi | |
2ac288f9 | 688 | popq %rbp |
a4902ccc | 689 | ret |
690 | ||
691 | ||
3ff2e324 | 692 | ASM_GLOBAL ASM_PFX(Gasketfcntl) |
693 | ASM_PFX(Gasketfcntl): | |
2ac288f9 | 694 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 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 | ||
2ac288f9 | 704 | call ASM_PFX(UnixFcntl1) |
2ff79f2e | 705 | |
706 | popq %rdi // restore state | |
707 | popq %rsi | |
2ac288f9 | 708 | popq %rbp |
a4902ccc | 709 | ret |
710 | ||
711 | ||
712 | ||
3ff2e324 | 713 | ASM_GLOBAL ASM_PFX(Gasketcfsetispeed) |
714 | ASM_PFX(Gasketcfsetispeed): | |
2ac288f9 | 715 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 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 | |
2ac288f9 | 724 | call ASM_PFX(cfsetispeed) |
2ff79f2e | 725 | |
726 | popq %rdi // restore state | |
727 | popq %rsi | |
2ac288f9 | 728 | popq %rbp |
a4902ccc | 729 | ret |
730 | ||
731 | ||
732 | ||
3ff2e324 | 733 | ASM_GLOBAL ASM_PFX(Gasketcfsetospeed) |
734 | ASM_PFX(Gasketcfsetospeed): | |
2ac288f9 | 735 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 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 | |
2ac288f9 | 744 | call ASM_PFX(cfsetospeed) |
2ff79f2e | 745 | |
746 | popq %rdi // restore state | |
747 | popq %rsi | |
2ac288f9 | 748 | popq %rbp |
a4902ccc | 749 | ret |
750 | ||
751 | ||
3ff2e324 | 752 | ASM_GLOBAL ASM_PFX(Gaskettcgetattr) |
753 | ASM_PFX(Gaskettcgetattr): | |
2ac288f9 | 754 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 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 | ||
2ac288f9 | 764 | call ASM_PFX(tcgetattr) |
2ff79f2e | 765 | |
766 | popq %rdi // restore state | |
767 | popq %rsi | |
2ac288f9 | 768 | popq %rbp |
a4902ccc | 769 | ret |
770 | ||
771 | ||
3ff2e324 | 772 | ASM_GLOBAL ASM_PFX(Gaskettcsetattr) |
773 | ASM_PFX(Gaskettcsetattr): | |
2ac288f9 | 774 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 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 | ||
2ac288f9 | 784 | call ASM_PFX(tcsetattr) |
2ff79f2e | 785 | |
786 | popq %rdi // restore state | |
787 | popq %rsi | |
2ac288f9 | 788 | popq %rbp |
a4902ccc | 789 | ret |
790 | ||
791 | ||
3ff2e324 | 792 | ASM_GLOBAL ASM_PFX(GasketUnixPeCoffGetEntryPoint) |
793 | ASM_PFX(GasketUnixPeCoffGetEntryPoint): | |
2ac288f9 | 794 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 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 | |
2ac288f9 | 803 | call ASM_PFX(SecPeCoffGetEntryPoint) |
2ff79f2e | 804 | |
805 | popq %rdi // restore state | |
806 | popq %rsi | |
2ac288f9 | 807 | popq %rbp |
a4902ccc | 808 | ret |
809 | ||
810 | ||
811 | ||
3ff2e324 | 812 | ASM_GLOBAL ASM_PFX(GasketUnixPeCoffRelocateImageExtraAction) |
813 | ASM_PFX(GasketUnixPeCoffRelocateImageExtraAction): | |
2ac288f9 | 814 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 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 | |
2ac288f9 | 822 | call ASM_PFX(SecPeCoffRelocateImageExtraAction) |
2ff79f2e | 823 | |
824 | popq %rdi // restore state | |
825 | popq %rsi | |
2ac288f9 | 826 | popq %rbp |
a4902ccc | 827 | ret |
828 | ||
829 | ||
3ff2e324 | 830 | ASM_GLOBAL ASM_PFX(GasketUnixPeCoffUnloadImageExtraAction) |
831 | ASM_PFX(GasketUnixPeCoffUnloadImageExtraAction): | |
2ac288f9 | 832 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 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 | |
2ac288f9 | 840 | call ASM_PFX(SecPeCoffLoaderUnloadImageExtraAction) |
2ff79f2e | 841 | |
842 | popq %rdi // restore state | |
843 | popq %rsi | |
2ac288f9 | 844 | popq %rbp |
2ff79f2e | 845 | ret |
a4902ccc | 846 | |
2ff79f2e | 847 | |
848 | ||
849 | ||
850 | ||
851 | ASM_GLOBAL ASM_PFX(Gasketsocket) | |
852 | ASM_PFX(Gasketsocket): | |
2ac288f9 | 853 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 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 | |
2ac288f9 | 868 | popq %rbp |
2ff79f2e | 869 | ret |
870 | ||
871 | ||
872 | ||
873 | ASM_GLOBAL ASM_PFX(Gasketgetifaddrs) | |
874 | ASM_PFX(Gasketgetifaddrs): | |
2ac288f9 | 875 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 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 | ||
2ac288f9 | 886 | popq %rbp |
887 | popq %rsi | |
888 | popq %rbp | |
a4902ccc | 889 | ret |
890 | ||
891 | ||
692477d4 | 892 | ASM_GLOBAL ASM_PFX(Gasketfreeifaddrs) |
893 | ASM_PFX(Gasketfreeifaddrs): | |
2ac288f9 | 894 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 895 | movq %rsp, %rbp |
896 | ||
897 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
898 | pushq %rdi | |
899 | ||
900 | movq %rcx, %rdi // Swizzle args | |
901 | ||
692477d4 | 902 | call ASM_PFX(freeifaddrs) |
2ff79f2e | 903 | |
904 | ||
905 | popq %rdi // restore state | |
906 | popq %rsi | |
2ac288f9 | 907 | popq %rbp |
2ff79f2e | 908 | ret |
909 | ||
910 | ||
3ff2e324 | 911 | ASM_GLOBAL ASM_PFX(GasketUgaClose) |
912 | ASM_PFX(GasketUgaClose): | |
2ac288f9 | 913 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 914 | movq %rsp, %rbp |
a4902ccc | 915 | |
2ff79f2e | 916 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI |
917 | pushq %rdi | |
3ff2e324 | 918 | |
2ff79f2e | 919 | movq %rcx, %rdi // Swizzle args |
a4902ccc | 920 | |
2ac288f9 | 921 | call ASM_PFX(UgaClose) |
2ff79f2e | 922 | |
923 | popq %rdi // restore state | |
924 | popq %rsi | |
2ac288f9 | 925 | popq %rbp |
a4902ccc | 926 | ret |
927 | ||
928 | ||
2ff79f2e | 929 | |
930 | ||
3ff2e324 | 931 | ASM_GLOBAL ASM_PFX(GasketUgaSize) |
932 | ASM_PFX(GasketUgaSize): | |
2ac288f9 | 933 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 934 | movq %rsp, %rbp |
935 | ||
936 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
937 | pushq %rdi | |
a4902ccc | 938 | |
2ff79f2e | 939 | movq %rcx, %rdi // Swizzle args |
940 | movq %rdx, %rsi | |
a4902ccc | 941 | movq %r8, %rdx |
942 | ||
2ac288f9 | 943 | call ASM_PFX(UgaSize) |
2ff79f2e | 944 | |
945 | popq %rdi // restore state | |
946 | popq %rsi | |
2ac288f9 | 947 | popq %rbp |
a4902ccc | 948 | ret |
949 | ||
950 | ||
3ff2e324 | 951 | ASM_GLOBAL ASM_PFX(GasketUgaCheckKey) |
952 | ASM_PFX(GasketUgaCheckKey): | |
2ac288f9 | 953 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 954 | movq %rsp, %rbp |
a4902ccc | 955 | |
2ff79f2e | 956 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI |
957 | pushq %rdi | |
3ff2e324 | 958 | |
2ff79f2e | 959 | movq %rcx, %rdi // Swizzle args |
a4902ccc | 960 | |
2ac288f9 | 961 | call ASM_PFX(UgaCheckKey) |
2ff79f2e | 962 | |
963 | popq %rdi // restore state | |
964 | popq %rsi | |
2ac288f9 | 965 | popq %rbp |
a4902ccc | 966 | ret |
967 | ||
968 | ||
3ff2e324 | 969 | ASM_GLOBAL ASM_PFX(GasketUgaGetKey) |
970 | ASM_PFX(GasketUgaGetKey): | |
2ac288f9 | 971 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 972 | movq %rsp, %rbp |
973 | ||
974 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
975 | pushq %rdi | |
a4902ccc | 976 | |
2ff79f2e | 977 | movq %rcx, %rdi // Swizzle args |
978 | movq %rdx, %rsi | |
3ff2e324 | 979 | |
2ac288f9 | 980 | call ASM_PFX(UgaGetKey) |
2ff79f2e | 981 | |
982 | popq %rdi // restore state | |
983 | popq %rsi | |
2ac288f9 | 984 | popq %rbp |
2ff79f2e | 985 | ret |
a4902ccc | 986 | |
2ff79f2e | 987 | ASM_GLOBAL ASM_PFX(GasketUgaKeySetState) |
988 | ASM_PFX(GasketUgaKeySetState): | |
2ac288f9 | 989 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 990 | movq %rsp, %rbp |
991 | ||
992 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
993 | pushq %rdi | |
994 | ||
995 | movq %rcx, %rdi // Swizzle args | |
996 | movq %rdx, %rsi | |
997 | ||
998 | call ASM_PFX(UgaKeySetState) | |
999 | ||
1000 | popq %rdi // restore state | |
1001 | popq %rsi | |
2ac288f9 | 1002 | popq %rbp |
2ff79f2e | 1003 | ret |
1004 | ||
1005 | ||
1006 | ASM_GLOBAL ASM_PFX(GasketUgaRegisterKeyNotify) | |
1007 | ASM_PFX(GasketUgaRegisterKeyNotify): | |
2ac288f9 | 1008 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 1009 | movq %rsp, %rbp |
1010 | ||
1011 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
1012 | pushq %rdi | |
1013 | ||
1014 | movq %rcx, %rdi // Swizzle args | |
1015 | movq %rdx, %rsi | |
1016 | movq %r8, %rdx | |
1017 | ||
1018 | call ASM_PFX(UgaRegisterKeyNotify) | |
1019 | ||
1020 | popq %rdi // restore state | |
1021 | popq %rsi | |
2ac288f9 | 1022 | popq %rbp |
a4902ccc | 1023 | ret |
1024 | ||
1025 | ||
2ff79f2e | 1026 | |
1027 | ||
1028 | ||
3ff2e324 | 1029 | ASM_GLOBAL ASM_PFX(GasketUgaBlt) |
1030 | ASM_PFX(GasketUgaBlt): | |
2ac288f9 | 1031 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 1032 | movq %rsp, %rbp |
1033 | ||
1034 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
1035 | pushq %rdi | |
07a90790 | 1036 | |
2ff79f2e | 1037 | movq %rcx, %rdi // Swizzle args |
1038 | movq %rdx, %rsi | |
a4902ccc | 1039 | movq %r8, %rdx |
1040 | movq %r9, %rcx | |
1041 | ||
2ac288f9 | 1042 | call ASM_PFX(UgaBlt) |
2ff79f2e | 1043 | |
1044 | popq %rdi // restore state | |
1045 | popq %rsi | |
2ac288f9 | 1046 | popq %rbp |
2ff79f2e | 1047 | ret |
3ff2e324 | 1048 | |
2ff79f2e | 1049 | |
1050 | ASM_GLOBAL ASM_PFX(GasketUgaCheckPointer) | |
1051 | ASM_PFX(GasketUgaCheckPointer): | |
2ac288f9 | 1052 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 1053 | movq %rsp, %rbp |
1054 | ||
1055 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
1056 | pushq %rdi | |
1057 | ||
1058 | movq %rcx, %rdi // Swizzle args | |
1059 | ||
1060 | call ASM_PFX(UgaCheckPointer) | |
1061 | ||
1062 | popq %rdi // restore state | |
1063 | popq %rsi | |
2ac288f9 | 1064 | popq %rbp |
bb111c23 | 1065 | ret |
a4902ccc | 1066 | |
1067 | ||
2ff79f2e | 1068 | ASM_GLOBAL ASM_PFX(GasketUgaGetPointerState) |
1069 | ASM_PFX(GasketUgaGetPointerState): | |
2ac288f9 | 1070 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 1071 | movq %rsp, %rbp |
1072 | ||
1073 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
1074 | pushq %rdi | |
1075 | ||
1076 | movq %rcx, %rdi // Swizzle args | |
1077 | movq %rdx, %rsi | |
1078 | ||
1079 | call ASM_PFX(UgaGetPointerState) | |
1080 | ||
1081 | popq %rdi // restore state | |
1082 | popq %rsi | |
2ac288f9 | 1083 | popq %rbp |
2ff79f2e | 1084 | ret |
1085 | ||
1086 | ||
1087 | ASM_GLOBAL ASM_PFX(GasketUnixEnableInterrupt) | |
1088 | ASM_PFX(GasketUnixEnableInterrupt): | |
2ac288f9 | 1089 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 1090 | movq %rsp, %rbp |
1091 | ||
1092 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
1093 | pushq %rdi | |
1094 | ||
1095 | call ASM_PFX(UnixEnableInterrupt) | |
1096 | ||
1097 | popq %rdi // restore state | |
1098 | popq %rsi | |
2ac288f9 | 1099 | popq %rbp |
2ff79f2e | 1100 | ret |
1101 | ||
1102 | ASM_GLOBAL ASM_PFX(GasketUnixDisableInterrupt) | |
1103 | ASM_PFX(GasketUnixDisableInterrupt): | |
2ac288f9 | 1104 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 1105 | movq %rsp, %rbp |
1106 | ||
1107 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
1108 | pushq %rdi | |
1109 | ||
1110 | call ASM_PFX(UnixDisableInterrupt) | |
1111 | ||
1112 | popq %rdi // restore state | |
1113 | popq %rsi | |
2ac288f9 | 1114 | popq %rbp |
2ff79f2e | 1115 | ret |
1116 | ||
a4902ccc | 1117 | // |
1118 | // UNIX ABI to EFI ABI call | |
1119 | // | |
1120 | // UINTN | |
1121 | // ReverseGasketUint64 ( | |
1122 | // void *Api, | |
2ff79f2e | 1123 | // UINTN Arg1 |
a4902ccc | 1124 | // ); |
3ff2e324 | 1125 | ASM_GLOBAL ASM_PFX(ReverseGasketUint64) |
1126 | ASM_PFX(ReverseGasketUint64): | |
2ac288f9 | 1127 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 1128 | movq %rsp, %rbp |
a4902ccc | 1129 | |
2ff79f2e | 1130 | movq %rdi, %rax // Swizzle args |
1131 | movq %rsi, %rcx | |
a4902ccc | 1132 | |
2ff79f2e | 1133 | subq $32, %rsp // 32-byte shadow space |
1134 | call *%rax | |
1135 | addq $32, %rsp | |
3ff2e324 | 1136 | |
2ac288f9 | 1137 | popq %rbp |
2ff79f2e | 1138 | ret |
1139 | ||
1140 | // | |
1141 | // UNIX ABI to EFI ABI call | |
1142 | // | |
1143 | // UINTN | |
1144 | // ReverseGasketUint64Uint64 ( | |
1145 | // void *Api, | |
1146 | // UINTN Arg1 | |
1147 | // UINTN Arg2 | |
1148 | // ); | |
1149 | ASM_GLOBAL ASM_PFX(ReverseGasketUint64Uint64) | |
1150 | ASM_PFX(ReverseGasketUint64Uint64): | |
2ac288f9 | 1151 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 1152 | movq %rsp, %rbp |
1153 | ||
1154 | movq %rdi, %rax // Swizzle args | |
1155 | movq %rsi, %rcx | |
1156 | ||
1157 | subq $32, %rsp // 32-byte shadow space | |
1158 | call *%rax | |
1159 | addq $32, %rsp | |
1160 | ||
2ac288f9 | 1161 | popq %rbp |
2ff79f2e | 1162 | ret |
1163 | ||
07a90790 | 1164 | |
bb111c23 | 1165 | // Sec PPI Callbacks |
1166 | ||
3ff2e324 | 1167 | ASM_GLOBAL ASM_PFX(GasketSecUnixPeiLoadFile) |
1168 | ASM_PFX(GasketSecUnixPeiLoadFile): | |
2ac288f9 | 1169 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 1170 | movq %rsp, %rbp |
bb111c23 | 1171 | |
2ff79f2e | 1172 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI |
1173 | pushq %rdi | |
1174 | ||
1175 | movq %rcx, %rdi // Swizzle args | |
1176 | movq %rdx, %rsi | |
bb111c23 | 1177 | movq %r8, %rdx |
1178 | movq %r9, %rcx | |
1179 | ||
2ac288f9 | 1180 | call ASM_PFX(SecUnixPeiLoadFile) |
2ff79f2e | 1181 | |
1182 | popq %rdi // restore state | |
1183 | popq %rsi | |
1184 | popq %rbp | |
bb111c23 | 1185 | ret |
1186 | ||
1187 | ||
1188 | ||
3ff2e324 | 1189 | ASM_GLOBAL ASM_PFX(GasketSecUnixPeiAutoScan) |
1190 | ASM_PFX(GasketSecUnixPeiAutoScan): | |
2ac288f9 | 1191 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 1192 | movq %rsp, %rbp |
bb111c23 | 1193 | |
2ff79f2e | 1194 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI |
1195 | pushq %rdi | |
1196 | ||
1197 | movq %rcx, %rdi // Swizzle args | |
1198 | movq %rdx, %rsi | |
bb111c23 | 1199 | movq %r8, %rdx |
1200 | ||
2ac288f9 | 1201 | call ASM_PFX(SecUnixPeiAutoScan) |
2ff79f2e | 1202 | |
1203 | popq %rdi // restore state | |
1204 | popq %rsi | |
2ac288f9 | 1205 | popq %rbp |
bb111c23 | 1206 | ret |
1207 | ||
3ff2e324 | 1208 | ASM_GLOBAL ASM_PFX(GasketSecUnixUnixThunkAddress) |
1209 | ASM_PFX(GasketSecUnixUnixThunkAddress): | |
2ac288f9 | 1210 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 1211 | movq %rsp, %rbp |
1212 | ||
1213 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
1214 | pushq %rdi | |
bb111c23 | 1215 | |
2ac288f9 | 1216 | call ASM_PFX(SecUnixUnixThunkAddress) |
2ff79f2e | 1217 | |
3ff2e324 | 1218 | |
2ac288f9 | 1219 | popq %rdi |
1220 | popq %rsi | |
1221 | popq %rbp | |
bb111c23 | 1222 | ret |
1223 | ||
1224 | ||
3ff2e324 | 1225 | ASM_GLOBAL ASM_PFX(GasketSecPeiReportStatusCode) |
1226 | ASM_PFX(GasketSecPeiReportStatusCode): | |
2ac288f9 | 1227 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 1228 | movq %rsp, %rbp |
bb111c23 | 1229 | |
2ff79f2e | 1230 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI |
1231 | pushq %rdi | |
1232 | ||
1233 | movq %rcx, %rdi // Swizzle args | |
1234 | movq %rdx, %rsi | |
bb111c23 | 1235 | movq %r8, %rdx |
1236 | movq %r9, %rcx | |
1237 | movq $0, %r8 // BugBug: This should come from the stack | |
1238 | movq $0, %r9 // But we can cheat since they are optional for bringup.... | |
1239 | ||
2ac288f9 | 1240 | call ASM_PFX(SecPeiReportStatusCode) |
2ff79f2e | 1241 | |
1242 | popq %rdi // restore state | |
1243 | popq %rsi | |
2ac288f9 | 1244 | popq %rbp |
bb111c23 | 1245 | ret |
1246 | ||
1247 | ||
3ff2e324 | 1248 | ASM_GLOBAL ASM_PFX(GasketSecUnixFdAddress) |
1249 | ASM_PFX(GasketSecUnixFdAddress): | |
2ac288f9 | 1250 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 1251 | movq %rsp, %rbp |
bb111c23 | 1252 | |
2ff79f2e | 1253 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI |
1254 | pushq %rdi | |
1255 | ||
1256 | movq %rcx, %rdi // Swizzle args | |
1257 | movq %rdx, %rsi | |
bb111c23 | 1258 | movq %r8, %rdx |
1259 | movq %r9, %rcx | |
1260 | ||
2ac288f9 | 1261 | call ASM_PFX(SecUnixFdAddress) |
3ff2e324 | 1262 | |
2ff79f2e | 1263 | popq %rdi // restore state |
1264 | popq %rsi | |
2ac288f9 | 1265 | popq %rbp |
bb111c23 | 1266 | ret |
1267 | ||
1268 | ||
1269 | ||
1270 | ||
3ff2e324 | 1271 | ASM_GLOBAL ASM_PFX(GasketSecTemporaryRamSupport) |
1272 | ASM_PFX(GasketSecTemporaryRamSupport): | |
2ac288f9 | 1273 | pushq %rbp // stack frame is for the debugger |
2ff79f2e | 1274 | movq %rsp, %rbp |
1275 | ||
1276 | pushq %rsi // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI | |
1277 | pushq %rdi | |
bb111c23 | 1278 | |
2ff79f2e | 1279 | movq %rcx, %rdi // Swizzle args |
1280 | movq %rdx, %rsi | |
bb111c23 | 1281 | movq %r8, %rdx |
1282 | movq %r9, %rcx | |
1283 | ||
2ac288f9 | 1284 | call ASM_PFX(SecTemporaryRamSupport) |
2ff79f2e | 1285 | |
1286 | popq %rdi // restore state | |
1287 | popq %rsi | |
2ac288f9 | 1288 | popq %rbp |
bb111c23 | 1289 | ret |
1290 | ||
1291 | ||
1292 | ||
1293 | ||
1294 |