greatscottgadgets / facedancer

Implement your own USB device in Python, supported by a hardware peripheral such as Cynthion or GreatFET
BSD 3-Clause "New" or "Revised" License
785 stars 118 forks source link

64bit LBA support (> 2TiB disk support) #89

Closed antoinevg closed 8 months ago

antoinevg commented 8 months ago

Rebase of: #68

The current code only supports 32-bit LBAs and does not support 64-bit LBAs. Therefore, when a disk of 2 TiB or larger is connected, "READ CAPACITY" does not report the correct capacity. (However, if the disk is initialized with GPT, the current code can still be used.) To improve this, "READ CAPACITY (16)", "READ (16)", and "WRITE (16)" have been implemented.

214334351-07389d4d-6c99-4b29-9ce8-1afe759bf504