TianoCore EDK2 master
Loading...
Searching...
No Matches
ArchSec.c
Go to the documentation of this file.
1
10#include "Sec.h"
11
18VOID
20 IN UINT32 Entry,
21 IN UINTN LR
22 )
23{
24 CHAR8 Buffer[100];
25 UINTN CharCount;
26
27 switch (Entry) {
29 CharCount = AsciiSPrint (Buffer, sizeof (Buffer), "Synchronous Exception at 0x%X\n\r", LR);
30 break;
31 case EXCEPT_AARCH64_IRQ:
32 CharCount = AsciiSPrint (Buffer, sizeof (Buffer), "IRQ Exception at 0x%X\n\r", LR);
33 break;
34 case EXCEPT_AARCH64_FIQ:
35 CharCount = AsciiSPrint (Buffer, sizeof (Buffer), "FIQ Exception at 0x%X\n\r", LR);
36 break;
37 case EXCEPT_AARCH64_SERROR:
38 CharCount = AsciiSPrint (Buffer, sizeof (Buffer), "SError/Abort Exception at 0x%X\n\r", LR);
39 break;
40 default:
41 CharCount = AsciiSPrint (Buffer, sizeof (Buffer), "Unknown Exception at 0x%X\n\r", LR);
42 break;
43 }
44
45 SerialPortWrite ((UINT8 *)Buffer, CharCount);
46
47 while (1) {
48 }
49}
VOID PeiCommonExceptionEntry(IN UINT32 Entry, IN UINTN LR)
Definition: ArchSec.c:19
UINT64 UINTN
UINTN EFIAPI SerialPortWrite(IN UINT8 *Buffer, IN UINTN NumberOfBytes)
Definition: SerialPortLib.c:52
UINTN EFIAPI AsciiSPrint(OUT CHAR8 *StartOfBuffer, IN UINTN BufferSize, IN CONST CHAR8 *FormatString,...)
Definition: PrintLib.c:813
#define IN
Definition: Base.h:279
#define EXCEPT_AARCH64_SYNCHRONOUS_EXCEPTIONS
Definition: DebugSupport.h:517