/* If EntryPoint is NULL, then ASSERT(). If NewStack is NULL, then ASSERT(). */
VOID EFIAPI InternalSwitchStack(IN SWITCH_STACK_ENTRY_POINT EntryPoint, IN VOID *Context1 OPTIONAL, IN VOID *Context2 OPTIONAL, IN VOID *NewStack, IN VA_LIST Marker)
/* If EntryPoint is NULL, then ASSERT(). If NewStack is NULL, then ASSERT(). */
VOID EFIAPI InternalSwitchStack(IN SWITCH_STACK_ENTRY_POINT EntryPoint, IN VOID *Context1 OPTIONAL, IN VOID *Context2 OPTIONAL, IN VOID *NewStack, IN VA_LIST Marker)
{
  BASE_LIBRARY_JUMP_BUFFER  JumpBuffer;
  JumpBuffer.RA                      = (UINTN)EntryPoint;
  JumpBuffer.SP                      = (UINTN)NewStack - sizeof (VOID *);
  JumpBuffer.SP                     -= sizeof (Context1) + sizeof (Context2);
  ((VOID **)(UINTN)JumpBuffer.SP)[0] = Context1;
  ((VOID **)(UINTN)JumpBuffer.SP)[1] = Context2;
  InternalSwitchStackAsm (&JumpBuffer);
}