]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPlatformPkg/PrePeiCore/AArch64/ArchPrePeiCore.c
SecurityPkg: TcgSmm: Handle invalid parameter in MOR SMI handler
[mirror_edk2.git] / ArmPlatformPkg / PrePeiCore / AArch64 / ArchPrePeiCore.c
CommitLineData
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
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
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 EXCEPT_AARCH64_SYNCHRONOUS_EXCEPTIONS:\r
32 CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"Synchronous Exception at 0x%X\n\r", LR);\r
33 break;\r
34 case EXCEPT_AARCH64_IRQ:\r
35 CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"IRQ Exception at 0x%X\n\r", LR);\r
36 break;\r
37 case EXCEPT_AARCH64_FIQ:\r
38 CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"FIQ Exception at 0x%X\n\r", LR);\r
39 break;\r
40 case EXCEPT_AARCH64_SERROR:\r
41 CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"SError/Abort Exception at 0x%X\n\r", LR);\r
42 break;\r
43 default:\r
44 CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"Unknown Exception at 0x%X\n\r", LR);\r
45 break;\r
46 }\r
47\r
48 SerialPortWrite ((UINT8 *) Buffer, CharCount);\r
49\r
50 while(1);\r
51}\r
52\r