]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/BaseLib/Arm/InternalSwitchStack.c
MdePkg: Clean up source files
[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
HT
5 Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
6 This program and the accompanying materials\r
ebd04fc2 7 are licensed and made available under the terms and conditions of the BSD License\r
8 which accompanies this distribution. The full text of the license may be found at\r
35a17154 9 http://opensource.org/licenses/bsd-license.php.\r
ebd04fc2 10\r
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13\r
14**/\r
15\r
16#include "BaseLibInternals.h"\r
17\r
ea6898b9 18/**\r
19 Transfers control to a function starting with a new stack.\r
20\r
21 This internal worker function transfers control to the function\r
35a17154 22 specified by EntryPoint using the new stack specified by NewStack,\r
23 and passes in the parameters specified by Context1 and Context2.\r
ea6898b9 24 Context1 and Context2 are optional and may be NULL.\r
25 The function EntryPoint must never return.\r
26\r
27 @param EntryPoint The pointer to the function to enter.\r
28 @param Context1 The first parameter to pass in.\r
29 @param Context2 The second Parameter to pass in\r
30 @param NewStack The new Location of the stack\r
31\r
32**/\r
7f22d351 33VOID\r
34EFIAPI\r
35InternalSwitchStackAsm (\r
36 IN SWITCH_STACK_ENTRY_POINT EntryPoint,\r
37 IN VOID *Context1, OPTIONAL\r
38 IN VOID *Context2, OPTIONAL\r
39 IN VOID *NewStack\r
40 );\r
41\r
9095d37b 42\r
ebd04fc2 43/**\r
44 Transfers control to a function starting with a new stack.\r
45\r
46 Transfers control to the function specified by EntryPoint using the\r
35a17154 47 new stack specified by NewStack, and passes in the parameters specified\r
ebd04fc2 48 by Context1 and Context2. Context1 and Context2 are optional and may\r
49 be NULL. The function EntryPoint must never return.\r
50 Marker will be ignored on IA-32, x64, and EBC.\r
51 IPF CPUs expect one additional parameter of type VOID * that specifies\r
52 the new backing store pointer.\r
53\r
54 If EntryPoint is NULL, then ASSERT().\r
55 If NewStack is NULL, then ASSERT().\r
56\r
57 @param EntryPoint A pointer to function to call with the new stack.\r
58 @param Context1 A pointer to the context to pass into the EntryPoint\r
59 function.\r
60 @param Context2 A pointer to the context to pass into the EntryPoint\r
61 function.\r
62 @param NewStack A pointer to the new stack to use for the EntryPoint\r
63 function.\r
35a17154 64 @param Marker A VA_LIST marker for the variable argument list.\r
ebd04fc2 65\r
66**/\r
67VOID\r
68EFIAPI\r
69InternalSwitchStack (\r
70 IN SWITCH_STACK_ENTRY_POINT EntryPoint,\r
71 IN VOID *Context1, OPTIONAL\r
72 IN VOID *Context2, OPTIONAL\r
73 IN VOID *NewStack,\r
74 IN VA_LIST Marker\r
75 )\r
76\r
77{\r
ebd04fc2 78 InternalSwitchStackAsm (EntryPoint, Context1, Context2, NewStack);\r
79}\r