summaryrefslogtreecommitdiffhomepage
path: root/dev/Kernel/HALKit/AMD64/Storage
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2025-02-02 11:03:08 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2025-02-02 11:03:08 +0100
commita3066828d318efa547ac52a7edd5ee38aa7b4026 (patch)
treed0c8f82a11c952c173e68a6355bde271851ad733 /dev/Kernel/HALKit/AMD64/Storage
parentc63ae15569c7dcac683bc939b5765bd6fb00341c (diff)
ADD: Tweaks.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/Kernel/HALKit/AMD64/Storage')
-rw-r--r--dev/Kernel/HALKit/AMD64/Storage/ATA.cc6
1 files changed, 3 insertions, 3 deletions
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;
}