]>
Commit | Line | Data |
---|---|---|
f1baef62 | 1 | /** @file\r |
2 | Switch Stack functions.\r | |
3 | \r | |
35a17154 | 4 | Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r |
9344f092 | 5 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
f1baef62 | 6 | \r |
f1baef62 | 7 | **/\r |
1efcc4ae | 8 | \r |
47fc17d8 | 9 | #include "BaseLibInternals.h"\r |
f1baef62 | 10 | \r |
11 | /**\r | |
12 | Transfers control to a function starting with a new stack.\r | |
13 | \r | |
14 | Transfers control to the function specified by EntryPoint using the\r | |
15 | new stack specified by NewStack and passing in the parameters specified\r | |
16 | by Context1 and Context2. Context1 and Context2 are optional and may\r | |
17 | be NULL. The function EntryPoint must never return.\r | |
18 | Marker will be ignored on IA-32, x64, and EBC.\r | |
19 | IPF CPUs expect one additional parameter of type VOID * that specifies\r | |
20 | the new backing store pointer.\r | |
21 | \r | |
22 | If EntryPoint is NULL, then ASSERT().\r | |
23 | If NewStack is NULL, then ASSERT().\r | |
24 | \r | |
25 | @param EntryPoint A pointer to function to call with the new stack.\r | |
26 | @param Context1 A pointer to the context to pass into the EntryPoint\r | |
27 | function.\r | |
28 | @param Context2 A pointer to the context to pass into the EntryPoint\r | |
29 | function.\r | |
30 | @param NewStack A pointer to the new stack to use for the EntryPoint\r | |
31 | function.\r | |
35a17154 | 32 | @param Marker A VA_LIST marker for the variable argument list.\r |
f1baef62 | 33 | \r |
34 | **/\r | |
35 | VOID\r | |
36 | EFIAPI\r | |
37 | InternalSwitchStack (\r | |
38 | IN SWITCH_STACK_ENTRY_POINT EntryPoint,\r | |
d0e2f823 MK |
39 | IN VOID *Context1 OPTIONAL,\r |
40 | IN VOID *Context2 OPTIONAL,\r | |
f1baef62 | 41 | IN VOID *NewStack,\r |
42 | IN VA_LIST Marker\r | |
43 | )\r | |
44 | \r | |
45 | {\r | |
46 | //\r | |
47 | // This version of this function does not actually change the stack pointer\r | |
48 | // This is to support compilation of CPU types that do not support assemblers\r | |
49 | // such as EBC\r | |
50 | //\r | |
f1baef62 | 51 | EntryPoint (Context1, Context2);\r |
52 | }\r |