diff options
| author | Amlal El Mahrouss <amlalelmahrouss@icloud.com> | 2024-02-28 22:53:57 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlalelmahrouss@icloud.com> | 2024-02-28 22:53:57 +0100 |
| commit | 8b14d5db84ffe44e0092afd610c216a6f36d7058 (patch) | |
| tree | 07d7da034be8b0da2dde1545000c0fc0fa2d3b20 /Private/HALKit/AMD64/HalCoreInterruptHandler.cpp | |
| parent | a71e1f4adc378ae69a001a9b7103c37ce1b1ee64 (diff) | |
HCoreKrnl: Interrupts are now 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.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Private/HALKit/AMD64/HalCoreInterruptHandler.cpp b/Private/HALKit/AMD64/HalCoreInterruptHandler.cpp index 9f2e37d8..e568aa4d 100644 --- a/Private/HALKit/AMD64/HalCoreInterruptHandler.cpp +++ b/Private/HALKit/AMD64/HalCoreInterruptHandler.cpp @@ -50,13 +50,18 @@ static const char* kExceptionMessages[32] = { #define kKernelSyscallInterrupt (0x21) EXTERN_C { - HCore::Void rt_handle_interrupts( - HCore::HAL::StackFramePtr stack) { + HCore::Void rt_handle_interrupts(HCore::HAL::StackFramePtr stack) { + HCore::kcout << "HCoreKrnl: Interrupting Hart...\r\n"; + + if (stack->IntNum < 32) { + HCore::kcout << "HCoreKrnl: " << kExceptionMessages[stack->IntNum] << HCore::end_line(); + } + switch (stack->IntNum) { case kKernelSyscallInterrupt: { HCore::kcout << "HCoreKrnl: System call raised, checking.." << HCore::end_line(); - rt_syscall_handle(nullptr); + rt_syscall_handle(stack); break; } @@ -65,9 +70,11 @@ EXTERN_C { } if ((stack->IntNum - 32) >= 12) { + HCore::kcout << "HCoreKrnl: EOI Master PIC...\r\n"; HCore::HAL::Out8(0xA0, 0x20); } + HCore::kcout << "HCoreKrnl: EOI Slave PIC...\r\n"; HCore::HAL::Out8(0x20, 0x20); } }
\ No newline at end of file |
