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