]> git.proxmox.com Git - mirror_edk2.git/blob - ArmPlatformPkg/PrePeiCore/AArch64/ArchPrePeiCore.c
ArmPlatformPkg: Apply uncrustify changes
[mirror_edk2.git] / ArmPlatformPkg / PrePeiCore / AArch64 / ArchPrePeiCore.c
1 /** @file
2 Main file supporting the transition to PEI Core in Normal World for Versatile Express
3
4 Copyright (c) 2012-2013, ARM Limited. All rights reserved.
5
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7
8 **/
9
10 #include <Library/PrintLib.h>
11 #include <Library/SerialPortLib.h>
12
13 #include "PrePeiCore.h"
14
15 VOID
16 PeiCommonExceptionEntry (
17 IN UINT32 Entry,
18 IN UINTN LR
19 )
20 {
21 CHAR8 Buffer[100];
22 UINTN CharCount;
23
24 switch (Entry) {
25 case EXCEPT_AARCH64_SYNCHRONOUS_EXCEPTIONS:
26 CharCount = AsciiSPrint (Buffer, sizeof (Buffer), "Synchronous Exception at 0x%X\n\r", LR);
27 break;
28 case EXCEPT_AARCH64_IRQ:
29 CharCount = AsciiSPrint (Buffer, sizeof (Buffer), "IRQ Exception at 0x%X\n\r", LR);
30 break;
31 case EXCEPT_AARCH64_FIQ:
32 CharCount = AsciiSPrint (Buffer, sizeof (Buffer), "FIQ Exception at 0x%X\n\r", LR);
33 break;
34 case EXCEPT_AARCH64_SERROR:
35 CharCount = AsciiSPrint (Buffer, sizeof (Buffer), "SError/Abort Exception at 0x%X\n\r", LR);
36 break;
37 default:
38 CharCount = AsciiSPrint (Buffer, sizeof (Buffer), "Unknown Exception at 0x%X\n\r", LR);
39 break;
40 }
41
42 SerialPortWrite ((UINT8 *)Buffer, CharCount);
43
44 while (1) {
45 }
46 }