2

I'm currently trying to get LBA working for my ATA driver, but I have problem.

My identify function returns OK and word 83;bit 10 of returned identification data is set, so my device supports LBA48. But when I try to get total amount of LBA48 sectors (configuration words 100-103), it gives my zero. In virtual machine I have 1GB disk set, but this field is still zero. I also tried to get amount of LBA28 sectors => it's the correct one.

Interesting is that when I print out heads * cylinders * sectors_per_track, the value is almost same as value of total LBA28 sectors located on words 60-61. It's 2097152 for total LBA28 and 2096640 for h * c * s. Difference of these two values is 512.

Does anybody know what am I doing wrong? Is there any other way for getting the size of HDD?

user35443
  • 6,309
  • 12
  • 52
  • 75

0 Answers0