summaryrefslogtreecommitdiffhomepage
path: root/dev/Kernel/HALKit/AMD64/Storage/AHCI.cc
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2025-03-14 21:42:49 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2025-03-14 21:42:49 +0100
commitef101c1852301f828531ee1e2217fc64bf26bd12 (patch)
tree1d0d82c97ca84b77ba3d3d238899b1d38d08a25d /dev/Kernel/HALKit/AMD64/Storage/AHCI.cc
parent57e99bd9a0adac271b5cf1fd9b426b6b4eb8ebee (diff)
Kernel: Patch UserProcess::Delete, and AHCI identify command.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/Kernel/HALKit/AMD64/Storage/AHCI.cc')
-rw-r--r--dev/Kernel/HALKit/AMD64/Storage/AHCI.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/dev/Kernel/HALKit/AMD64/Storage/AHCI.cc b/dev/Kernel/HALKit/AMD64/Storage/AHCI.cc
index f6656ce5..874b7012 100644
--- a/dev/Kernel/HALKit/AMD64/Storage/AHCI.cc
+++ b/dev/Kernel/HALKit/AMD64/Storage/AHCI.cc
@@ -42,7 +42,7 @@
#define kSATASRDrq (0x08)
#define kHBABohcBiosOwned (1 << 0)
-#define kHBABohcOSOwned (1 << 1)
+#define kHBABohcOSOwned (1 << 1)
#define kSATAPortCnt (0x20)
@@ -85,8 +85,8 @@ STATIC Void drv_compute_disk_ahci() noexcept
for (SizeT i = 0; i < 40; ++i)
{
- kCurrentDiskModel[i * 2] = identify_data[27 + i * 2] >> 8;
- kCurrentDiskModel[i * 2 + 1] = identify_data[27 + i * 2] & 0xFF;
+ kCurrentDiskModel[i * 2] = identify_data[27 + (i * 2)] >> 8;
+ kCurrentDiskModel[i * 2 + 1] = identify_data[27 + (i * 2) + 1] & 0xFF;
}
kCurrentDiskModel[40] = '\0';
@@ -261,7 +261,7 @@ STATIC Bool drv_std_init_ahci(UInt16& pi, BOOL atapi)
kout << "Detect: /dev/sat" << number(ahci_index) << kendl;
kSATAIndex = ahci_index;
- kSATAHba = mem_ahci;
+ kSATAHba = mem_ahci;
if (kSATAHba->Bohc & kHBABohcBiosOwned)
{
@@ -269,7 +269,6 @@ STATIC Bool drv_std_init_ahci(UInt16& pi, BOOL atapi)
while (kSATAHba->Bohc & kHBABohcBiosOwned)
{
-
}
}
@@ -285,7 +284,7 @@ STATIC Bool drv_std_init_ahci(UInt16& pi, BOOL atapi)
kout << "Detect: /dev/atp" << number(ahci_index) << kendl;
kSATAIndex = ahci_index;
- kSATAHba = mem_ahci;
+ kSATAHba = mem_ahci;
kSATAHba->Ports[ahci_index].Cmd |= kHBAPxCmdFre | kHBAPxCmdST;