summaryrefslogtreecommitdiffhomepage
path: root/src/kernel/HALKit/AMD64/HalKernelPanic.cc
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2026-02-19 08:14:48 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2026-02-19 08:14:48 +0100
commitf0acad6f3206079d804b2f59aace0dc32dbeb6dc (patch)
tree44116f2771ebf146ec016337ba07d0320575dae3 /src/kernel/HALKit/AMD64/HalKernelPanic.cc
parent41117a33aa0dde66b8964b4bc0de0082fcd40667 (diff)
kernel: lots of tweaks and improvements, WIP: ASN, FileMgr support for OpenHeFS.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'src/kernel/HALKit/AMD64/HalKernelPanic.cc')
-rw-r--r--src/kernel/HALKit/AMD64/HalKernelPanic.cc56
1 files changed, 0 insertions, 56 deletions
diff --git a/src/kernel/HALKit/AMD64/HalKernelPanic.cc b/src/kernel/HALKit/AMD64/HalKernelPanic.cc
deleted file mode 100644
index ed6a190b..00000000
--- a/src/kernel/HALKit/AMD64/HalKernelPanic.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org)
-// Licensed under the Apache License, Version 2.0 (see LICENSE file)
-// Official repository: https://github.com/nekernel-org/nekernel
-
-#include <ArchKit/ArchKit.h>
-#include <FirmwareKit/Handover.h>
-#include <KernelKit/DebugOutput.h>
-#include <KernelKit/FileMgr.h>
-#include <KernelKit/Timer.h>
-#include <NeKit/KString.h>
-#include <NeKit/KernelPanic.h>
-#include <NeKit/Utils.h>
-#include <modules/CoreGfx/CoreGfx.h>
-#include <modules/CoreGfx/TextGfx.h>
-
-/* Each error code is attributed with an ID, which will prompt a string onto the
- * screen. Wait for debugger... */
-
-namespace Kernel {
-/// @brief Dumping factory class.
-class RecoveryFactory final {
- public:
- STATIC Void Recover();
-};
-
-/***********************************************************************************/
-/// @brief Stops execution of the kernel.
-/// @param id kernel stop ID.
-/***********************************************************************************/
-Void ke_panic(const Kernel::Int32& id, const Char* message) {
- (Void)(kout << "*** STOP ***\r");
-
- (Void)(kout << "Kernel_Panic_MSG: " << message << kendl);
- (Void)(kout << "Kernel_Panic_ID: " << hex_number(id) << kendl);
- (Void)(kout << "Kernel_Panic_CR2: " << hex_number((UIntPtr) hal_read_cr2()) << kendl);
-
- RecoveryFactory::Recover();
-}
-
-Void RecoveryFactory::Recover() {
- while (YES) {
- HAL::rt_halt();
- }
-}
-
-void ke_runtime_check(bool expr, const Char* file, const Char* line) {
- if (!expr) {
- (Void)(kout << "*** CHECK ***\r");
-
- (Void)(kout << "Kernel_Panic_FILE: " << file << kendl);
- (Void)(kout << "Kernel_Panic_LINE: " << line << kendl);
-
- ke_panic(RUNTIME_CHECK_FAILED, file); // Runtime Check failed
- }
-}
-} // namespace Kernel