summaryrefslogtreecommitdiffhomepage
path: root/dev/Kernel/HALKit/AMD64/HalKernelPanic.cc
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2025-03-23 19:13:48 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2025-03-23 19:15:17 +0100
commita13e1c0911c0627184bc38f18c7fdda64447b3ad (patch)
tree073a62c09bf216e85a3f310376640fa1805147f9 /dev/Kernel/HALKit/AMD64/HalKernelPanic.cc
parent149fa096eb306d03686b3b67e813cf1a78e08cd0 (diff)
meta(kernel): Reworked repository's filesystem structure.
Removing useless parts of the project too. Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/Kernel/HALKit/AMD64/HalKernelPanic.cc')
-rw-r--r--dev/Kernel/HALKit/AMD64/HalKernelPanic.cc68
1 files changed, 0 insertions, 68 deletions
diff --git a/dev/Kernel/HALKit/AMD64/HalKernelPanic.cc b/dev/Kernel/HALKit/AMD64/HalKernelPanic.cc
deleted file mode 100644
index 663a8f8e..00000000
--- a/dev/Kernel/HALKit/AMD64/HalKernelPanic.cc
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -------------------------------------------
-
- Copyright (C) 2024-2025, Amlal EL Mahrouss, all rights reserved.
-
-------------------------------------------- */
-
-#include <NewKit/KernelPanic.h>
-#include <ArchKit/ArchKit.h>
-#include <KernelKit/Timer.h>
-#include <KernelKit/DebugOutput.h>
-#include <NewKit/KString.h>
-#include <FirmwareKit/Handover.h>
-#include <KernelKit/FileMgr.h>
-#include <Mod/CoreGfx/FBMgr.h>
-#include <Mod/CoreGfx/TextMgr.h>
-#include <NewKit/Utils.h>
-
-/* Each error code is attributed with an ID, which will prompt a string onto the
- * screen. Wait for debugger... */
-
-namespace NeOS
-{
- /// @brief Dumping factory class.
- class RecoveryFactory final
- {
- public:
- STATIC Void Recover() noexcept;
- };
-
- /***********************************************************************************/
- /// @brief Stops execution of the kernel.
- /// @param id kernel stop ID.
- /***********************************************************************************/
- Void ke_panic(const NeOS::Int32& id, const Char* message)
- {
- fb_init();
-
- auto panic_text = RGB(0xff, 0xff, 0xff);
-
- auto y = 10;
- auto x = 10;
-
- kout << "Kernel_Panic_MSG: " << message << kendl;
- kout << "Kernel_Panic_ID: " << hex_number(id) << kendl;
- kout << "Kernel_Panic_CR2: " << hex_number((UIntPtr)hal_read_cr2()) << kendl;
-
- RecoveryFactory::Recover();
- }
-
- Void RecoveryFactory::Recover() noexcept
- {
- while (YES)
- {
- HAL::rt_halt();
- }
- }
-
- void ke_runtime_check(bool expr, const Char* file, const Char* line)
- {
- if (!expr)
- {
- kout << "Kernel_Panic_File: " << file << kendl;
- kout << "Kernel_Panic_Line: " << line << kendl;
-
- ke_panic(RUNTIME_CHECK_FAILED, file); // Runtime Check failed
- }
- }
-} // namespace NeOS