]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPkg/Library/DefaultExceptionHandlerLib/Arm/DefaultExceptionHandler.c
ARM Packages: Removed trailing spaces
[mirror_edk2.git] / ArmPkg / Library / DefaultExceptionHandlerLib / Arm / DefaultExceptionHandler.c
index 74e2a7602cd4838896413fbc5760c260c126dab0..0be21a6211dcee8edcd3fb9fc4b8ad4d08e139a5 100644 (file)
@@ -3,7 +3,7 @@
 \r
   Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>\r
   Copyright (c) 2012, ARM Ltd. All rights reserved.<BR>\r
-  \r
+\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -42,9 +42,9 @@ GetImageName (
   );\r
 \r
 /**\r
-  Convert the Current Program Status Register (CPSR) to a string. The string is \r
-  a defacto standard in the ARM world. \r
-  \r
+  Convert the Current Program Status Register (CPSR) to a string. The string is\r
+  a defacto standard in the ARM world.\r
+\r
   It is possible to add extra bits by adding them to CpsrChar array.\r
 \r
   @param  Cpsr         ARM CPSR register value\r
@@ -73,7 +73,7 @@ CpsrString (
     { 5,  't' },\r
     { 0,  '?' }\r
   };\r
-  \r
+\r
   Str = ReturnStr;\r
 \r
   for (Index = 0; CpsrChar[Index].BIT != 0; Index++, Str++) {\r
@@ -83,10 +83,10 @@ CpsrString (
       *Str &= ~0x20;\r
     }\r
   }\r
-  \r
+\r
   *Str++ = '_';\r
   *Str = '\0';\r
-  \r
+\r
   switch (Cpsr & 0x1f) {\r
   case 0x10:\r
     ModeStr = "usr";\r
@@ -112,15 +112,15 @@ CpsrString (
   case 0x1f:\r
     ModeStr = "sys";\r
     break;\r
-  \r
+\r
   default:\r
     ModeStr = "???";\r
     break;\r
   }\r
-  \r
+\r
   AsciiStrCat (Str, ModeStr);\r
   return;\r
-}  \r
+}\r
 \r
 CHAR8 *\r
 FaultStatusToString (\r
@@ -164,7 +164,7 @@ STATIC CHAR8 *gExceptionTypeString[] = {
 \r
 /**\r
   This is the default action to take on an unexpected exception\r
-  \r
+\r
   Since this is exception context don't do anything crazy like try to allcoate memory.\r
 \r
   @param  ExceptionType    Type of the exception\r
@@ -198,31 +198,31 @@ DefaultExceptionHandler (
     CHAR8   Buffer[80];\r
     UINT8   *DisAsm;\r
     UINT32  ItBlock;\r
-    \r
+\r
     CpsrString (SystemContext.SystemContextArm->CPSR, CpsrStr);\r
     DEBUG ((EFI_D_ERROR, "%a\n", CpsrStr));\r
-  \r
+\r
     Pdb = GetImageName (SystemContext.SystemContextArm->PC, &ImageBase, &PeCoffSizeOfHeader);\r
     Offset = SystemContext.SystemContextArm->PC - ImageBase;\r
     if (Pdb != NULL) {\r
       DEBUG ((EFI_D_ERROR, "%a\n", Pdb));\r
 \r
       //\r
-      // A PE/COFF image loads its headers into memory so the headers are \r
+      // A PE/COFF image loads its headers into memory so the headers are\r
       // included in the linked addresses. ELF and Mach-O images do not\r
       // include the headers so the first byte of the image is usually\r
       // text (code). If you look at link maps from ELF or Mach-O images\r
       // you need to subtract out the size of the PE/COFF header to get\r
-      // get the offset that matches the link map. \r
+      // get the offset that matches the link map.\r
       //\r
       DEBUG ((EFI_D_ERROR, "loaded at 0x%08x (PE/COFF offset) 0x%x (ELF or Mach-O offset) 0x%x", ImageBase, Offset, Offset - PeCoffSizeOfHeader));\r
-      \r
+\r
       // If we come from an image it is safe to show the instruction. We know it should not fault\r
       DisAsm = (UINT8 *)(UINTN)SystemContext.SystemContextArm->PC;\r
       ItBlock = 0;\r
       DisassembleInstruction (&DisAsm, (SystemContext.SystemContextArm->CPSR & BIT5) == BIT5, TRUE, &ItBlock, Buffer, sizeof (Buffer));\r
       DEBUG ((EFI_D_ERROR, "\n%a", Buffer));\r
-      \r
+\r
       switch (ExceptionType) {\r
       case EXCEPT_ARM_UNDEFINED_INSTRUCTION:\r
       case EXCEPT_ARM_SOFTWARE_INTERRUPT:\r
@@ -231,7 +231,7 @@ DefaultExceptionHandler (
         // advance PC past the faulting instruction\r
         PcAdjust = (UINTN)DisAsm - SystemContext.SystemContextArm->PC;\r
         break;\r
-      \r
+\r
       default:\r
         break;\r
       }\r
@@ -258,11 +258,11 @@ DefaultExceptionHandler (
 \r
   DEBUG ((EFI_D_ERROR, "\n"));\r
   ASSERT (FALSE);\r
-  \r
+\r
   // Clear the error registers that we have already displayed incase some one wants to keep going\r
   SystemContext.SystemContextArm->DFSR = 0;\r
   SystemContext.SystemContextArm->IFSR = 0;\r
 \r
-  // If some one is stepping past the exception handler adjust the PC to point to the next instruction \r
+  // If some one is stepping past the exception handler adjust the PC to point to the next instruction\r
   SystemContext.SystemContextArm->PC += PcAdjust;\r
 }\r