|
TianoCore EDK2 master
|
#include <Uefi.h>#include <Library/UefiLib.h>#include <Library/BaseLib.h>#include <Library/DebugLib.h>#include <Library/PeCoffGetEntryPointLib.h>#include <Library/PrintLib.h>#include <Library/ArmDisassemblerLib.h>#include <Library/SerialPortLib.h>#include <Library/UefiBootServicesTableLib.h>#include <Guid/DebugImageInfoTable.h>#include <Protocol/DebugSupport.h>#include <Protocol/LoadedImage.h>Go to the source code of this file.
Macros | |
| #define | MAX_PRINT_CHARS 100 |
Functions | |
| CHAR8 * | GetImageName (IN UINTN FaultAddress, OUT UINTN *ImageBase, OUT UINTN *PeCoffSizeOfHeaders) |
| STATIC VOID | DescribeInstructionOrDataAbort (IN CHAR8 *AbortType, IN UINTN Iss) |
| STATIC VOID | DescribeExceptionSyndrome (IN UINT32 Esr) |
| STATIC CONST CHAR8 * | BaseName (IN CONST CHAR8 *FullName) |
| VOID | DefaultExceptionHandler (IN EFI_EXCEPTION_TYPE ExceptionType, IN OUT EFI_SYSTEM_CONTEXT SystemContext) |
Variables | |
| STATIC CHAR8 * | gExceptionTypeString [] |
| STATIC BOOLEAN | mRecursiveException |
Default exception handler
Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.
Copyright (c) 2011 - 2014, ARM Ltd. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file DefaultExceptionHandler.c.
| #define MAX_PRINT_CHARS 100 |
Definition at line 29 of file DefaultExceptionHandler.c.
Definition at line 162 of file DefaultExceptionHandler.c.
| VOID DefaultExceptionHandler | ( | IN EFI_EXCEPTION_TYPE | ExceptionType, |
| IN OUT EFI_SYSTEM_CONTEXT | SystemContext | ||
| ) |
This is the default action to take on an unexpected exception
Since this is exception context don't do anything crazy like try to allocate memory.
| ExceptionType | Type of the exception |
| SystemContext | Register state at the time of the Exception |
Definition at line 189 of file DefaultExceptionHandler.c.
Definition at line 130 of file DefaultExceptionHandler.c.
Definition at line 49 of file DefaultExceptionHandler.c.
| CHAR8 * GetImageName | ( | IN UINTN | FaultAddress, |
| OUT UINTN * | ImageBase, | ||
| OUT UINTN * | PeCoffSizeOfHeaders | ||
| ) |
Use the EFI Debug Image Table to lookup the FaultAddress and find which PE/COFF image it came from. As long as the PE/COFF image contains a debug directory entry a string can be returned. For ELF and Mach-O images the string points to the Mach-O or ELF image. Microsoft tools contain a pointer to the PDB file that contains the debug information.
| FaultAddress | Address to find PE/COFF image for. |
| ImageBase | Return load address of found image |
| PeCoffSizeOfHeaders | Return the size of the PE/COFF header for the image that was found |
| NULL | FaultAddress not in a loaded PE/COFF image. |
| Path | and file name of PE/COFF image. |
Definition at line 30 of file DefaultExceptionHandlerUefi.c.
| STATIC CHAR8* gExceptionTypeString[] |
Definition at line 31 of file DefaultExceptionHandler.c.
| STATIC BOOLEAN mRecursiveException |
Definition at line 38 of file DefaultExceptionHandler.c.