summaryrefslogtreecommitdiffhomepage
path: root/dev/zka/HALKit
diff options
context:
space:
mode:
authorAmlal <amlal@el-mahrouss-logic.com>2024-10-24 21:32:37 +0200
committerAmlal <amlal@el-mahrouss-logic.com>2024-10-24 21:32:37 +0200
commit73f81de724f19aa875e4da7aa9e55166b199633f (patch)
tree4c997e5ecc81ab449d22bfa07fa0dd39198acfae /dev/zka/HALKit
parent95b801834cc6685383e037d024ce3227bdb3e83b (diff)
CMD: ran format command.
Signed-off-by: Amlal <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'dev/zka/HALKit')
-rw-r--r--dev/zka/HALKit/AMD64/Storage/AHCI.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/dev/zka/HALKit/AMD64/Storage/AHCI.cc b/dev/zka/HALKit/AMD64/Storage/AHCI.cc
index a7635c46..1d237465 100644
--- a/dev/zka/HALKit/AMD64/Storage/AHCI.cc
+++ b/dev/zka/HALKit/AMD64/Storage/AHCI.cc
@@ -59,9 +59,9 @@ Kernel::Boolean drv_std_init(Kernel::UInt16& PortsImplemented)
Kernel::UInt16 ahci_index = 0;
const Kernel::UInt16 kMaxPortsImplemented = 32;
- const Kernel::UInt32 kSATASignature = 0x00000101;
- const Kernel::UInt8 kAhciPresent = 0x03;
- const Kernel::UInt8 kAhciIPMActive = 0x01;
+ const Kernel::UInt32 kSATASignature = 0x00000101;
+ const Kernel::UInt8 kAhciPresent = 0x03;
+ const Kernel::UInt8 kAhciIPMActive = 0x01;
Kernel::Boolean detected = false;
@@ -202,17 +202,17 @@ Kernel::Void drv_std_write(Kernel::UInt64 Lba, Kernel::Char* Buf, Kernel::SizeT
Kernel::Int64 free_slot = 0;
- // Prepare command header.
+ // Prepare command header.
HbaCmdHeader* cmd_header = (HbaCmdHeader*)kAhciPort->Clb;
cmd_header += free_slot;
- // Read operation/set entries count.
+ // Read operation/set entries count.
cmd_header->Write = Yes;
cmd_header->Prdtl = (Kernel::UInt16)((Size - 1) >> 4) + 1; // PRDT entries count
- // Prepare command table.
+ // Prepare command table.
HbaCmdTbl* cmd_tbl = (HbaCmdTbl*)cmd_header->Ctba;
Kernel::rt_set_memory(cmd_tbl, 0, sizeof(HbaCmdTbl));
@@ -230,12 +230,12 @@ Kernel::Void drv_std_write(Kernel::UInt64 Lba, Kernel::Char* Buf, Kernel::SizeT
Buf += 4 * 1024; // Move the Buf pointer forward
}
- // Last PRDT entry
+ // Last PRDT entry
cmd_tbl->prdtEntries[index_byte].Dba = (Kernel::UInt32)(Kernel::UIntPtr)Buf;
cmd_tbl->prdtEntries[index_byte].Dbc = Size - 1; // Byte count left
cmd_tbl->prdtEntries[index_byte].InterruptBit = 1;
- // 5. Prepare the command FIS (Frame Information Structure)
+ // 5. Prepare the command FIS (Frame Information Structure)
FisRegH2D* cmd_fis = (FisRegH2D*)(&cmd_tbl->Cfis);
Kernel::rt_set_memory(cmd_fis, 0, sizeof(FisRegH2D));
@@ -255,10 +255,10 @@ Kernel::Void drv_std_write(Kernel::UInt64 Lba, Kernel::Char* Buf, Kernel::SizeT
cmd_fis->CountLow = Size & 0xFF;
cmd_fis->CountHigh = (Size >> 8) & 0xFF;
- // 6. Issue the command by writing to the kAhciPort's command issue register (CI)
+ // 6. Issue the command by writing to the kAhciPort's command issue register (CI)
kAhciPort->Ci = 1 << free_slot;
- // 7. Wait for the command to complete (simple spinlock, no need for an object here)
+ // 7. Wait for the command to complete (simple spinlock, no need for an object here)
while (Yes)
{
if (!(kAhciPort->Ci & (1 << free_slot)))