summaryrefslogtreecommitdiffhomepage
path: root/Private/HALKit/AMD64/HalCoreInterruptHandler.cpp
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlalelmahrouss@icloud.com>2024-02-28 14:26:58 +0100
committerAmlal El Mahrouss <amlalelmahrouss@icloud.com>2024-02-28 14:26:58 +0100
commitf77a876e0ac2611079ee188933f0f3de222dd08a (patch)
treec8230499b03f8ad2cbdddbb6e06607163a176149 /Private/HALKit/AMD64/HalCoreInterruptHandler.cpp
parent2cf9f370d40a5c6512530c600292c5fac0410e11 (diff)
HCoreKrnl\HAL\IDT: Work in progress patch(fix) of HCore interrupt system
on x86. Signed-off-by: Amlal El Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Private/HALKit/AMD64/HalCoreInterruptHandler.cpp')
-rw-r--r--Private/HALKit/AMD64/HalCoreInterruptHandler.cpp33
1 files changed, 16 insertions, 17 deletions
diff --git a/Private/HALKit/AMD64/HalCoreInterruptHandler.cpp b/Private/HALKit/AMD64/HalCoreInterruptHandler.cpp
index 0b3af515..2acfc454 100644
--- a/Private/HALKit/AMD64/HalCoreInterruptHandler.cpp
+++ b/Private/HALKit/AMD64/HalCoreInterruptHandler.cpp
@@ -14,23 +14,23 @@
static const char* kExceptionMessages[32] = {
"Division by zero",
"Debug Breakpoint",
- "Non-maskable interrupt",
+ "Non-maskable Interrupt",
"Breakpoint",
- "Detected overflow",
- "Out-of-bounds",
- "Invalid opcode",
- "No coprocessor",
- "Double fault",
- "Coprocessor segment overrun",
+ "Detected Overflow",
+ "Out-Of-Bounds",
+ "Invalid Opcode",
+ "No Coprocessor",
+ "Double Fault",
+ "Coprocessor Segment Overrun",
"Bad TSS",
- "Segment not found",
- "Stack error.",
+ "Segment Not Found",
+ "Stack Error",
"General Protection Fault",
"Page Fault",
- "Invalid interrupt",
- "Coprocessor fault",
- "Alignment check",
- "Machine check",
+ "Invalid Interrupt",
+ "Coprocessor Fault",
+ "Alignment Check",
+ "Machine Check",
"Reserved",
"Reserved",
"Reserved",
@@ -49,13 +49,14 @@ static const char* kExceptionMessages[32] = {
/// @brief System call interrupt (like DOS and NT)
#define kKernelSyscallInterrupt (0x21)
-extern "C" {
+EXTERN_C {
HCore::UIntPtr rt_handle_interrupts(HCore::HAL::StackFramePtr sf) {
- HCore::HAL::rt_cli();
+ MUST_PASS(sf);
if (sf->IntNum < 32) {
} else if (sf->IntNum == 0x21) {
+ rt_syscall_handle(sf);
}
if ((sf->IntNum - 32) >= 12) {
@@ -64,8 +65,6 @@ HCore::UIntPtr rt_handle_interrupts(HCore::HAL::StackFramePtr sf) {
HCore::HAL::Out8(0x20, 0x20);
- HCore::HAL::rt_sti();
-
return (HCore::UIntPtr)sf;
}