Skip to content

mbr: mask the sector bits out of the CHS cylinder decode - #31

Open
samoht wants to merge 1 commit into
mirage:masterfrom
samoht:fix-chs-cylinder-decode
Open

samoht wants to merge 1 commit into
mirage:masterfrom
samoht:fix-chs-cylinder-decode

Conversation

@samoht

@samoht samoht commented Jun 25, 2026

Copy link
Copy Markdown
Member

Geometry.unmarshal computed cylinders = (y lsl 2) lor z, folding the sector bits (y bits 5-0) into the cylinder, so a cylinder reads back wrong (e.g. 700 as 764). Mask y to its high two bits first. The sector decode (y land 0x3f) is unchanged; LBA is unaffected.

Geometry.unmarshal computed cylinders = (y lsl 2) lor z, folding the sector bits (y bits 5-0) into the cylinder, so a cylinder reads back wrong (e.g. 700 as 764). Mask y to its high two bits first. The sector decode (y land 0x3f) is unchanged; LBA is unaffected.
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

Successfully merging this pull request may close these issues.

1 participant