[int13] Improve geometry guessing for unaligned partitions
authorMichael Brown <mcb30@ipxe.org>
Sun, 26 Mar 2017 18:03:50 +0000 (21:03 +0300)
committerMichael Brown <mcb30@ipxe.org>
Sun, 26 Mar 2017 18:03:50 +0000 (21:03 +0300)
commitebceb8ad8a5c3ad58ecbe513174c3620592d5976
tree1afadcb3273eb45a10832dba97e02434834fff36
parentbb5a54b79a414082d0b39d478a8b3332c56d68e5
[int13] Improve geometry guessing for unaligned partitions

Some partition tables have partitions that are not aligned to a
cylinder boundary, which confuses the current geometry guessing logic.

Enhance the existing logic to ensure that we never reduce our guesses
for the number of heads or sectors per track, and add extra logic to
calculate the exact number of sectors per track if we find a partition
that starts within cylinder zero.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/arch/x86/interface/pcbios/int13.c