summaryrefslogtreecommitdiffhomepage
path: root/src/kernel/HALKit/AMD64/Storage/DMA+Generic.cc
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2026-01-25 03:07:52 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2026-01-25 03:07:52 +0100
commit0e05e9fd34bd036e9043f20939c53edf967465ce (patch)
tree36e3e6b84534a82c53605a19134e9ab772c11c65 /src/kernel/HALKit/AMD64/Storage/DMA+Generic.cc
parent480ccd897d21823af6128f0e3d8d8cdbf653dd0f (diff)
feat: CF: Add alias for CFDictionary (CFDict).v0.1.3
fix: kernel: CodeMgr improvements and fixes. Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'src/kernel/HALKit/AMD64/Storage/DMA+Generic.cc')
-rw-r--r--src/kernel/HALKit/AMD64/Storage/DMA+Generic.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/kernel/HALKit/AMD64/Storage/DMA+Generic.cc b/src/kernel/HALKit/AMD64/Storage/DMA+Generic.cc
index a258bf3a..8bf7b161 100644
--- a/src/kernel/HALKit/AMD64/Storage/DMA+Generic.cc
+++ b/src/kernel/HALKit/AMD64/Storage/DMA+Generic.cc
@@ -92,7 +92,7 @@ Void drv_std_read(UInt64 Lba, UInt16 IO, UInt8 Master, Char* Buf, SizeT SectorSz
rt_out8(IO + ATA_REG_SEC_COUNT0, ((Size + SectorSz - 1) / SectorSz));
- rt_out8(IO + ATA_REG_LBA0, (Lba) &0xFF);
+ rt_out8(IO + ATA_REG_LBA0, (Lba) & 0xFF);
rt_out8(IO + ATA_REG_LBA1, (Lba) >> 8);
rt_out8(IO + ATA_REG_LBA2, (Lba) >> 16);
rt_out8(IO + ATA_REG_LBA3, (Lba) >> 24);
@@ -110,8 +110,7 @@ Void drv_std_read(UInt64 Lba, UInt16 IO, UInt8 Master, Char* Buf, SizeT SectorSz
rt_out8(kATADevice.Bar(0x20) + 0x00, 0x09); // Start DMA engine
- while (rt_in8(kATADevice.Bar(0x20) + ATA_REG_STATUS) & 0x01)
- ;
+ while (rt_in8(kATADevice.Bar(0x20) + ATA_REG_STATUS) & 0x01);
rt_out8(kATADevice.Bar(0x20) + 0x00, 0x00); // Stop DMA engine
@@ -134,7 +133,7 @@ Void drv_std_write(UInt64 Lba, UInt16 IO, UInt8 Master, Char* Buf, SizeT SectorS
rt_out8(IO + ATA_REG_SEC_COUNT0, ((Size + (SectorSz - 1)) / SectorSz));
- rt_out8(IO + ATA_REG_LBA0, (Lba) &0xFF);
+ rt_out8(IO + ATA_REG_LBA0, (Lba) & 0xFF);
rt_out8(IO + ATA_REG_LBA1, (Lba) >> 8);
rt_out8(IO + ATA_REG_LBA2, (Lba) >> 16);
rt_out8(IO + ATA_REG_LBA3, (Lba) >> 24);
@@ -150,8 +149,7 @@ Void drv_std_write(UInt64 Lba, UInt16 IO, UInt8 Master, Char* Buf, SizeT SectorS
rt_out8(IO + 0x00, 0x09); // Start DMA engine
- while (rt_in8(kATADevice.Bar(0x20) + ATA_REG_STATUS) & 0x01)
- ;
+ while (rt_in8(kATADevice.Bar(0x20) + ATA_REG_STATUS) & 0x01);
rt_out8(kATADevice.Bar(0x20) + 0x00, 0x00); // Stop DMA engine