diff options
| author | Amlal <amlal.elmahrouss@icloud.com> | 2025-01-28 09:15:46 +0100 |
|---|---|---|
| committer | Amlal <amlal.elmahrouss@icloud.com> | 2025-01-28 09:15:46 +0100 |
| commit | 97d9cac7420ee032e8a2c4ae5e55963003516116 (patch) | |
| tree | bac5cf6e0488aa53dd9204003d9e982050f8f1a7 /dev/Kernel/HALKit/AMD64/Storage | |
| parent | 443197ebebaaeb13dbc31ee0303a0acffc45321d (diff) | |
ADD: RuntimeServices and format SATA.cc
Signed-off-by: Amlal <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/Kernel/HALKit/AMD64/Storage')
| -rw-r--r-- | dev/Kernel/HALKit/AMD64/Storage/SATA.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/dev/Kernel/HALKit/AMD64/Storage/SATA.cc b/dev/Kernel/HALKit/AMD64/Storage/SATA.cc index d2c0ee5b..74e1e8c1 100644 --- a/dev/Kernel/HALKit/AMD64/Storage/SATA.cc +++ b/dev/Kernel/HALKit/AMD64/Storage/SATA.cc @@ -68,14 +68,14 @@ static Kernel::Void drv_calculate_disk_geometry() noexcept drv_std_input_output<NO, YES, YES>(0, identify_data, 0, kib_cast(4)); - uint32_t lba28_sectors = (identify_data[61] << 16) | identify_data[60]; + uint32_t lba28_sectors = (identify_data[61] << 16) | identify_data[60]; - uint64_t lba48_sectors = ((uint64_t)identify_data[103] << 48) | - ((uint64_t)identify_data[102] << 32) | - ((uint64_t)identify_data[101] << 16) | - ((uint64_t)identify_data[100]); + uint64_t lba48_sectors = ((uint64_t)identify_data[103] << 48) | + ((uint64_t)identify_data[102] << 32) | + ((uint64_t)identify_data[101] << 16) | + ((uint64_t)identify_data[100]); - kCurrentDiskSectorCount = (lba48_sectors) ? lba48_sectors : lba28_sectors; + kCurrentDiskSectorCount = (lba48_sectors) ? lba48_sectors : lba28_sectors; for (Kernel::Int32 i = 0; i < 40; i += 2) { @@ -229,7 +229,7 @@ static Kernel::Void drv_std_input_output(Kernel::UInt64 lba, Kernel::UInt8* buff command_header->Cfl = sizeof(FisRegH2D) / sizeof(Kernel::UInt32); command_header->Write = Write; command_header->Prdtl = mib_cast(32) / mib_cast(4); - command_header->Prdbc = (1 << slot); + command_header->Prdbc = (1 << slot); volatile HbaCmdTbl* command_table = (volatile HbaCmdTbl*)((Kernel::UInt64)command_header->Ctba); |
