15#include "ExceptionCommon.h"
17CONST CHAR8 mExceptionReservedStr[] =
"Reserved";
18CONST CHAR8 *mExceptionNameStr[] = {
19 "#INT - Interrupt(CSR.ECFG.VS=0)",
20 "#PIL - Page invalid exception for Load option",
21 "#PIS - Page invalid exception for Store operation",
22 "#PIF - Page invalid exception for Fetch operation",
23 "#PME - Page modification exception",
24 "#PNR - Page non-readable exception",
25 "#PNX - Page non-executable exception",
26 "#PPI - Page privilege level illegal exception",
27 "#ADE - Address error exception",
28 "#ALE - Address alignment fault exception",
29 "#BCE - Bound check exception",
30 "#SYS - System call exception",
31 "#BRK - Beeakpoint exception",
32 "#INE - Instruction non-defined exception",
33 "#IPE - Instruction privilege error exception",
34 "#FPD - Floating-point instruction disable exception",
35 "#SXD - 128-bit vector (SIMD instructions) expansion instruction disable exception",
36 "#ASXD - 256-bit vector (Advanced SIMD instructions) expansion instruction disable exception",
37 "#FPE - Floating-Point error exception",
38 "#WPE - WatchPoint Exception for Fetch watchpoint or Memory load/store watchpoint",
39 "#BTD - Binary Translation expansion instruction Disable exception",
40 "#BTE - Binary Translation related exceptions",
41 "#GSPR - Guest Sensitive Privileged Resource exception",
42 "#HVC - HyperVisor Call exception",
43 "#GCXC - Guest CSR Software/Hardware Change exception",
44 "#TBR - TLB refill exception"
47INTN mExceptionKnownNameNum = (
sizeof (mExceptionNameStr) /
sizeof (CHAR8 *));
62 if ((
UINTN)ExceptionType < mExceptionKnownNameNum) {
63 return mExceptionNameStr[ExceptionType];
65 return mExceptionReservedStr;
84 CHAR8 Buffer[MAX_DEBUG_MESSAGE_LENGTH];
123 Status = PeCoffLoaderGetEntryPoint ((VOID *)Pe32Data, &EntryPoint);
124 if (EFI_ERROR (Status)) {
129 PdbPointer = PeCoffLoaderGetPdbPointer ((VOID *)Pe32Data);
130 if (PdbPointer !=
NULL) {
137 " (ImageBase=%016lp, EntryPoint=%016p) !!!!\n",
RETURN_STATUS EFIAPI SerialPortInitialize(VOID)
UINTN EFIAPI SerialPortWrite(IN UINT8 *Buffer, IN UINTN NumberOfBytes)
UINTN EFIAPI AsciiStrLen(IN CONST CHAR8 *String)
VOID EFIAPI CpuDeadLoop(VOID)
VOID DumpModuleImageInfo(IN UINTN CurrentEip)
VOID DumpImageAndCpuContent(IN EFI_EXCEPTION_TYPE ExceptionType, IN EFI_SYSTEM_CONTEXT SystemContext)
STATIC CONST CHAR8 * GetExceptionNameStr(IN EFI_EXCEPTION_TYPE ExceptionType)
STATIC VOID EFIAPI InternalPrintMessage(IN CONST CHAR8 *Format,...)
VOID DefaultExceptionHandler(IN EFI_EXCEPTION_TYPE ExceptionType, IN OUT EFI_SYSTEM_CONTEXT SystemContext)
UINTN EFIAPI AsciiVSPrint(OUT CHAR8 *StartOfBuffer, IN UINTN BufferSize, IN CONST CHAR8 *FormatString, IN VA_LIST Marker)
#define VA_START(Marker, Parameter)
UINTN EFIAPI PeCoffSearchImageBase(IN UINTN Address)