TianoCore EDK2 master
Loading...
Searching...
No Matches
InternalSwitchStack.c
Go to the documentation of this file.
1
9#include "BaseLibInternals.h"
10
12EFIAPI
14 IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer
15 );
16
38VOID
39EFIAPI
42 IN VOID *Context1 OPTIONAL,
43 IN VOID *Context2 OPTIONAL,
44 IN VOID *NewStack,
45 IN VA_LIST Marker
46 )
47
48{
49 BASE_LIBRARY_JUMP_BUFFER JumpBuffer;
50
51 JumpBuffer.RA = (UINTN)EntryPoint;
52 JumpBuffer.SP = (UINTN)NewStack - sizeof (VOID *);
53 JumpBuffer.SP -= sizeof (Context1) + sizeof (Context2);
54 ((VOID **)(UINTN)JumpBuffer.SP)[0] = Context1;
55 ((VOID **)(UINTN)JumpBuffer.SP)[1] = Context2;
56
57 InternalSwitchStackAsm (&JumpBuffer);
58}
UINT64 UINTN
VOID EFIAPI InternalSwitchStackAsm(IN SWITCH_STACK_ENTRY_POINT EntryPoint, IN VOID *Context1 OPTIONAL, IN VOID *Context2 OPTIONAL, IN VOID *NewStack)
VOID EFIAPI InternalSwitchStack(IN SWITCH_STACK_ENTRY_POINT EntryPoint, IN VOID *Context1 OPTIONAL, IN VOID *Context2 OPTIONAL, IN VOID *NewStack, IN VA_LIST Marker)
VOID(EFIAPI * SWITCH_STACK_ENTRY_POINT)(IN VOID *Context1 OPTIONAL, IN VOID *Context2 OPTIONAL)
Definition: BaseLib.h:5019
CHAR8 * VA_LIST
Definition: Base.h:643
#define IN
Definition: Base.h:279