]>
Commit | Line | Data |
---|---|---|
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 | 27 | VOID\r |
28 | EFIAPI\r | |
29 | InternalSwitchStackAsm (\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 | |
9095d37b | 36 | \r |
ebd04fc2 | 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 | |
35a17154 | 41 | new stack specified by NewStack, and passes in the parameters specified\r |
ebd04fc2 | 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 | |
35a17154 | 58 | @param Marker A VA_LIST marker for the variable argument list.\r |
ebd04fc2 | 59 | \r |
60 | **/\r | |
61 | VOID\r | |
62 | EFIAPI\r | |
63 | InternalSwitchStack (\r | |
64 | IN SWITCH_STACK_ENTRY_POINT EntryPoint,\r | |
d0e2f823 MK |
65 | IN VOID *Context1 OPTIONAL,\r |
66 | IN VOID *Context2 OPTIONAL,\r | |
ebd04fc2 | 67 | IN VOID *NewStack,\r |
68 | IN VA_LIST Marker\r | |
69 | )\r | |
70 | \r | |
71 | {\r | |
ebd04fc2 | 72 | InternalSwitchStackAsm (EntryPoint, Context1, Context2, NewStack);\r |
73 | }\r |