2 Implementation of SetJump() on IA-32.
4 Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php.
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #include "BaseLibInternals.h"
19 Worker function that checks ASSERT condition for JumpBuffer
21 Checks ASSERT condition for JumpBuffer.
23 If JumpBuffer is NULL, then ASSERT().
24 For IPF CPUs, if JumpBuffer is not aligned on a 16-byte boundary, then ASSERT().
26 @param JumpBuffer A pointer to CPU context buffer.
31 InternalAssertJumpBuffer (
32 IN BASE_LIBRARY_JUMP_BUFFER
*JumpBuffer
36 Saves the current CPU context that can be restored with a call to LongJump()
39 Saves the current CPU context in the buffer specified by JumpBuffer and
40 returns 0. The initial call to SetJump() must always return 0. Subsequent
41 calls to LongJump() cause a non-zero value to be returned by SetJump().
43 If JumpBuffer is NULL, then ASSERT().
44 For IPF CPUs, if JumpBuffer is not aligned on a 16-byte boundary, then ASSERT().
46 @param JumpBuffer A pointer to CPU context buffer.
48 @retval 0 Indicates a return from SetJump().
55 OUT BASE_LIBRARY_JUMP_BUFFER
*JumpBuffer
60 call InternalAssertJumpBuffer