| 1043 | #endif |
| 1044 | |
| 1045 | VOID |
| 1046 | EFIAPI |
| 1047 | ExceptionHandler ( |
| 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 | |
| 1091 | VOID |
| 1092 | EFIAPI |
nothing calls this directly
no test coverage detected