From fb0ca452cda3bdc4a13f278c115f2dcd9360d818 Mon Sep 17 00:00:00 2001 From: Amlal EL Mahrouss Date: Sun, 4 Aug 2024 17:47:13 +0200 Subject: [IMP] [MHR-39] Ticket done. Signed-off-by: Amlal EL Mahrouss --- Kernel/Sources/KernelCheck.cxx | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'Kernel/Sources/KernelCheck.cxx') diff --git a/Kernel/Sources/KernelCheck.cxx b/Kernel/Sources/KernelCheck.cxx index d33002bd..defe6841 100644 --- a/Kernel/Sources/KernelCheck.cxx +++ b/Kernel/Sources/KernelCheck.cxx @@ -11,6 +11,10 @@ #include #include +#include +#include +#include + EXTERN_C [[noreturn]] Kernel::Void ke_wait_for_debugger() { while (Yes) @@ -29,6 +33,24 @@ namespace Kernel { void ke_stop(const Kernel::Int& id) { + CGInit(); + + auto panicBack = RGB(0xDC, 0xF5, 0xF5); + auto panicTxt = RGB(0, 0, 0); + + CGDrawInRegion(panicBack, UIAccessibilty::The().Height(), UIAccessibilty::The().Width(), 0, 0); + + auto start_y = 10; + auto x = 10; + + cg_write_text("*** Kernel panic! ***\rnewoskrnl.dll stopped working properly so we had to shut it down.", start_y, x, panicTxt); + + CGFini(); + + // ******* // + // shows in debug only. + // ******* // + kcout << "*** STOP *** \r"; kcout << "*** Kernel has trigerred a runtime stop. *** \r"; -- cgit v1.2.3