diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2025-03-04 05:20:58 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2025-03-04 05:20:58 +0100 |
| commit | d62341f615974257eac4125ab68be519efcf0a6e (patch) | |
| tree | a68661ff4108eb294e06c16319b8f938e3b2ff3a /dev/Kernel/HALKit/AMD64/Storage | |
| parent | fe61c5e33bd2a739885f3f7edc3c0c0798f918c7 (diff) | |
CHORE&FEAT: Kernel/SCI: Lots of Chore and feat, see below.
- Add traits for CmdListEntry in GPU's SCI. (GPU.h)
- Set standard user directory as /user/ instead of /usr/. (User.cc/User.h)
- Replace fSourcePid with fPID. (HardwareThreadScheduler.cc/HardwareThreadScheduler.h)
Diffstat (limited to 'dev/Kernel/HALKit/AMD64/Storage')
| -rw-r--r-- | dev/Kernel/HALKit/AMD64/Storage/AHCI.cc | 14 | ||||
| -rw-r--r-- | dev/Kernel/HALKit/AMD64/Storage/DMA.cc | 12 |
2 files changed, 13 insertions, 13 deletions
diff --git a/dev/Kernel/HALKit/AMD64/Storage/AHCI.cc b/dev/Kernel/HALKit/AMD64/Storage/AHCI.cc index 35d6ba66..a8e60e58 100644 --- a/dev/Kernel/HALKit/AMD64/Storage/AHCI.cc +++ b/dev/Kernel/HALKit/AMD64/Storage/AHCI.cc @@ -11,7 +11,7 @@ * @version 0.1 * @date 2024-02-02 * - * @Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved. + * @copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved. * */ @@ -58,9 +58,9 @@ STATIC Int32 drv_find_cmd_slot(HbaPort* port) noexcept; STATIC Void drv_compute_disk_ahci() noexcept; STATIC PCI::Device kPCIDevice; -STATIC HbaMem* kSATA[kSATAPortCnt] = {}; -STATIC SizeT kSATAIndex = 0UL; -STATIC Lba kHighestLBA = 0UL; +STATIC HbaMem* kSATA[kSATAPortCnt] = {}; +STATIC SizeT kSATAIndex = 0UL; +STATIC Lba kHighestLBA = 0UL; STATIC UInt16 kSATAPortsImplemented = 0U; @@ -139,7 +139,7 @@ STATIC Void drv_std_input_output(UInt64 lba, UInt8* buffer, SizeT sector_sz, Siz if (Identify) h2d_fis->Command = kAHCICmdIdentify; - h2d_fis->Lba0 = (lba) & 0xFF; + h2d_fis->Lba0 = (lba)&0xFF; h2d_fis->Lba1 = (lba >> 8) & 0xFF; h2d_fis->Lba2 = (lba >> 16) & 0xFF; @@ -149,7 +149,7 @@ STATIC Void drv_std_input_output(UInt64 lba, UInt8* buffer, SizeT sector_sz, Siz h2d_fis->Lba4 = (lba >> 32) & 0xFF; h2d_fis->Lba5 = (lba >> 40) & 0xFF; - h2d_fis->CountLow = (size_buffer) & 0xFF; + h2d_fis->CountLow = (size_buffer)&0xFF; h2d_fis->CountHigh = (size_buffer >> 8) & 0xFF; while ((kSATA[kSATAIndex]->Ports[kSATAIndex].Tfd & (kSATASRBsy | kSATASRDrq))) @@ -222,7 +222,7 @@ STATIC Bool drv_std_init_ahci(UInt16& pi, BOOL atapi) { kout << (atapi ? "Detect: /dev/atp" : "Detect: /dev/sat") << number(ahci_index) << endl; - kSATAIndex = ahci_index; + kSATAIndex = ahci_index; kSATA[ahci_index] = mem_ahci; pi = ports_implemented; diff --git a/dev/Kernel/HALKit/AMD64/Storage/DMA.cc b/dev/Kernel/HALKit/AMD64/Storage/DMA.cc index 06203380..dfec0f76 100644 --- a/dev/Kernel/HALKit/AMD64/Storage/DMA.cc +++ b/dev/Kernel/HALKit/AMD64/Storage/DMA.cc @@ -170,9 +170,9 @@ Void drv_std_read(UInt64 Lba, UInt16 IO, UInt8 Master, Char* Buf, SizeT SectorSz Details::PRDEntry* prd = (Details::PRDEntry*)(kATADevice.Bar(0x20) + 4); // The PRDEntry is not correct. - prd->mAddress = (UInt32)(UIntPtr)kReadAddr; - prd->mByteCount = Size - 1; - prd->mFlags = 0x8000; // indicate the end of prd. + prd->mAddress = (UInt32)(UIntPtr)kReadAddr; + prd->mByteCount = Size - 1; + prd->mFlags = 0x8000; // indicate the end of prd. rt_out32(kATADevice.Bar(0x20) + 0x04, (UInt32)(UIntPtr)prd); @@ -212,9 +212,9 @@ Void drv_std_write(UInt64 Lba, UInt16 IO, UInt8 Master, Char* Buf, SizeT SectorS rt_out8(IO + ATA_REG_LBA3, (Lba) >> 24); Details::PRDEntry* prd = (Details::PRDEntry*)(kATADevice.Bar(0x20) + 4); - prd->mAddress = (UInt32)(UIntPtr)kWriteAddr; - prd->mByteCount = Size - 1; - prd->mFlags = 0x8000; + prd->mAddress = (UInt32)(UIntPtr)kWriteAddr; + prd->mByteCount = Size - 1; + prd->mFlags = 0x8000; rt_out32(kATADevice.Bar(0x20) + 0x04, (UInt32)(UIntPtr)prd); rt_out8(kATADevice.Bar(0x20) + ATA_REG_COMMAND, ATA_CMD_WRITE_DMA); |
