kernel: Reenable the text console on panic
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
e9a009478f
commit
c05a87c7ff
@ -10,6 +10,7 @@
|
||||
static bool g_debug_enabled = true;
|
||||
static bool g_serial_enabled = true;
|
||||
static bool g_text_console_enabled = false;
|
||||
static bool g_text_console_initialized = false;
|
||||
|
||||
static constexpr u32 BLACK = 0xff000000;
|
||||
static constexpr u32 WHITE = 0xffffffff;
|
||||
@ -109,6 +110,7 @@ void setup_log(bool enable_debug, bool enable_serial, bool enable_text_console)
|
||||
g_debug_enabled = enable_debug;
|
||||
g_serial_enabled = enable_serial;
|
||||
g_text_console_enabled = enable_text_console;
|
||||
if (enable_text_console) g_text_console_initialized = true;
|
||||
}
|
||||
|
||||
bool log_debug_enabled()
|
||||
@ -131,6 +133,7 @@ static bool g_check_already_failed = false;
|
||||
[[noreturn]] bool __check_failed(SourceLocation location, const char* expr)
|
||||
{
|
||||
CPU::disable_interrupts();
|
||||
if (g_text_console_initialized) g_text_console_enabled = true;
|
||||
if (!g_check_already_failed)
|
||||
{ // Avoid endlessly failing when trying to report a failed check.
|
||||
g_check_already_failed = true;
|
||||
|
Loading…
Reference in New Issue
Block a user