]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPlatformPkg/PrePeiCore/Arm/ArchPrePeiCore.c
ARM Packages: Removed trailing spaces
[mirror_edk2.git] / ArmPlatformPkg / PrePeiCore / Arm / ArchPrePeiCore.c
CommitLineData
a9d7090f 1/** @file\r
2* Main file supporting the transition to PEI Core in Normal World for Versatile Express\r
3*\r
4* Copyright (c) 2012, ARM Limited. All rights reserved.\r
a9d7090f 5*\r
3402aac7
RC
6* This program and the accompanying materials\r
7* are licensed and made available under the terms and conditions of the BSD License\r
8* which accompanies this distribution. The full text of the license may be found at\r
9* http://opensource.org/licenses/bsd-license.php\r
10*\r
11* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
a9d7090f 13*\r
14**/\r
15\r
16#include <Library/PrintLib.h>\r
17#include <Library/SerialPortLib.h>\r
18\r
19#include "PrePeiCore.h"\r
20\r
21VOID\r
22PeiCommonExceptionEntry (\r
23 IN UINT32 Entry,\r
24 IN UINTN LR\r
25 )\r
26{\r
27 CHAR8 Buffer[100];\r
28 UINTN CharCount;\r
29\r
30 switch (Entry) {\r
31 case 0:\r
32 CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"Reset Exception at 0x%X\n\r",LR);\r
33 break;\r
34 case 1:\r
35 CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"Undefined Exception at 0x%X\n\r",LR);\r
36 break;\r
37 case 2:\r
38 CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"SWI Exception at 0x%X\n\r",LR);\r
39 break;\r
40 case 3:\r
41 CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"PrefetchAbort Exception at 0x%X\n\r",LR);\r
42 break;\r
43 case 4:\r
44 CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"DataAbort Exception at 0x%X\n\r",LR);\r
45 break;\r
46 case 5:\r
47 CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"Reserved Exception at 0x%X\n\r",LR);\r
48 break;\r
49 case 6:\r
50 CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"IRQ Exception at 0x%X\n\r",LR);\r
51 break;\r
52 case 7:\r
53 CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"FIQ Exception at 0x%X\n\r",LR);\r
54 break;\r
55 default:\r
56 CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"Unknown Exception at 0x%X\n\r",LR);\r
57 break;\r
58 }\r
59 SerialPortWrite ((UINT8 *) Buffer, CharCount);\r
60 while(1);\r
61}\r
62\r