]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/BaseLib/Arm/InternalSwitchStack.c
MdePkg: Apply uncrustify changes
[mirror_edk2.git] / MdePkg / Library / BaseLib / Arm / InternalSwitchStack.c
CommitLineData
ebd04fc2 1/** @file\r
2 SwitchStack() function for ARM.\r
3\r
9095d37b 4 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
bb817c56 5 Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
9344f092 6 SPDX-License-Identifier: BSD-2-Clause-Patent\r
ebd04fc2 7\r
8**/\r
9\r
10#include "BaseLibInternals.h"\r
11\r
ea6898b9 12/**\r
13 Transfers control to a function starting with a new stack.\r
14\r
15 This internal worker function transfers control to the function\r
35a17154 16 specified by EntryPoint using the new stack specified by NewStack,\r
17 and passes in the parameters specified by Context1 and Context2.\r
ea6898b9 18 Context1 and Context2 are optional and may be NULL.\r
19 The function EntryPoint must never return.\r
20\r
21 @param EntryPoint The pointer to the function to enter.\r
22 @param Context1 The first parameter to pass in.\r
23 @param Context2 The second Parameter to pass in\r
24 @param NewStack The new Location of the stack\r
25\r
26**/\r
7f22d351 27VOID\r
28EFIAPI\r
29InternalSwitchStackAsm (\r
30 IN SWITCH_STACK_ENTRY_POINT EntryPoint,\r
d0e2f823
MK
31 IN VOID *Context1 OPTIONAL,\r
32 IN VOID *Context2 OPTIONAL,\r
7f22d351 33 IN VOID *NewStack\r
34 );\r
35\r
ebd04fc2 36/**\r
37 Transfers control to a function starting with a new stack.\r
38\r
39 Transfers control to the function specified by EntryPoint using the\r
35a17154 40 new stack specified by NewStack, and passes in the parameters specified\r
ebd04fc2 41 by Context1 and Context2. Context1 and Context2 are optional and may\r
42 be NULL. The function EntryPoint must never return.\r
43 Marker will be ignored on IA-32, x64, and EBC.\r
44 IPF CPUs expect one additional parameter of type VOID * that specifies\r
45 the new backing store pointer.\r
46\r
47 If EntryPoint is NULL, then ASSERT().\r
48 If NewStack is NULL, then ASSERT().\r
49\r
50 @param EntryPoint A pointer to function to call with the new stack.\r
51 @param Context1 A pointer to the context to pass into the EntryPoint\r
52 function.\r
53 @param Context2 A pointer to the context to pass into the EntryPoint\r
54 function.\r
55 @param NewStack A pointer to the new stack to use for the EntryPoint\r
56 function.\r
35a17154 57 @param Marker A VA_LIST marker for the variable argument list.\r
ebd04fc2 58\r
59**/\r
60VOID\r
61EFIAPI\r
62InternalSwitchStack (\r
63 IN SWITCH_STACK_ENTRY_POINT EntryPoint,\r
d0e2f823
MK
64 IN VOID *Context1 OPTIONAL,\r
65 IN VOID *Context2 OPTIONAL,\r
ebd04fc2 66 IN VOID *NewStack,\r
67 IN VA_LIST Marker\r
68 )\r
69\r
70{\r
ebd04fc2 71 InternalSwitchStackAsm (EntryPoint, Context1, Context2, NewStack);\r
72}\r