TianoCore EDK2 master
Loading...
Searching...
No Matches
CpuExceptionCommon.c File Reference

Go to the source code of this file.

Macros

#define MAX_DEBUG_MESSAGE_LENGTH   0x100
 
#define EXCEPTION_KNOWN_NAME_NUM   (sizeof (mExceptionNameStr) / sizeof (CHAR8 *))
 

Functions

CONST CHAR8 * GetExceptionNameStr (IN EFI_EXCEPTION_TYPE ExceptionType)
 
VOID EFIAPI InternalPrintMessage (IN CONST CHAR8 *Format,...)
 
VOID DumpModuleImageInfo (IN UINTN CurrentEip)
 
EFI_STATUS ReadAndVerifyVectorInfo (IN EFI_VECTOR_HANDOFF_INFO *VectorInfo, OUT RESERVED_VECTORS_DATA *ReservedVector, IN UINTN VectorCount)
 

Variables

CONST UINT32 mErrorCodeFlag = 0x20227d00
 
CONST CHAR8 mExceptionReservedStr [] = "Reserved"
 
CONST CHAR8 * mExceptionNameStr []
 

Detailed Description

CPU Exception Handler Library common functions.

Copyright (c) 2012 - 2019, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file CpuExceptionCommon.c.

Macro Definition Documentation

◆ EXCEPTION_KNOWN_NAME_NUM

#define EXCEPTION_KNOWN_NAME_NUM   (sizeof (mExceptionNameStr) / sizeof (CHAR8 *))

Definition at line 58 of file CpuExceptionCommon.c.

◆ MAX_DEBUG_MESSAGE_LENGTH

#define MAX_DEBUG_MESSAGE_LENGTH   0x100

Definition at line 22 of file CpuExceptionCommon.c.

Function Documentation

◆ DumpModuleImageInfo()

VOID DumpModuleImageInfo ( IN UINTN  CurrentEip)

Find and display image base address and return image base and its entry point.

Parameters
CurrentEipCurrent instruction pointer.

Definition at line 117 of file CpuExceptionCommon.c.

◆ GetExceptionNameStr()

CONST CHAR8 * GetExceptionNameStr ( IN EFI_EXCEPTION_TYPE  ExceptionType)

Get ASCII format string exception name by exception type.

Parameters
ExceptionTypeException type.
Returns
ASCII format string exception name.

Definition at line 68 of file CpuExceptionCommon.c.

◆ InternalPrintMessage()

VOID EFIAPI InternalPrintMessage ( IN CONST CHAR8 *  Format,
  ... 
)

Prints a message to the serial port.

Parameters
FormatFormat string for the message to print.
...Variable argument list whose contents are accessed based on the format string specified by Format.

Definition at line 89 of file CpuExceptionCommon.c.

◆ ReadAndVerifyVectorInfo()

EFI_STATUS ReadAndVerifyVectorInfo ( IN EFI_VECTOR_HANDOFF_INFO VectorInfo,
OUT RESERVED_VECTORS_DATA ReservedVector,
IN UINTN  VectorCount 
)

Read and save reserved vector information

Parameters
[in]VectorInfoPointer to reserved vector list.
[out]ReservedVectorPointer to reserved vector data buffer.
[in]VectorCountVector number to be updated.
Returns
EFI_SUCCESS Read and save vector info successfully.
Return values
EFI_INVALID_PARAMETERVectorInfo includes the invalid content if VectorInfo is not NULL.

Definition at line 166 of file CpuExceptionCommon.c.

Variable Documentation

◆ mErrorCodeFlag

CONST UINT32 mErrorCodeFlag = 0x20227d00

Definition at line 17 of file CpuExceptionCommon.c.

◆ mExceptionNameStr

CONST CHAR8* mExceptionNameStr[]

Definition at line 25 of file CpuExceptionCommon.c.

◆ mExceptionReservedStr

CONST CHAR8 mExceptionReservedStr[] = "Reserved"

Definition at line 24 of file CpuExceptionCommon.c.