summaryrefslogtreecommitdiff
path: root/ArmPkg/Library/DefaultExceptionHandlerLib
diff options
context:
space:
mode:
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2011-09-22 22:53:54 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2011-09-22 22:53:54 +0000
commit11c20f4e06d252feaa65aa5e526686baf015762d (patch)
tree21e5fd65e293cf086cec4ccc73075d585a2ebd50 /ArmPkg/Library/DefaultExceptionHandlerLib
parent5439ccda50acf4f6e2c1cbd256a30ba555da3eda (diff)
downloadedk2-platforms-11c20f4e06d252feaa65aa5e526686baf015762d.tar.xz
Arm Packages: Fixed coding style/Line endings to follow EDK2 coding convention
Arm Packages: Fixed mispelling Arm Packages: Reduced warnings all over the code git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12407 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPkg/Library/DefaultExceptionHandlerLib')
-rw-r--r--ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandler.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandler.c b/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandler.c
index e969dfa763..07e31ea597 100644
--- a/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandler.c
+++ b/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandler.c
@@ -33,8 +33,6 @@ typedef struct {
CHAR8 Char;
} CPSR_CHAR;
-
-
/**
Use the EFI Debug Image Table to lookup the FaultAddress and find which PE/COFF image
@@ -61,7 +59,6 @@ GetImageName (
UINTN Entry;
CHAR8 *Address;
-
DebugTable = gDebugImageTableHeader->EfiDebugImageInfoTable;
if (DebugTable == NULL) {
return NULL;
@@ -102,9 +99,9 @@ CpsrString (
OUT CHAR8 *ReturnStr
)
{
- UINTN Index;
- CHAR8 *Str = ReturnStr;
- CHAR8 *ModeStr;
+ UINTN Index;
+ CHAR8* Str;
+ CHAR8* ModeStr;
CPSR_CHAR CpsrChar[] = {
{ 31, 'n' },
{ 30, 'z' },
@@ -119,6 +116,8 @@ CpsrString (
{ 0, '?' }
};
+ Str = ReturnStr;
+
for (Index = 0; CpsrChar[Index].BIT != 0; Index++, Str++) {
*Str = CpsrChar[Index].Char;
if ((Cpsr & (1 << CpsrChar[Index].BIT)) != 0) {
@@ -194,8 +193,7 @@ FaultStatusToString (
return FaultSource;
}
-
-CHAR8 *gExceptionTypeString[] = {
+STATIC CHAR8 *gExceptionTypeString[] = {
"Reset",
"Undefined OpCode",
"SWI",
@@ -206,7 +204,6 @@ CHAR8 *gExceptionTypeString[] = {
"FIQ"
};
-
/**
This is the default action to take on an unexpected exception
@@ -228,7 +225,7 @@ DefaultExceptionHandler (
BOOLEAN DfsrWrite;
UINT32 PcAdjust = 0;
- DEBUG ((EFI_D_ERROR, "\n%a Exception PC at 0x%08x CPSR 0x%08x ", gExceptionTypeString[ExceptionType], SystemContext.SystemContextArm->PC, SystemContext.SystemContextArm->CPSR));
+ Print(L"\n%a Exception PC at 0x%08x CPSR 0x%08x ", gExceptionTypeString[ExceptionType], SystemContext.SystemContextArm->PC, SystemContext.SystemContextArm->CPSR);
DEBUG_CODE_BEGIN ();
CHAR8 *Pdb;
UINT32 ImageBase;
@@ -249,10 +246,10 @@ DefaultExceptionHandler (
//
// A PE/COFF image loads its headers into memory so the headers are
- // included in the linked addressess. ELF and Mach-O images do not
+ // included in the linked addresses. ELF and Mach-O images do not
// include the headers so the first byte of the image is usually
// text (code). If you look at link maps from ELF or Mach-O images
- // you need to subtact out the size of the PE/COFF header to get
+ // you need to subtract out the size of the PE/COFF header to get
// get the offset that matches the link map.
//
DEBUG ((EFI_D_ERROR, "loaded at 0x%08x (PE/COFF offset) 0x%x (ELF or Mach-O offset) 0x%x", ImageBase, Offset, Offset - PeCoffSizeOfHeader));