2018-06-27 15:11:33 +02:00
|
|
|
;------------------------------------------------------------------------------
|
2009-08-19 16:02:07 +02:00
|
|
|
;
|
2018-06-27 15:11:33 +02:00
|
|
|
; Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
2010-04-23 18:00:47 +02:00
|
|
|
; Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
2019-04-04 01:06:00 +02:00
|
|
|
; SPDX-License-Identifier: BSD-2-Clause-Patent
|
2009-08-19 16:02:07 +02:00
|
|
|
;
|
|
|
|
;------------------------------------------------------------------------------
|
2018-06-27 15:11:33 +02:00
|
|
|
|
2009-08-19 16:02:07 +02:00
|
|
|
EXPORT InternalSwitchStackAsm
|
2018-06-27 15:11:33 +02:00
|
|
|
|
2009-08-19 16:02:07 +02:00
|
|
|
AREA Switch_Stack, CODE, READONLY
|
2018-06-27 15:11:33 +02:00
|
|
|
|
2009-08-19 16:02:07 +02:00
|
|
|
;/**
|
|
|
|
; This allows the caller to switch the stack and goes to the new entry point
|
|
|
|
;
|
2010-06-25 23:56:02 +02:00
|
|
|
; @param EntryPoint The pointer to the location to enter
|
2009-08-19 16:02:07 +02:00
|
|
|
; @param Context Parameter to pass in
|
|
|
|
; @param Context2 Parameter2 to pass in
|
|
|
|
; @param NewStack New Location of the stack
|
|
|
|
;
|
|
|
|
; @return Nothing. Goes to the Entry Point passing in the new parameters
|
|
|
|
;
|
|
|
|
;**/
|
|
|
|
;VOID
|
|
|
|
;EFIAPI
|
|
|
|
;InternalSwitchStackAsm (
|
|
|
|
; SWITCH_STACK_ENTRY_POINT EntryPoint,
|
|
|
|
; VOID *Context,
|
|
|
|
; VOID *Context2,
|
|
|
|
; VOID *NewStack
|
|
|
|
; );
|
|
|
|
;
|
|
|
|
InternalSwitchStackAsm
|
|
|
|
MOV LR, R0
|
|
|
|
MOV SP, R3
|
|
|
|
MOV R0, R1
|
|
|
|
MOV R1, R2
|
|
|
|
BX LR
|
|
|
|
END
|