]> git.proxmox.com Git - mirror_edk2.git/blob - ArmPlatformPkg/PrePeiCore/AArch64/SwitchStack.S
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / ArmPlatformPkg / PrePeiCore / AArch64 / SwitchStack.S
1 #------------------------------------------------------------------------------
2 #
3 # Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
4 # Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
5 # Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR>
6 #
7 # SPDX-License-Identifier: BSD-2-Clause-Patent
8 #
9 #------------------------------------------------------------------------------
10
11 #include <AsmMacroIoLibV8.h>
12
13 #/**
14 # This allows the caller to switch the stack and return
15 #
16 # @param StackDelta Signed amount by which to modify the stack pointer
17 #
18 # @return Nothing. Goes to the Entry Point passing in the new parameters
19 #
20 #**/
21 #VOID
22 #EFIAPI
23 #SecSwitchStack (
24 # VOID *StackDelta
25 # )#
26 #
27 ASM_FUNC(SecSwitchStack)
28 mov x1, sp
29 add x1, x0, x1
30 mov sp, x1
31 ret
32