diff options
| author | Amlal El Mahrouss <amlalelmahrouss@icloud.com> | 2024-02-26 20:01:37 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlalelmahrouss@icloud.com> | 2024-02-26 20:01:37 +0100 |
| commit | ddb6c818256ad817ba8b5e93e7868571739ae49c (patch) | |
| tree | e5105de6ec9ff2e90528033f51e950fd4dac2f30 /Private/HALKit/AMD64/HalCoreInterruptHandler.cpp | |
| parent | ef334847f61125e610e719f8dc1580d7f07e6c1d (diff) | |
Kernel:HAL: getting IDT to work...
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 | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/Private/HALKit/AMD64/HalCoreInterruptHandler.cpp b/Private/HALKit/AMD64/HalCoreInterruptHandler.cpp index b161f1db..5a353b6e 100644 --- a/Private/HALKit/AMD64/HalCoreInterruptHandler.cpp +++ b/Private/HALKit/AMD64/HalCoreInterruptHandler.cpp @@ -33,9 +33,9 @@ static const char* kExceptionMessage[32] = { "Machine check", "Reserved", "Reserved", - "System Process Switch Issued", - "System was interrupted by kernel", - "System hang by kernel", + "Reserved", + "Reserved", + "Reservedl", "Reserved", "Reserved", "Reserved", @@ -46,24 +46,9 @@ static const char* kExceptionMessage[32] = { "Reserved", }; -extern "C" HCore::UIntPtr rt_handle_interrupts(HCore::UIntPtr& rsp) { - HCore::HAL::rt_cli(); - - HCore::HAL::StackFramePtr sf = (HCore::HAL::StackFramePtr)rsp; - - if (sf->IntNum == 0x21) { - rt_syscall_handle(sf); - } - - if (sf->IntNum < 32) { - HCore::kcout << "Exception:" << kExceptionMessage[sf->IntNum] << "\n"; - } - - if (sf->IntNum >= 40) HCore::HAL::Out8(0x20, 0x20); // ACK MASTER - - HCore::HAL::Out8(0xA0, 0x20); // ACK SLAVE - - HCore::HAL::rt_sti(); +/// @brief System call interrupt (like DOS and NT) +#define kKernelSyscallInterrupt (0x21) +EXTERN_C HCore::UIntPtr rt_handle_interrupts(HCore::UIntPtr rsp) { return rsp; } |
