]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UnixPkg/Sec/Ia32/Gasket.S
UnixPkg: Remove UnixPkg files (It is replaced by EmulatorPkg)
[mirror_edk2.git] / UnixPkg / Sec / Ia32 / Gasket.S
diff --git a/UnixPkg/Sec/Ia32/Gasket.S b/UnixPkg/Sec/Ia32/Gasket.S
deleted file mode 100644 (file)
index 5f762a3..0000000
+++ /dev/null
@@ -1,344 +0,0 @@
-#------------------------------------------------------------------------------\r
-#\r
-# OS X Application requires 16 byte stack alignment. The problem is these\r
-# APIs are exposed to code that does not have this requirement via \r
-# EFI_UNIX_THUNK_PROTOCOL. So these are wrapper functions that make sure\r
-# the stack is aligned. This code should also work if the stack is already\r
-# aligned. Extra stack padding is really the same as local varaibles so \r
-# it gets freed by the leave instruction\r
-#\r
-# I basically used the compiler, added extra 16 bytes to the local stack and\r
-# made sure %esp ended in 0 before the call (16 byte algined)\r
-#\r
-# The EFI_UNIX_THUNK_PROTOCOL member functions call a C API that then calls \r
-# one of these generic assembly routines.  We do it that way to work around \r
-# some magic name changing that happens in C. For example stat() is _stat() \r
-# on Leopard and _stat$INDOE64 on Snow Leopard. That is why we pass stat()\r
-# into one of these gaskets from C code.\r
-#\r
-# Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>\r
-# This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution.  The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-#ifdef __APPLE__\r
-\r
-  .text\r
-\r
-#------------------------------------------------------------------------------\r
-# int GasketVoid (void *api)\r
-#------------------------------------------------------------------------------    \r
-.globl _GasketVoid\r
-_GasketVoid:\r
-  pushl %ebp\r
-  movl  %esp, %ebp\r
-  subl  $34, %esp           # sub extra 0x10 from the stack for the AND\r
-  and   $-16, %esp          # stack needs to end in 0xFFFFFFF0 before call\r
-  movl  8(%ebp), %eax\r
-  movl  %eax, -12(%ebp)\r
-  movl  -12(%ebp), %eax\r
-  call  *%eax\r
-  leave\r
-  ret\r
-\r
-#------------------------------------------------------------------------------\r
-#------------------------------------------------------------------------------\r
-.globl _GasketUintn\r
-_GasketUintn:\r
-  pushl %ebp\r
-  movl  %esp, %ebp\r
-  subl  $50, %esp           # sub extra 0x10 from the stack for the AND\r
-  and   $-16, %esp          # stack needs to end in 0xFFFFFFF0 before call\r
-  movl  8(%ebp), %eax\r
-  movl  %eax, -12(%ebp)\r
-  movl  12(%ebp), %eax\r
-  movl  %eax, (%esp)\r
-  movl  -12(%ebp), %eax\r
-  call  *%eax\r
-  leave\r
-  ret\r
-\r
-#------------------------------------------------------------------------------\r
-#------------------------------------------------------------------------------\r
-.globl _GasketUintnUintn\r
-_GasketUintnUintn:\r
-  pushl %ebp\r
-  movl  %esp, %ebp\r
-  subl  $50, %esp           # sub extra 0x10 from the stack for the AND \r
-  and   $-16, %esp          # stack needs to end in 0xFFFFFFF0 before call\r
-  movl  8(%ebp), %eax\r
-  movl  %eax, -12(%ebp)\r
-  movl  16(%ebp), %eax\r
-  movl  %eax, 4(%esp)\r
-  movl  12(%ebp), %eax\r
-  movl  %eax, (%esp)\r
-  movl  -12(%ebp), %eax\r
-  call  *%eax\r
-  leave\r
-  ret\r
-\r
-#------------------------------------------------------------------------------\r
-#------------------------------------------------------------------------------\r
-.globl _GasketUintnUintnUintn\r
-_GasketUintnUintnUintn:\r
-  pushl %ebp\r
-  movl  %esp, %ebp\r
-  subl  $50, %esp           # sub extra 0x10 from the stack for the AND\r
-  and   $-16, %esp          # stack needs to end in 0xFFFFFFF0 before call\r
-  movl  8(%ebp), %eax\r
-  movl  %eax, -12(%ebp)\r
-  movl  20(%ebp), %eax\r
-  movl  %eax, 8(%esp)\r
-  movl  16(%ebp), %eax\r
-  movl  %eax, 4(%esp)\r
-  movl  12(%ebp), %eax\r
-  movl  %eax, (%esp)\r
-  movl  -12(%ebp), %eax\r
-  call  *%eax\r
-  leave\r
-  ret\r
-\r
-#------------------------------------------------------------------------------\r
-#------------------------------------------------------------------------------\r
-.globl _GasketUintnUintnUintnUintn\r
-_GasketUintnUintnUintnUintn:\r
-  pushl %ebp\r
-  movl  %esp, %ebp\r
-  subl  $50, %esp           # sub extra 0x10 from the stack for the AND\r
-  and   $-16, %esp          # stack needs to end in 0xFFFFFFF0 before call\r
-  movl  8(%ebp), %eax\r
-  movl  %eax, -12(%ebp)\r
-  movl  24(%ebp), %eax\r
-  movl  %eax, 12(%esp)\r
-  movl  20(%ebp), %eax\r
-  movl  %eax, 8(%esp)\r
-  movl  16(%ebp), %eax\r
-  movl  %eax, 4(%esp)\r
-  movl  12(%ebp), %eax\r
-  movl  %eax, (%esp)\r
-  movl  -12(%ebp), %eax\r
-  call  *%eax\r
-  leave\r
-  ret\r
-\r
-#------------------------------------------------------------------------------\r
-#------------------------------------------------------------------------------\r
-.globl _GasketUintnUintnUintnUintnUintn\r
-_GasketUintnUintnUintnUintnUintn:\r
-  pushl %ebp\r
-  movl  %esp, %ebp\r
-  subl  $50, %esp           # sub extra 0x10 from the stack for the AND\r
-  and   $-16, %esp          # stack needs to end in 0xFFFFFFF0 before call\r
-  movl  8(%ebp), %eax\r
-  movl  %eax, -12(%ebp)\r
-  movl  28(%ebp), %eax\r
-  movl  %eax, 16(%esp)\r
-  movl  24(%ebp), %eax\r
-  movl  %eax, 12(%esp)\r
-  movl  20(%ebp), %eax\r
-  movl  %eax, 8(%esp)\r
-  movl  16(%ebp), %eax\r
-  movl  %eax, 4(%esp)\r
-  movl  12(%ebp), %eax\r
-  movl  %eax, (%esp)\r
-  movl  -12(%ebp), %eax\r
-  call  *%eax\r
-  leave\r
-  ret\r
-\r
-#------------------------------------------------------------------------------\r
-#------------------------------------------------------------------------------\r
-.globl _GasketUintn10Args\r
-_GasketUintn10Args:\r
-  pushl %ebp\r
-  movl  %esp, %ebp\r
-  subl  $82, %esp         # sub extra 0x10 from the stack for the AND\r
-  and   $-16, %esp        # stack needs to end in 0xFFFFFFF0 before call\r
-  movl  8(%ebp), %eax     \r
-  movl  %eax, -12(%ebp)\r
-  movl  48(%ebp), %eax\r
-  movl  %eax, 36(%esp)\r
-  movl  44(%ebp), %eax\r
-  movl  %eax, 32(%esp)\r
-  movl  40(%ebp), %eax\r
-  movl  %eax, 28(%esp)\r
-  movl  36(%ebp), %eax\r
-  movl  %eax, 24(%esp)\r
-  movl  32(%ebp), %eax\r
-  movl  %eax, 20(%esp)\r
-  movl  28(%ebp), %eax\r
-  movl  %eax, 16(%esp)\r
-  movl  24(%ebp), %eax\r
-  movl  %eax, 12(%esp)\r
-  movl  20(%ebp), %eax\r
-  movl  %eax, 8(%esp)\r
-  movl  16(%ebp), %eax\r
-  movl  %eax, 4(%esp)\r
-  movl  12(%ebp), %eax\r
-  movl  %eax, (%esp)\r
-  movl  -12(%ebp), %eax\r
-  call  *%eax\r
-  leave\r
-  ret\r
-\r
-\r
-#------------------------------------------------------------------------------\r
-#------------------------------------------------------------------------------\r
-.globl _GasketUint64Uintn\r
-_GasketUint64Uintn:\r
-  pushl %ebp\r
-  movl  %esp, %ebp\r
-  subl  $66, %esp           # sub extra 0x10 from the stack for the AND\r
-  and   $-16, %esp          # stack needs to end in 0xFFFFFFF0 before call\r
-  movl  12(%ebp), %eax\r
-  movl  %eax, -32(%ebp)\r
-  movl  16(%ebp), %eax\r
-  movl  %eax, -28(%ebp)\r
-  movl  8(%ebp), %eax\r
-  movl  %eax, -12(%ebp)\r
-  movl  20(%ebp), %eax\r
-  movl  %eax, 8(%esp)\r
-  movl  -32(%ebp), %eax\r
-  movl  -28(%ebp), %edx\r
-  movl  %eax, (%esp)\r
-  movl  %edx, 4(%esp)\r
-  movl  -12(%ebp), %eax\r
-  call  *%eax\r
-  leave\r
-  ret\r
-\r
-#------------------------------------------------------------------------------\r
-#------------------------------------------------------------------------------\r
-.globl _GasketUintnUint64Uintn\r
-_GasketUintnUint64Uintn:\r
-  pushl %ebp\r
-  movl  %esp, %ebp\r
-  subl  $66, %esp           # sub extra 0x10 from the stack for the AND\r
-  and   $-16, %esp          # stack needs to end in 0xFFFFFFF0 before call\r
-  movl  16(%ebp), %eax\r
-  movl  %eax, -32(%ebp)\r
-  movl  20(%ebp), %eax\r
-  movl  %eax, -28(%ebp)\r
-  movl  8(%ebp), %eax\r
-  movl  %eax, -12(%ebp)\r
-  movl  24(%ebp), %eax\r
-  movl  %eax, 12(%esp)\r
-  movl  -32(%ebp), %eax\r
-  movl  -28(%ebp), %edx\r
-  movl  %eax, 4(%esp)\r
-  movl  %edx, 8(%esp)\r
-  movl  12(%ebp), %eax\r
-  movl  %eax, (%esp)\r
-  movl  -12(%ebp), %eax\r
-  call  *%eax\r
-  leave\r
-  ret\r
-\r
-#------------------------------------------------------------------------------\r
-#------------------------------------------------------------------------------\r
-.globl _GasketUintnUint16\r
-_GasketUintnUint16:\r
-  pushl %ebp\r
-  movl  %esp, %ebp\r
-  subl  $66, %esp           # sub extra 0x10 from the stack for the AND\r
-  and   $-16, %esp          # stack needs to end in 0xFFFFFFF0 before call\r
-  movl  16(%ebp), %eax\r
-  movw  %ax, -28(%ebp)\r
-  movl  8(%ebp), %eax\r
-  movl  %eax, -12(%ebp)\r
-  movzwl  -28(%ebp), %eax\r
-  movl  %eax, 4(%esp)\r
-  movl  12(%ebp), %eax\r
-  movl  %eax, (%esp)\r
-  movl  -12(%ebp), %eax\r
-  call  *%eax\r
-  leave\r
-  ret\r
-  \r
-  \r
-.globl _ReverseGasketUint64\r
-_ReverseGasketUint64:\r
-  pushl  %ebp\r
-  movl  %esp, %ebp\r
-  subl  $40, %esp\r
-  movl  12(%ebp), %eax\r
-  movl  %eax, -16(%ebp)\r
-  movl  16(%ebp), %eax\r
-  movl  %eax, -12(%ebp)\r
-  movl  -16(%ebp), %eax\r
-  movl  -12(%ebp), %edx\r
-  movl  %eax, (%esp)\r
-  movl  %edx, 4(%esp)\r
-  movl  8(%ebp), %eax\r
-  call  *%eax\r
-  leave\r
-  ret\r
-  \r
-  \r
-.globl _ReverseGasketUint64Uint64\r
-_ReverseGasketUint64Uint64:\r
-  pushl   %ebp\r
-  movl    %esp, %ebp\r
-  subl    $56, %esp\r
-  movl    12(%ebp), %eax\r
-  movl    %eax, -32(%ebp)\r
-  movl    16(%ebp), %eax\r
-  movl    %eax, -28(%ebp)\r
-  movl    20(%ebp), %eax\r
-  movl    %eax, -40(%ebp)\r
-  movl    24(%ebp), %eax\r
-  movl    %eax, -36(%ebp)\r
-  movl    8(%ebp), %eax\r
-  movl    %eax, -12(%ebp)\r
-  movl    -40(%ebp), %eax\r
-  movl    -36(%ebp), %edx\r
-  movl    %eax, 8(%esp)\r
-  movl    %edx, 12(%esp)\r
-  movl    -32(%ebp), %eax\r
-  movl    -28(%ebp), %edx\r
-  movl    %eax, (%esp)\r
-  movl    %edx, 4(%esp)\r
-  movl    -12(%ebp), %eax\r
-  call    *%eax\r
-  leave\r
-  ret\r
-\r
-  \r
-// Sec PPI Callbacks\r
-\r
-.globl _GasketSecUnixPeiLoadFile\r
-_GasketSecUnixPeiLoadFile:\r
-  jmp    _SecUnixPeiLoadFile\r
-\r
-\r
-.globl _GasketSecUnixPeiAutoScan\r
-_GasketSecUnixPeiAutoScan:\r
-  jmp    _SecUnixPeiAutoScan\r
-\r
-\r
-.globl _GasketSecUnixUnixThunkAddress\r
-_GasketSecUnixUnixThunkAddress:\r
-  jmp    _SecUnixUnixThunkAddress\r
-\r
-\r
-.globl _GasketSecPeiReportStatusCode\r
-_GasketSecPeiReportStatusCode:\r
-  jmp    _SecPeiReportStatusCode\r
-\r
-\r
-.globl _GasketSecUnixFdAddress\r
-_GasketSecUnixFdAddress:\r
-  jmp    _SecUnixFdAddress\r
-\r
-\r
-.globl _GasketSecTemporaryRamSupport\r
-_GasketSecTemporaryRamSupport:\r
-  jmp    _SecTemporaryRamSupport\r
-  \r
-  #endif\r