From 42114496675d326252671146f0319953d796310f Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Tue, 27 Feb 2024 17:08:58 +0100 Subject: HAL: Amd64: Got interrupts working. Signed-off-by: Amlal El Mahrouss --- Private/HALKit/AMD64/HalCoreInterruptHandler.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'Private/HALKit/AMD64/HalCoreInterruptHandler.cpp') 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 #include -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; } -- cgit v1.2.3