]>
Commit | Line | Data |
---|---|---|
1bc83266 | 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-2013, ARM Limited. All rights reserved.\r | |
5 | \r | |
6 | SPDX-License-Identifier: BSD-2-Clause-Patent\r | |
7 | \r | |
1bc83266 HL |
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 | |
15 | VOID\r | |
16 | PeiCommonExceptionEntry (\r | |
40b0b23e MK |
17 | IN UINT32 Entry,\r |
18 | IN UINTN LR\r | |
1bc83266 HL |
19 | )\r |
20 | {\r | |
40b0b23e MK |
21 | CHAR8 Buffer[100];\r |
22 | UINTN CharCount;\r | |
1bc83266 HL |
23 | \r |
24 | switch (Entry) {\r | |
40b0b23e MK |
25 | case EXCEPT_AARCH64_SYNCHRONOUS_EXCEPTIONS:\r |
26 | CharCount = AsciiSPrint (Buffer, sizeof (Buffer), "Synchronous Exception at 0x%X\n\r", LR);\r | |
27 | break;\r | |
28 | case EXCEPT_AARCH64_IRQ:\r | |
29 | CharCount = AsciiSPrint (Buffer, sizeof (Buffer), "IRQ Exception at 0x%X\n\r", LR);\r | |
30 | break;\r | |
31 | case EXCEPT_AARCH64_FIQ:\r | |
32 | CharCount = AsciiSPrint (Buffer, sizeof (Buffer), "FIQ Exception at 0x%X\n\r", LR);\r | |
33 | break;\r | |
34 | case EXCEPT_AARCH64_SERROR:\r | |
35 | CharCount = AsciiSPrint (Buffer, sizeof (Buffer), "SError/Abort Exception at 0x%X\n\r", LR);\r | |
36 | break;\r | |
37 | default:\r | |
38 | CharCount = AsciiSPrint (Buffer, sizeof (Buffer), "Unknown Exception at 0x%X\n\r", LR);\r | |
39 | break;\r | |
1bc83266 HL |
40 | }\r |
41 | \r | |
40b0b23e | 42 | SerialPortWrite ((UINT8 *)Buffer, CharCount);\r |
1bc83266 | 43 | \r |
40b0b23e MK |
44 | while (1) {\r |
45 | }\r | |
1bc83266 | 46 | }\r |