From 97d9cac7420ee032e8a2c4ae5e55963003516116 Mon Sep 17 00:00:00 2001 From: Amlal Date: Tue, 28 Jan 2025 09:15:46 +0100 Subject: ADD: RuntimeServices and format SATA.cc Signed-off-by: Amlal --- dev/Kernel/HALKit/AMD64/Storage/SATA.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'dev/Kernel/HALKit') 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(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); -- cgit v1.2.3