From owner-svn-src-all@FreeBSD.ORG Tue Dec 2 22:00:12 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FFB01065679; Tue, 2 Dec 2008 22:00:12 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.9.129]) by mx1.freebsd.org (Postfix) with ESMTP id C77AA8FC23; Tue, 2 Dec 2008 22:00:11 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 5536473098; Tue, 2 Dec 2008 22:48:21 +0100 (CET) Date: Tue, 2 Dec 2008 22:48:21 +0100 From: Luigi Rizzo To: John Baldwin Message-ID: <20081202214821.GA65840@onelab2.iet.unipi.it> References: <200812021457.mB2Evmha063418@svn.freebsd.org> <200812021425.00173.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200812021425.00173.jhb@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, Luigi Rizzo , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r185562 - head/sys/boot/i386/boot0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2008 22:00:12 -0000 On Tue, Dec 02, 2008 at 02:24:58PM -0500, John Baldwin wrote: > On Tuesday 02 December 2008 09:57:48 am Luigi Rizzo wrote: ... > > + a drive number of 0x00 (floppy, or USB in floppy emulation) is > > now accepted as valid. Previously, it was overridden with 0x80, > > meaning that the partition table coming from the media was > > used to access sectors on a possibly different media. > > You can revert to the previous mode building with -DCHECK_DRIVE, > > and you can always use the 'setdrv' option in boot0cfg > > I would flip this back to the original default. This was there to workaround > certain broken BIOSes that incorrectly specified a drive of 0x00 when you > booted from the hard drive (at least according to the comments). On such i don't have strong opinions on this, but i would really like to see some evidence on how relevant the original logic (and the comments in the code on broken BIOSes) are nowadays. That code dates back to 1998. On the contrary, I can point to a very current and widespread case with AMI Bioses which, in the "Auto" emulation mode for USB device, use %dl=0 for devices under 500MB or so; in this case the original boot0 did the wrong thing, because overriding with 0x80 causes reading from the wrong device. Granted, boot0cfg options can fix things for both cases. It's all a matter of what is the most reasonable default. cheers luigi