]>
Commit | Line | Data |
---|---|---|
1bc83266 HL |
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-2013, ARM Limited. All rights reserved.\r | |
5 | *\r | |
f4dfad05 | 6 | * SPDX-License-Identifier: BSD-2-Clause-Patent\r |
1bc83266 HL |
7 | *\r |
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 | |
17 | IN UINT32 Entry,\r | |
18 | IN UINTN LR\r | |
19 | )\r | |
20 | {\r | |
21 | CHAR8 Buffer[100];\r | |
22 | UINTN CharCount;\r | |
23 | \r | |
24 | switch (Entry) {\r | |
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 | |
40 | }\r | |
41 | \r | |
42 | SerialPortWrite ((UINT8 *) Buffer, CharCount);\r | |
43 | \r | |
44 | while(1);\r | |
45 | }\r | |
46 | \r |