MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / ExceptionHandler

Function ExceptionHandler

CloverEFI/CpuDxe/Cpu.c:1045–1089  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1043#endif
1044
1045VOID
1046EFIAPI
1047ExceptionHandler (
1048 IN EFI_EXCEPTION_TYPE InterruptType,
1049 IN EFI_SYSTEM_CONTEXT SystemContext
1050 )
1051{
1052#if CPU_EXCEPTION_VGA_SWITCH
1053 UINT16 VideoMode;
1054#endif
1055
1056#if CPU_EXCEPTION_DEBUG_OUTPUT
1057 DumpExceptionDataDebugOut (InterruptType, SystemContext);
1058#endif
1059
1060#if CPU_EXCEPTION_VGA_SWITCH
1061 //
1062 // Switch to text mode for RED-SCREEN output
1063 //
1064 VideoMode = SwitchVideoMode (0x83);
1065// if (VideoMode == (UINT16) -1) {
1066// DEBUG ((EFI_D_ERROR, "Video Mode Unknown!\n"));
1067// }
1068#endif
1069
1070 DumpExceptionDataVgaOut (InterruptType, SystemContext);
1071
1072 //
1073 // Use this macro to hang so that the compiler does not optimize out
1074 // the following RET instructions. This allows us to return if we
1075 // have a debugger attached.
1076 //
1077 CpuDeadLoop ();
1078
1079#if CPU_EXCEPTION_VGA_SWITCH
1080 //
1081 // Switch back to the old video mode
1082 //
1083 if (VideoMode != (UINT16)-1) {
1084 SwitchVideoMode (VideoMode);
1085 }
1086#endif
1087
1088 return ;
1089}
1090
1091VOID
1092EFIAPI

Callers

nothing calls this directly

Calls 4

SwitchVideoModeFunction · 0.85
DumpExceptionDataVgaOutFunction · 0.85
CpuDeadLoopFunction · 0.50

Tested by

no test coverage detected