Problems finding drive size with ATA Identify
Posted: Tue May 11, 2021 1:55 am
A brief overview; I am using AHCI to write a driver and am currently stuck on trying to get the connected drives size. I can read and write to a drive, but it would be very helpful to know the size of the drive.
When I test my driver on real hardware with a 250GB drive the ATA identify command returns the max sector amount(137GB) as if it is a 28-bit LBA drive. And this is returned in words 230-233 "extended # of user addressable sectors" not in the 28-bit sector amount words(60-61). Also the 28-bit sector amount words(60-61) show 0x0007000. The last place for sector amount(100-103) shows 0. I know my drive has 48-bit support and the BIOS confirms this by showing the proper drive size. Also the drive was in this laptop before and completely functional in a Windows Vista installation.
The other interesting thing is that I noticed is the "48-bit address feature set is supported" bit in word 83 is set but the "48-bit address feature set is supported" in word 86 is not set. To me this means that it is supported but not enabled since 83 is labeled as features supported and 86 is labeled as features enabled.
I couldn't find any information about enabling 48-bit lba and decided to just ask this question on here. Does anyone know if there is a way to enable 48-bit lba or does anyone have an idea of what might be going on here?
When I test my driver on real hardware with a 250GB drive the ATA identify command returns the max sector amount(137GB) as if it is a 28-bit LBA drive. And this is returned in words 230-233 "extended # of user addressable sectors" not in the 28-bit sector amount words(60-61). Also the 28-bit sector amount words(60-61) show 0x0007000. The last place for sector amount(100-103) shows 0. I know my drive has 48-bit support and the BIOS confirms this by showing the proper drive size. Also the drive was in this laptop before and completely functional in a Windows Vista installation.
The other interesting thing is that I noticed is the "48-bit address feature set is supported" bit in word 83 is set but the "48-bit address feature set is supported" in word 86 is not set. To me this means that it is supported but not enabled since 83 is labeled as features supported and 86 is labeled as features enabled.
I couldn't find any information about enabling 48-bit lba and decided to just ask this question on here. Does anyone know if there is a way to enable 48-bit lba or does anyone have an idea of what might be going on here?