I've had a minimal AHCI driver for a while, but I still haven't come across anything that talks about how you would get the count of the sectors of the disk.
The closest I've come is [this thread] about the ATA IDENTIFY command, but it seems like there is only one 32-bit spot for the sector count:
Code: Select all
...
unsigned int lba_capacity; /* total number of sectors */
...
I've tried looking in the manual for "capacity" or "sector count" but turned up nothing.
Am I misinterpreting the IDENTIFY response? Is that the correct spot for the capacity, or is there another spot that I've overlooked that allows for more than 2TB?