]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmRealViewEbPkg/SecForPei/Arm/SwitchStack.asm
Remove ArmEbPkg and replace with ArmRealViewEbPkg. Ported ArmRealViewEbPkg to have...
[mirror_edk2.git] / ArmRealViewEbPkg / SecForPei / Arm / SwitchStack.asm
diff --git a/ArmRealViewEbPkg/SecForPei/Arm/SwitchStack.asm b/ArmRealViewEbPkg/SecForPei/Arm/SwitchStack.asm
new file mode 100755 (executable)
index 0000000..10da81d
--- /dev/null
@@ -0,0 +1,38 @@
+;------------------------------------------------------------------------------ \r
+;\r
+; Copyright (c) 2006 - 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
+;------------------------------------------------------------------------------\r
+  \r
+    EXPORT SecSwitchStack\r
+            \r
+    AREA   Switch_Stack, CODE, READONLY\r
+  \r
+;/**\r
+;  This allows the caller to switch the stack and return\r
+;\r
+; @param      StackDelta     Signed amount by which to modify the stack pointer\r
+;\r
+; @return     Nothing. Goes to the Entry Point passing in the new parameters\r
+;\r
+;**/\r
+;VOID\r
+;EFIAPI\r
+;SecSwitchStack (\r
+;  VOID  *StackDelta\r
+;  );\r
+;\r
+SecSwitchStack   \r
+    MOV   R1, SP\r
+    ADD   R1, R0, R1\r
+    MOV   SP, R1\r
+    BX    LR\r
+    END\r