Date: Wed, 24 Oct 2007 12:49:55 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/boot/i386/libi386 biosdisk.c Message-ID: <200710241249.l9OCntTP078158@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
jhb 2007-10-24 12:49:55 UTC FreeBSD src repository Modified files: sys/boot/i386/libi386 biosdisk.c Log: Rework the read/write support in the bios disk driver some to cut down on duplicated code and support 64-bit LBAs for GPT. - The code to manage an EDD or C/H/S I/O request are now in their own routines. The EDD routine now handles a full 64-bit LBA instead of truncating LBAs to the lower 32-bits. (MBRs and BSD labels only have 32-bit LBAs anyway, so the only LBAs ever passed down were 32-bit). - All of the bounce buffer and retry logic duplicated in bd_read() and bd_write() are merged into a single bd_io() routine that takes an extra direction argument. bd_read() and bd_write() are now simple wrappers around bd_io(). - If a disk supports EDD then always use it rather than only using it if the cylinder is > 1023. Other parts of the boot code already do something similar to this. Also, GPT just uses LBAs, so for a GPT disk it's probably best to ignore C/H/S completely. Always using EDD when it is supported by a disk is an easy way to accomplish this. MFC after: 1 week Revision Changes Path 1.51 +114 -198 src/sys/boot/i386/libi386/biosdisk.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200710241249.l9OCntTP078158>