November 27th, 2013, 02:22 PM
With regards to the above in reading a drive
In the case of IOCTL_ATA_PASS_THROUGH_DIRECT
and a simple read sector (0x20), how is the CurrentTaskFile (bDriveHeadRegister) figured out?
I see it is set to 0xE0 and it works but it also seems associated with big LBA etc. Is there any documentation that might point to this?
November 28th, 2013, 07:25 AM
It depends what kind of answer you expect to this. But this doesn't even have to be at all related to physical topology of the drive. LBA was a hardware topology, big LBA an extention to allow larger sizes
most disks today "lie" to the OS about their actual topology to circumvent limitations in the (big) LBA adressing.
So a disk may physically have 4 platters (with either 6 or 8 heads) and 8000 cylinders (tracks), but report it to the OS as
24 heads and 2000 cylinders.
on an SDD the concept of "disks", "heads", "cylinders" is entirely moot, but still those disks functionally behave like a disk and report such as having a certain "disk like" topology.
The answer is basically, the CurrentTaskFile will be the virtual position windows uses to calculate the sector, this is probably not anything like the actual physical location on disk.
if you want the actual physical location, you'll need to go to kernel mode and talk to the drive logic directly.
December 2nd, 2013, 01:48 PM
Thanks a lot for your reply.
Originally Posted by OReubens
December 13th, 2013, 08:35 PM
Thanks very much I will try this out.
Click Here to Expand Forum to Full Width