fix (kernel): Added cpu_state NULL check in panic screen
This commit is contained in:
parent
2d9b9144e2
commit
5eab21e98a
|
@ -57,9 +57,15 @@ void panic_log_registers(cpu_state_T* state) {
|
||||||
|
|
||||||
void panic(cpu_state_T* state, string_t message) {
|
void panic(cpu_state_T* state, string_t message) {
|
||||||
log(LOG_ERROR, "!=====[ KERNEL PANIC ]=====!");
|
log(LOG_ERROR, "!=====[ KERNEL PANIC ]=====!");
|
||||||
|
log(LOG_NONE, "Error Message: %s", message);
|
||||||
|
|
||||||
|
if (state == NULL) {
|
||||||
|
log(LOG_WARNING, "No detailed Information available (cpu_state null reference)");
|
||||||
|
CORE_HALT_FOREVER
|
||||||
|
}
|
||||||
|
|
||||||
log(LOG_NONE, "Interrupt ID: 0x%xb", state->interrupt_id);
|
log(LOG_NONE, "Interrupt ID: 0x%xb", state->interrupt_id);
|
||||||
log(LOG_NONE, "Error Code: 0b%.32b", state->error_code);
|
log(LOG_NONE, "Error Code: 0b%.32b\n", state->error_code);
|
||||||
log(LOG_NONE, "Error Message: %s\n", message);
|
|
||||||
|
|
||||||
|
|
||||||
panic_log_paging_info(state);
|
panic_log_paging_info(state);
|
||||||
|
|
Loading…
Reference in New Issue