]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPlatformPkg/PrePeiCore/Arm/ArchPrePeiCore.c
ArmPlatformPkg: Apply uncrustify changes
[mirror_edk2.git] / ArmPlatformPkg / PrePeiCore / Arm / ArchPrePeiCore.c
CommitLineData
a9d7090f 1/** @file\r
5a5440d0
PG
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
5\r
6 SPDX-License-Identifier: BSD-2-Clause-Patent\r
7\r
a9d7090f 8**/\r
9\r
10#include <Library/PrintLib.h>\r
11#include <Library/SerialPortLib.h>\r
12\r
13#include "PrePeiCore.h"\r
14\r
15VOID\r
16PeiCommonExceptionEntry (\r
40b0b23e
MK
17 IN UINT32 Entry,\r
18 IN UINTN LR\r
a9d7090f 19 )\r
20{\r
40b0b23e
MK
21 CHAR8 Buffer[100];\r
22 UINTN CharCount;\r
a9d7090f 23\r
24 switch (Entry) {\r
40b0b23e
MK
25 case 0:\r
26 CharCount = AsciiSPrint (Buffer, sizeof (Buffer), "Reset Exception at 0x%X\n\r", LR);\r
27 break;\r
28 case 1:\r
29 CharCount = AsciiSPrint (Buffer, sizeof (Buffer), "Undefined Exception at 0x%X\n\r", LR);\r
30 break;\r
31 case 2:\r
32 CharCount = AsciiSPrint (Buffer, sizeof (Buffer), "SWI Exception at 0x%X\n\r", LR);\r
33 break;\r
34 case 3:\r
35 CharCount = AsciiSPrint (Buffer, sizeof (Buffer), "PrefetchAbort Exception at 0x%X\n\r", LR);\r
36 break;\r
37 case 4:\r
38 CharCount = AsciiSPrint (Buffer, sizeof (Buffer), "DataAbort Exception at 0x%X\n\r", LR);\r
39 break;\r
40 case 5:\r
41 CharCount = AsciiSPrint (Buffer, sizeof (Buffer), "Reserved Exception at 0x%X\n\r", LR);\r
42 break;\r
43 case 6:\r
44 CharCount = AsciiSPrint (Buffer, sizeof (Buffer), "IRQ Exception at 0x%X\n\r", LR);\r
45 break;\r
46 case 7:\r
47 CharCount = AsciiSPrint (Buffer, sizeof (Buffer), "FIQ Exception at 0x%X\n\r", LR);\r
48 break;\r
49 default:\r
50 CharCount = AsciiSPrint (Buffer, sizeof (Buffer), "Unknown Exception at 0x%X\n\r", LR);\r
51 break;\r
a9d7090f 52 }\r
a9d7090f 53\r
40b0b23e
MK
54 SerialPortWrite ((UINT8 *)Buffer, CharCount);\r
55 while (1) {\r
56 }\r
57}\r