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