Page MenuHomeFreeBSD

Sanity check BIOS EDD CHS numbers before using them.
ClosedPublic

Authored by delphij on Aug 4 2018, 8:53 AM.
Tags
None
Referenced Files
F156593403: D16588.id46280.diff
Thu, May 14, 11:05 PM
F156593366: D16588.id46280.diff
Thu, May 14, 11:05 PM
F156504035: D16588.diff
Thu, May 14, 5:17 AM
Unknown Object (File)
Tue, May 12, 9:41 AM
Unknown Object (File)
Tue, May 12, 8:44 AM
Unknown Object (File)
Sat, May 9, 12:04 PM
Unknown Object (File)
Fri, May 8, 3:53 PM
Unknown Object (File)
Mon, Apr 27, 12:51 PM
Subscribers

Details

Reviewers
cy
tsoome
Summary

In r337271, we limited the sector number to the lower of calculated
number and CHS based number. However, on some systems, BIOS would
report 0 in CHS fields, making the system to think there is 0 sectors.

Add a check before comparing the calculated total with bd_sectors.

Test Plan

boot

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 18577
Build 18272: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Aug 4 2018, 11:12 AM

The above change allowed a kernel to load on my laptop[[ https://wiki.freebsd.org/Laptops/Dell_Precision_M4800?highlight=(\bCategoryLaptop\b)| Dell Precision M4800 ]] after updating from r337232 -> r337285; without the change, the kernel was unloadable ("Can't load kernel") and I didn't even get a loader menu (e.g., to facilitate loading a different kernel).

Referenced wrong review. This was committed as rS337317.