PATA Disk Locking?

Discussion in 'Computer Hardware, Devices and Accessories' started by gudenau, Jul 16, 2016.

  1. gudenau
    OP

    gudenau Largely ignored

    Member
    3,278
    1,250
    Jul 7, 2010
    United States
    /dev/random
    How in the world does the PATA(IDE) disk locking work? I did some breif searching and all I cam up with was some very high level info about the lock modes and what can be done with them.
     
  2. FAST6191

    FAST6191 Techromancer

    pip Reporter
    23,554
    9,379
    Nov 21, 2005
    Most around here meet it when fiddling with softmods on original xboxes, stuff like http://www.xbox-scene.com/articles/lock-hdd.php . If the drive (hence the lists of them which work) and motherboard controller (most USB ones apparently do not hence guides there saying you need a motherboard) supports it then you can tell it to lock itself.

    You probably will not find much looking for IDE or ata or atapi or pata locking, go higher level and find IDE commands and work on from there.
    https://www.pjrc.com/tech/8051/ide/wesley.html#idecommands is a good start, though it does not include much on locking. http://wiki.osdev.org/PCI_IDE_Controller#Commands is also nice. http://www.retroleum.co.uk/electronics-articles/an-8-bit-ide-interface/ is good for a basic overview.
    http://www.t13.org/documents/uploadeddocuments/docs2006/d1699r3f-ata8-acs.pdf has a load of info but might well have been the high level stuff you spoke of.

    It all stems from "trusted computing", though technically that is a slight aside from the security features or a superset of it, which is both fancy DRM and theoretically something a bit more special. In hard drives not much of it aims for either fault tolerance or high availability or encryption really though which means we are back to fancy DRM and ensuring little in the way of user serviceability.
    https://www.trustedcomputinggroup.org/wp-content/uploads/TCG_SWG_SIIF_1_0-1.pdf is still pretty high level but does cover ATA (also SCSI and some SAS stuff, not to mention a bit on SATA as well so be careful if clicking around).

    ANSI INCITS 452-2008 is referenced above and though it is of the same line as the PDFs linked I will link another version
    http://www.t13.org/documents/uploadeddocuments/docs2008/d1699r6a-ata8-acs.pdf
    Page 49 (internal page numbering, not PDF which would be 93 if you are going by that) has good stuff and the tables after that cover more.

    If you mean how does it physically work then most halfway modern drives have a massive controller attached to the spinning rust so as to allow OS devs, hardware makers and whatnot to not have to worry about constantly checking, accounting for sector remapping and all that jazz. Said controller is often a fairly full computer when all is said and done (even SD cards have RAM and a processor these days) and they figured the security types would want something as well. To that end the modes you found (unlocked, locked and frozen, or if you prefer the numbered states that can result from various combinations of those and password limits and power state) will all do different things with different commands. With the controller being the gatekeeper for it all then no controller on your side, no play.
     
  3. gudenau
    OP

    gudenau Largely ignored

    Member
    3,278
    1,250
    Jul 7, 2010
    United States
    /dev/random
    Been looking into the XBox stuff, but this is more of a PC question as I am lookinginto making a USB adapter that could work. Thanks, I'll look at thise docs!