1 ;------------------------------------------------------------------------------
3 ; Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
4 ; Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
5 ; SPDX-License-Identifier: BSD-2-Clause-Patent
7 ;------------------------------------------------------------------------------
10 EXPORT InternalLongJump
12 AREA BaseLib, CODE, READONLY
15 ; Saves the current CPU context that can be restored with a call to LongJump() and returns 0.;
17 ; Saves the current CPU context in the buffer specified by JumpBuffer and returns 0. The initial
18 ; call to SetJump() must always return 0. Subsequent calls to LongJump() cause a non-zero
19 ; value to be returned by SetJump().
21 ; If JumpBuffer is NULL, then ASSERT().
22 ; For IPF CPUs, if JumpBuffer is not aligned on a 16-byte boundary, then ASSERT().
24 ; @param JumpBuffer A pointer to CPU context buffer.
31 ; IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer // R0
41 ; Restores the CPU context that was saved with SetJump().;
43 ; Restores the CPU context from the buffer specified by JumpBuffer.
44 ; This function never returns to the caller.
45 ; Instead is resumes execution based on the state of JumpBuffer.
47 ; @param JumpBuffer A pointer to CPU context buffer.
48 ; @param Value The value to return when the SetJump() context is restored.
54 ; IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer, // R0
55 ; IN UINTN Value // R1