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) {
28 case 0:
29 CharCount = AsciiSPrint (Buffer, sizeof (Buffer), "Reset Exception at 0x%X\n\r", LR);
30 break;
31 case 1:
32 CharCount = AsciiSPrint (Buffer, sizeof (Buffer), "Undefined Exception at 0x%X\n\r", LR);
33 break;
34 case 2:
35 CharCount = AsciiSPrint (Buffer, sizeof (Buffer), "SWI Exception at 0x%X\n\r", LR);
36 break;
37 case 3:
38 CharCount = AsciiSPrint (Buffer, sizeof (Buffer), "PrefetchAbort Exception at 0x%X\n\r", LR);
39 break;
40 case 4:
41 CharCount = AsciiSPrint (Buffer, sizeof (Buffer), "DataAbort Exception at 0x%X\n\r", LR);
42 break;
43 case 5:
44 CharCount = AsciiSPrint (Buffer, sizeof (Buffer), "Reserved Exception at 0x%X\n\r", LR);
45 break;
46 case 6:
47 CharCount = AsciiSPrint (Buffer, sizeof (Buffer), "IRQ Exception at 0x%X\n\r", LR);
48 break;
49 case 7:
50 CharCount = AsciiSPrint (Buffer, sizeof (Buffer), "FIQ Exception at 0x%X\n\r", LR);
51 break;
52 default:
53 CharCount = AsciiSPrint (Buffer, sizeof (Buffer), "Unknown Exception at 0x%X\n\r", LR);
54 break;
55 }
56
57 SerialPortWrite ((UINT8 *)Buffer, CharCount);
58 while (1) {
59 }
60}
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