Ioctl_ata_pass_through_direct
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Ioctl_ata_pass_through_direct

  1. #1
    Join Date
    Nov 2013
    Posts
    6

    Ioctl_ata_pass_through_direct

    Hi,

    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[5] (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?

    Thanks,

  2. #2
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    3,755

    Re: Ioctl_ata_pass_through_direct

    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.

  3. #3
    Join Date
    Nov 2013
    Posts
    6

    Re: Ioctl_ata_pass_through_direct

    Quote Originally Posted by OReubens View Post
    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.
    Thanks a lot for your reply.

  4. #4
    Join Date
    Nov 2013
    Posts
    1

    Re: Ioctl_ata_pass_through_direct

    Thanks very much I will try this out.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center