]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseLib/Arm/SwitchStack.asm
MdePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdePkg / Library / BaseLib / Arm / SwitchStack.asm
1 ;------------------------------------------------------------------------------
2 ;
3 ; Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
4 ; Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
5 ; SPDX-License-Identifier: BSD-2-Clause-Patent
6 ;
7 ;------------------------------------------------------------------------------
8
9 EXPORT InternalSwitchStackAsm
10
11 AREA Switch_Stack, CODE, READONLY
12
13 ;/**
14 ; This allows the caller to switch the stack and goes to the new entry point
15 ;
16 ; @param EntryPoint The pointer to the location to enter
17 ; @param Context Parameter to pass in
18 ; @param Context2 Parameter2 to pass in
19 ; @param NewStack New Location of the stack
20 ;
21 ; @return Nothing. Goes to the Entry Point passing in the new parameters
22 ;
23 ;**/
24 ;VOID
25 ;EFIAPI
26 ;InternalSwitchStackAsm (
27 ; SWITCH_STACK_ENTRY_POINT EntryPoint,
28 ; VOID *Context,
29 ; VOID *Context2,
30 ; VOID *NewStack
31 ; );
32 ;
33 InternalSwitchStackAsm
34 MOV LR, R0
35 MOV SP, R3
36 MOV R0, R1
37 MOV R1, R2
38 BX LR
39 END