Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for AHCI 4K sectors #60

Open
IanSeyler opened this issue Nov 15, 2022 · 0 comments
Open

Support for AHCI 4K sectors #60

IanSeyler opened this issue Nov 15, 2022 · 0 comments

Comments

@IanSeyler
Copy link
Member

The AHCI driver only uses 512B sectors. ID should be checked to see if support for larger sectors is supported.

Check bit 12 of word 106 first to see if its set. If so, check words 117-118.

From the ATA8 Command Set, IDENTIFY returns the following:

7.17.7.73 Word 106: Physical sector size / Logical Sector Size
If bit 14 of word 106 is set to one and bit 15 of word 106 is cleared to zero, the contents of word 106 contain valid information. If not, information is not valid in this word.
Bit 13 of word 106 shall be set to one to indicate that the device has more than one logical sector per physical sector.
Bit 12 of word 106 shall be set to 1 to indicate that the device has been formatted with a logical sector size larger than 256 words. Bit 12 of word 106 shall be cleared to 0 to indicate that words 117-118 are invalid and that the logical sector size is 256 words.
Bits (11:4) of word 106 are reserved.
Bits (3:0) of word 106 indicate the size of the device physical sectors in power of two logical sectors.
Examples:
Bits (3:0): 0 = 1 logical sector per physical sector
Bits (3:0): 1 = 2 logical sector per physical sector
Bits (3:0): 2 = 4 logical sector per physical sector
Bits (3:0): 3 = 8 logical sector per physical sector

7.17.7.78 Words 117-118: Logical Sector Size
Words 117,118 indicate the size of device logical sectors in words. The value of words 117,118 shall be equal to or greater than 256. The value in words 117,118 shall be valid when word 106 bit 12 is set to 1. All logical sectors on a device shall be 117,118 words long.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant