diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2025-02-02 11:03:08 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2025-02-02 11:03:08 +0100 |
| commit | a3066828d318efa547ac52a7edd5ee38aa7b4026 (patch) | |
| tree | d0c8f82a11c952c173e68a6355bde271851ad733 /dev/Kernel/HALKit/AMD64 | |
| parent | c63ae15569c7dcac683bc939b5765bd6fb00341c (diff) | |
ADD: Tweaks.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/Kernel/HALKit/AMD64')
| -rw-r--r-- | dev/Kernel/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cc | 2 | ||||
| -rw-r--r-- | dev/Kernel/HALKit/AMD64/Storage/ATA.cc | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/dev/Kernel/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cc b/dev/Kernel/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cc index 594a3d8d..6a1f0556 100644 --- a/dev/Kernel/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cc +++ b/dev/Kernel/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cc @@ -150,6 +150,8 @@ EXTERN_C Kernel::Void idt_handle_breakpoint(Kernel::UIntPtr rip) kcout << "Kernel: SIGKILL status set..\r"; process.Leak().Status = Kernel::ProcessStatusKind::kFrozen; + + while (YES); // TODO: Find a workaround for this. } /// @brief Handle #UD fault. diff --git a/dev/Kernel/HALKit/AMD64/Storage/ATA.cc b/dev/Kernel/HALKit/AMD64/Storage/ATA.cc index b21d5d19..9fcb003d 100644 --- a/dev/Kernel/HALKit/AMD64/Storage/ATA.cc +++ b/dev/Kernel/HALKit/AMD64/Storage/ATA.cc @@ -67,6 +67,8 @@ Boolean drv_std_init(UInt16 Bus, UInt8 Drive, UInt16& OutBus, UInt8& OutMaster) UInt16 IO = Bus; drv_std_select(IO); + rt_out8(IO + ATA_REG_NEIN, 1); + // Step 1: Wait until drive is not busy int timeout = 100000; while ((rt_in8(IO + ATA_REG_STATUS) & ATA_SR_BSY) && --timeout) @@ -77,8 +79,6 @@ Boolean drv_std_init(UInt16 Bus, UInt8 Drive, UInt16& OutBus, UInt8& OutMaster) return false; } - rt_out8(IO + ATA_REG_NEIN, 1); - // Step 2: Send IDENTIFY command rt_out8(IO + ATA_REG_COMMAND, ATA_CMD_IDENTIFY); @@ -108,7 +108,7 @@ Boolean drv_std_init(UInt16 Bus, UInt8 Drive, UInt16& OutBus, UInt8& OutMaster) if (!(kATAData[63] & (1 << 8)) || !(kATAData[88] & 0xFF)) { kcout << "No DMA support...\r"; - ke_panic(RUNTIME_CHECK_FAILED, "No DMA support on necessry disk driver."); + ke_panic(RUNTIME_CHECK_BOOTSTRAP, "No DMA support on necessary disk driver."); return false; } |
