summaryrefslogtreecommitdiffhomepage
path: root/dev/Kernel/HALKit/AMD64
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-12-25 14:04:14 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-12-25 14:04:14 +0100
commit4ed658c633ce5d7c5bde4acdbe322e5f51592369 (patch)
tree2eaf1d46946bf86123f1561338c81aaff8956662 /dev/Kernel/HALKit/AMD64
parent02fd0b59edbcb2b5c08ab1f36bbffc12ba08a5d3 (diff)
IMPL: Important refactors and improvements of ZkaOS.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/Kernel/HALKit/AMD64')
-rw-r--r--dev/Kernel/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cc22
-rw-r--r--dev/Kernel/HALKit/AMD64/HalCoreScheduler.cc4
-rw-r--r--dev/Kernel/HALKit/AMD64/HalDebugOutput.cc2
-rw-r--r--dev/Kernel/HALKit/AMD64/HalKernelMain.cc8
4 files changed, 18 insertions, 18 deletions
diff --git a/dev/Kernel/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cc b/dev/Kernel/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cc
index 036593e5..aa1d66d7 100644
--- a/dev/Kernel/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cc
+++ b/dev/Kernel/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cc
@@ -18,7 +18,7 @@ EXTERN_C void idt_handle_gpf(Kernel::UIntPtr rsp)
auto process = Kernel::UserProcessScheduler::The().GetCurrentProcess();
if (!process)
- Kernel::ke_stop(RUNTIME_CHECK_PAGE);
+ Kernel::ke_panic(RUNTIME_CHECK_PAGE);
process.Leak().ProcessSignal.SignalIP = 0UL;
process.Leak().ProcessSignal.SignalID = SIGKILL;
@@ -30,7 +30,7 @@ EXTERN_C void idt_handle_gpf(Kernel::UIntPtr rsp)
process.Leak().Crash();
- Kernel::ke_stop(RUNTIME_CHECK_POINTER);
+ Kernel::ke_panic(RUNTIME_CHECK_POINTER);
}
/// @brief Handle page fault.
@@ -43,7 +43,7 @@ EXTERN_C void idt_handle_pf(Kernel::UIntPtr rsp)
auto process = Kernel::UserProcessScheduler::The().GetCurrentProcess();
if (!process)
- Kernel::ke_stop(RUNTIME_CHECK_PAGE);
+ Kernel::ke_panic(RUNTIME_CHECK_PAGE);
process.Leak().ProcessSignal.SignalIP = 0UL;
process.Leak().ProcessSignal.SignalID = SIGKILL;
@@ -55,7 +55,7 @@ EXTERN_C void idt_handle_pf(Kernel::UIntPtr rsp)
process.Leak().Crash();
- Kernel::ke_stop(RUNTIME_CHECK_PAGE);
+ Kernel::ke_panic(RUNTIME_CHECK_PAGE);
}
/// @brief Handle scheduler interrupt.
@@ -90,7 +90,7 @@ EXTERN_C void idt_handle_math(Kernel::UIntPtr rsp)
auto process = Kernel::UserProcessScheduler::The().GetCurrentProcess();
if (!process)
- Kernel::ke_stop(RUNTIME_CHECK_PAGE);
+ Kernel::ke_panic(RUNTIME_CHECK_PAGE);
process.Leak().ProcessSignal.SignalIP = 0UL;
process.Leak().ProcessSignal.SignalID = SIGKILL;
@@ -102,7 +102,7 @@ EXTERN_C void idt_handle_math(Kernel::UIntPtr rsp)
process.Leak().Crash();
- Kernel::ke_stop(RUNTIME_CHECK_UNEXCPECTED);
+ Kernel::ke_panic(RUNTIME_CHECK_UNEXCPECTED);
}
/// @brief Handle any generic fault.
@@ -114,7 +114,7 @@ EXTERN_C void idt_handle_generic(Kernel::UIntPtr rsp)
auto process = Kernel::UserProcessScheduler::The().GetCurrentProcess();
if (!process)
- Kernel::ke_stop(RUNTIME_CHECK_PAGE);
+ Kernel::ke_panic(RUNTIME_CHECK_PAGE);
process.Leak().ProcessSignal.SignalIP = 0UL;
process.Leak().ProcessSignal.SignalID = SIGKILL;
@@ -126,7 +126,7 @@ EXTERN_C void idt_handle_generic(Kernel::UIntPtr rsp)
process.Leak().Crash();
- Kernel::ke_stop(RUNTIME_CHECK_UNEXCPECTED);
+ Kernel::ke_panic(RUNTIME_CHECK_UNEXCPECTED);
}
EXTERN_C Kernel::Void idt_handle_breakpoint(Kernel::UIntPtr rip)
@@ -134,7 +134,7 @@ EXTERN_C Kernel::Void idt_handle_breakpoint(Kernel::UIntPtr rip)
auto process = Kernel::UserProcessScheduler::The().GetCurrentProcess();
if (!process)
- Kernel::ke_stop(RUNTIME_CHECK_PAGE);
+ Kernel::ke_panic(RUNTIME_CHECK_PAGE);
kcout << "Kernel: Process RIP: " << Kernel::hex_number(rip) << endl;
kcout << "Kernel: SIGTRAP set.\r";
@@ -158,7 +158,7 @@ EXTERN_C void idt_handle_ud(Kernel::UIntPtr rsp)
auto process = Kernel::UserProcessScheduler::The().GetCurrentProcess();
if (!process)
- Kernel::ke_stop(RUNTIME_CHECK_PAGE);
+ Kernel::ke_panic(RUNTIME_CHECK_PAGE);
process.Leak().ProcessSignal.SignalIP = 0UL;
process.Leak().ProcessSignal.SignalID = SIGKILL;
@@ -170,7 +170,7 @@ EXTERN_C void idt_handle_ud(Kernel::UIntPtr rsp)
process.Leak().Crash();
- Kernel::ke_stop(RUNTIME_CHECK_UNEXCPECTED);
+ Kernel::ke_panic(RUNTIME_CHECK_UNEXCPECTED);
}
/// @brief Enter syscall from assembly.
diff --git a/dev/Kernel/HALKit/AMD64/HalCoreScheduler.cc b/dev/Kernel/HALKit/AMD64/HalCoreScheduler.cc
index 02150f6e..ac103d0d 100644
--- a/dev/Kernel/HALKit/AMD64/HalCoreScheduler.cc
+++ b/dev/Kernel/HALKit/AMD64/HalCoreScheduler.cc
@@ -11,8 +11,8 @@
#include <KernelKit/Semaphore.h>
#include <KernelKit/UserProcessScheduler.h>
#include <KernelKit/Timer.h>
-#include <Modules/FB/Text.h>
-#include <NewKit/Stop.h>
+#include <Modules/GfxMgr/TextMgr.h>
+#include <NewKit/KernelPanic.h>
// Needed for SMP.
#include <KernelKit/HardwareThreadScheduler.h>
diff --git a/dev/Kernel/HALKit/AMD64/HalDebugOutput.cc b/dev/Kernel/HALKit/AMD64/HalDebugOutput.cc
index 6ae5859d..ce3690b3 100644
--- a/dev/Kernel/HALKit/AMD64/HalDebugOutput.cc
+++ b/dev/Kernel/HALKit/AMD64/HalDebugOutput.cc
@@ -47,7 +47,7 @@ namespace Kernel
// Check if serial is faulty (i.e: not same byte as sent)
if (HAL::rt_in8(PORT) != 0xAE)
{
- ke_stop(RUNTIME_CHECK_HANDSHAKE);
+ ke_panic(RUNTIME_CHECK_HANDSHAKE);
}
kState = kStateReady;
diff --git a/dev/Kernel/HALKit/AMD64/HalKernelMain.cc b/dev/Kernel/HALKit/AMD64/HalKernelMain.cc
index bf297d6a..75c41433 100644
--- a/dev/Kernel/HALKit/AMD64/HalKernelMain.cc
+++ b/dev/Kernel/HALKit/AMD64/HalKernelMain.cc
@@ -11,8 +11,8 @@
#include <Modules/ACPI/ACPIFactoryInterface.h>
#include <NetworkKit/IPC.h>
#include <CFKit/Property.h>
-#include <Modules/FB/AppearanceMgr.h>
-#include <Modules/FB/Text.h>
+#include <Modules/GfxMgr/AppearanceMgr.h>
+#include <Modules/GfxMgr/TextMgr.h>
EXTERN_C Kernel::VoidPtr kInterruptVectorTable[];
EXTERN_C Kernel::VoidPtr mp_user_switch_proc;
@@ -79,12 +79,12 @@ EXTERN_C void hal_init_platform(
Kernel::HAL::GDTLoader gdt_loader;
gdt_loader.Load(gdt_reg);
- Kernel::ke_stop(RUNTIME_CHECK_BOOTSTRAP);
+ Kernel::ke_panic(RUNTIME_CHECK_BOOTSTRAP);
}
EXTERN_C Kernel::Void hal_real_init(Kernel::Void) noexcept
{
- CG::ui_draw_background();
+ UI::ui_draw_background();
auto str_proc = Kernel::rt_alloc_string("System");
Kernel::rtl_create_process(rtl_kernel_main, str_proc);