]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UnixPkg/Sec/Ia32/Stack.S
UnixPkg: Remove UnixPkg files (It is replaced by EmulatorPkg)
[mirror_edk2.git] / UnixPkg / Sec / Ia32 / Stack.S
diff --git a/UnixPkg/Sec/Ia32/Stack.S b/UnixPkg/Sec/Ia32/Stack.S
deleted file mode 100644 (file)
index ff5a77f..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2008 - 2009, Intel Corporation. All rights reserved.<BR>\r
-# Portions copyright (c) 2008 - 2009, 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
-# Module Name:\r
-#\r
-#   Stack.asm\r
-#\r
-# Abstract:\r
-#\r
-#   Switch the stack from temporary memory to permenent memory.\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# SecSwitchStack (\r
-#   UINT32   TemporaryMemoryBase,\r
-#   UINT32   PermenentMemoryBase\r
-#   );\r
-#------------------------------------------------------------------------------    \r
-\r
-#include <ProcessorBind.h>\r
-\r
-ASM_GLOBAL ASM_PFX(SecSwitchStack)\r
-ASM_PFX(SecSwitchStack):\r
-#\r
-# Save three register: eax, ebx, ecx\r
-#    \r
-    push  %eax\r
-    push  %ebx\r
-    push  %ecx\r
-    push  %edx\r
-    \r
-#\r
-# !!CAUTION!! this function address's is pushed into stack after\r
-# migration of whole temporary memory, so need save it to permenent\r
-# memory at first!\r
-#    \r
-    \r
-    movl  20(%esp), %ebx            # Save the first parameter\r
-    movl  24(%esp), %ecx            # Save the second parameter\r
-    \r
-#\r
-# Save this function's return address into permenent memory at first.\r
-# Then, Fixup the esp point to permenent memory\r
-#\r
-\r
-    movl  %esp, %eax\r
-    subl  %ebx, %eax\r
-    addl  %ecx, %eax\r
-    movl  (%esp), %edx                 # copy pushed register's value to permenent memory\r
-    movl  %edx, (%eax)\r
-    movl  4(%esp), %edx\r
-    movl  %edx, 4(%eax)\r
-    movl  8(%esp), %edx\r
-    movl  %edx, 8(%eax)\r
-    movl  12(%esp), %edx\r
-    movl  %edx, 12(%eax)\r
-    movl  16(%esp), %edx\r
-    movl  %edx, 16(%eax)\r
-    movl  %eax, %esp                   # From now, esp is pointed to permenent memory\r
-\r
-#\r
-# Fixup the ebp point to permenent memory\r
-#\r
-#ifndef __APPLE__\r
-    movl   %ebp, %eax\r
-    subl   %ebx, %eax\r
-    addl   %ecx, %eax\r
-    movl   %eax, %ebp                  # From now, ebp is pointed to permenent memory\r
-    \r
-#\r
-# Fixup callee's ebp point for PeiDispatch\r
-#    \r
-    movl   (%ebp), %eax\r
-    subl   %ebx, %eax\r
-    addl   %ecx, %eax\r
-    movl   %eax, (%ebp)                # From now, Temporary's PPI caller's stack is in permenent memory\r
-#endif    \r
-    \r
-    pop   %edx\r
-    pop   %ecx\r
-    pop   %ebx\r
-    pop   %eax\r
-    ret\r