summaryrefslogtreecommitdiffhomepage
path: root/Private/HALKit/AMD64/HalCoreInterruptHandler.cpp
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlalelmahrouss@icloud.com>2024-02-27 17:08:58 +0100
committerAmlal El Mahrouss <amlalelmahrouss@icloud.com>2024-02-27 17:08:58 +0100
commit42114496675d326252671146f0319953d796310f (patch)
treeaddbc572cd4e774683f3613bc3379a34cee0be8c /Private/HALKit/AMD64/HalCoreInterruptHandler.cpp
parent9244027f113c5d60e5e7952214d1c253b4c203da (diff)
HAL: Amd64: Got interrupts working.
Signed-off-by: Amlal El Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Private/HALKit/AMD64/HalCoreInterruptHandler.cpp')
-rw-r--r--Private/HALKit/AMD64/HalCoreInterruptHandler.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/Private/HALKit/AMD64/HalCoreInterruptHandler.cpp b/Private/HALKit/AMD64/HalCoreInterruptHandler.cpp
index 70b6e782..eb81532d 100644
--- a/Private/HALKit/AMD64/HalCoreInterruptHandler.cpp
+++ b/Private/HALKit/AMD64/HalCoreInterruptHandler.cpp
@@ -11,7 +11,7 @@
#include <KernelKit/ProcessManager.hpp>
#include <NewKit/String.hpp>
-static const char* kExceptionMessage[32] = {
+static const char* kExceptionMessages[32] = {
"Division by zero",
"Debug Breakpoint",
"Non-maskable interrupt",
@@ -49,12 +49,15 @@ static const char* kExceptionMessage[32] = {
/// @brief System call interrupt (like DOS and NT)
#define kKernelSyscallInterrupt (0x21)
-extern "C" HCore::UIntPtr rt_handle_interrupts(HCore::UIntPtr &rsp) {
- HCore::HAL::rt_cli();
-
+EXTERN_C HCore::UIntPtr rt_handle_interrupts(HCore::UIntPtr &rsp) {
HCore::HAL::StackFramePtr sf = (HCore::HAL::StackFramePtr)rsp;
- HCore::HAL::rt_sti();
+ if (sf->IntNum < 32) {
+
+ } else if (sf->IntNum == 0x21) {
+
+ }
+
return rsp;
}