kernel: Reenable the text console on panic
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
apio 2023-02-01 22:58:31 +01:00
parent e9a009478f
commit c05a87c7ff
Signed by: apio
GPG Key ID: B8A7D06E42258954

View File

@ -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;