K 10 svn:author V 6 tsoome K 8 svn:date V 27 2017-02-06T18:29:43.302237Z K 7 svn:log V 1246 loader: biosdisk fix for 2+TB disks This fix is implementing partition based boundary check for disk IO and updates disk mediasize (if needed), based on information from partition table. As it appeared, the signed int based approach still has corner cases, and the wrapover based behavior is non-standard. The idea for this fix is based on two assumptions: The bug about media size is hitting large (2+TB) disks, lesser disks hopefully, are not affected. Large disks are using GPT (which does include information about disk size). Since our concern is about boot support and boot disks are partitioned, implementing partition boundaries based IO verification should make the media size issues mostly disappear. However, for large disk case, we do have the disk size available from GPT table. If non-GPT cases will appear, we still can make approximate calculation about disk size based on defined partition(s), however, this is not the objective of this patch, and can be added later if there is any need. This patch does implement disk media size adjustment (if needed) in bd_open(), and boundary check in bd_realstrategy(). Reviewed by: allanjude Approved by: allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D8595 END