TianoCore EDK2 master
|
#include "CpuExceptionHandlerTest.h"
Go to the source code of this file.
Functions | |
VOID EFIAPI | AdjustRipForFaultHandler (IN EFI_EXCEPTION_TYPE ExceptionType, IN EFI_SYSTEM_CONTEXT SystemContext) |
VOID EFIAPI | AdjustCpuContextHandler (IN EFI_EXCEPTION_TYPE ExceptionType, IN EFI_SYSTEM_CONTEXT SystemContext) |
UNIT_TEST_STATUS | CompareCpuContext (VOID) |
VOID EFIAPI | CpuStackGuardExceptionHandler (IN EFI_EXCEPTION_TYPE ExceptionType, IN EFI_SYSTEM_CONTEXT SystemContext) |
Variables | |
GENERAL_REGISTER_IA32 | mActualContextInHandler |
GENERAL_REGISTER_IA32 | mActualContextAfterException |
GENERAL_REGISTER_IA32 | mExpectedContextInHandler = { 1, 2, 3, 4, 5, 0 } |
GENERAL_REGISTER_IA32 | mExpectedContextAfterException = { 11, 12, 13, 14, 15, 16 } |
Unit tests of the CpuExceptionHandlerLib.
Copyright (c) 2022, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file ArchExceptionHandlerTest.c.
VOID EFIAPI AdjustCpuContextHandler | ( | IN EFI_EXCEPTION_TYPE | ExceptionType, |
IN EFI_SYSTEM_CONTEXT | SystemContext | ||
) |
Special handler for ConsistencyOfCpuContext test case.
ExceptionType | Exception type. |
SystemContext | Pointer to EFI_SYSTEM_CONTEXT. |
Definition at line 49 of file ArchExceptionHandlerTest.c.
VOID EFIAPI AdjustRipForFaultHandler | ( | IN EFI_EXCEPTION_TYPE | ExceptionType, |
IN EFI_SYSTEM_CONTEXT | SystemContext | ||
) |
Special handler for fault exception. Rip/Eip in SystemContext will be modified to the instruction after the exception instruction.
ExceptionType | Exception type. |
SystemContext | Pointer to EFI_SYSTEM_CONTEXT. |
Definition at line 32 of file ArchExceptionHandlerTest.c.
UNIT_TEST_STATUS CompareCpuContext | ( | VOID | ) |
Compare cpu context in ConsistencyOfCpuContext test case. 1.Compare mActualContextInHandler with mExpectedContextInHandler. 2.Compare mActualContextAfterException with mExpectedContextAfterException.
UNIT_TEST_PASSED | The Unit test has completed and it was successful. |
UNIT_TEST_ERROR_TEST_FAILED | A test case assertion has failed. |
Definition at line 94 of file ArchExceptionHandlerTest.c.
VOID EFIAPI CpuStackGuardExceptionHandler | ( | IN EFI_EXCEPTION_TYPE | ExceptionType, |
IN EFI_SYSTEM_CONTEXT | SystemContext | ||
) |
Special handler for CpuStackGuard test case.
ExceptionType | Exception type. |
SystemContext | Pointer to EFI_SYSTEM_CONTEXT. |
Definition at line 123 of file ArchExceptionHandlerTest.c.
GENERAL_REGISTER_IA32 mActualContextAfterException |
Definition at line 12 of file ArchExceptionHandlerTest.c.
GENERAL_REGISTER_IA32 mActualContextInHandler |
Definition at line 11 of file ArchExceptionHandlerTest.c.
GENERAL_REGISTER_IA32 mExpectedContextAfterException = { 11, 12, 13, 14, 15, 16 } |
Definition at line 20 of file ArchExceptionHandlerTest.c.
GENERAL_REGISTER_IA32 mExpectedContextInHandler = { 1, 2, 3, 4, 5, 0 } |
Definition at line 19 of file ArchExceptionHandlerTest.c.