2 SwitchStack() function for ARM.
4 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
5 Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
10 #include "BaseLibInternals.h"
13 Transfers control to a function starting with a new stack.
15 This internal worker function transfers control to the function
16 specified by EntryPoint using the new stack specified by NewStack,
17 and passes in the parameters specified by Context1 and Context2.
18 Context1 and Context2 are optional and may be NULL.
19 The function EntryPoint must never return.
21 @param EntryPoint The pointer to the function to enter.
22 @param Context1 The first parameter to pass in.
23 @param Context2 The second Parameter to pass in
24 @param NewStack The new Location of the stack
29 InternalSwitchStackAsm (
30 IN SWITCH_STACK_ENTRY_POINT EntryPoint
,
31 IN VOID
*Context1
, OPTIONAL
32 IN VOID
*Context2
, OPTIONAL
38 Transfers control to a function starting with a new stack.
40 Transfers control to the function specified by EntryPoint using the
41 new stack specified by NewStack, and passes in the parameters specified
42 by Context1 and Context2. Context1 and Context2 are optional and may
43 be NULL. The function EntryPoint must never return.
44 Marker will be ignored on IA-32, x64, and EBC.
45 IPF CPUs expect one additional parameter of type VOID * that specifies
46 the new backing store pointer.
48 If EntryPoint is NULL, then ASSERT().
49 If NewStack is NULL, then ASSERT().
51 @param EntryPoint A pointer to function to call with the new stack.
52 @param Context1 A pointer to the context to pass into the EntryPoint
54 @param Context2 A pointer to the context to pass into the EntryPoint
56 @param NewStack A pointer to the new stack to use for the EntryPoint
58 @param Marker A VA_LIST marker for the variable argument list.
64 IN SWITCH_STACK_ENTRY_POINT EntryPoint
,
65 IN VOID
*Context1
, OPTIONAL
66 IN VOID
*Context2
, OPTIONAL
72 InternalSwitchStackAsm (EntryPoint
, Context1
, Context2
, NewStack
);