From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JCIxV-0008Ph-7Z for mharc-grub-devel@gnu.org; Tue, 08 Jan 2008 13:13:53 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JCIxU-0008PE-9S for grub-devel@gnu.org; Tue, 08 Jan 2008 13:13:52 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JCIxS-0008O0-Mw for grub-devel@gnu.org; Tue, 08 Jan 2008 13:13:51 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JCIxS-0008Nr-IF for grub-devel@gnu.org; Tue, 08 Jan 2008 13:13:50 -0500 Received: from c60.cesmail.net ([216.154.195.49]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1JCIxS-00034H-BA for grub-devel@gnu.org; Tue, 08 Jan 2008 13:13:50 -0500 Received: from unknown (HELO relay.cesmail.net) ([192.168.1.81]) by c60.cesmail.net with ESMTP; 08 Jan 2008 13:13:49 -0500 Received: from [192.168.1.21] (static-72-92-88-10.phlapa.fios.verizon.net [72.92.88.10]) by relay.cesmail.net (Postfix) with ESMTP id 02638618FE1 for ; Tue, 8 Jan 2008 13:13:48 -0500 (EST) From: Pavel Roskin To: The development of GRUB 2 In-Reply-To: <20080108105057.GA24604@thorin> References: <20080108105057.GA24604@thorin> Content-Type: text/plain Date: Tue, 08 Jan 2008 13:13:48 -0500 Message-Id: <1199816028.30874.9.camel@dv> Mime-Version: 1.0 X-Mailer: Evolution 2.12.2 (2.12.2-2.fc8) Content-Transfer-Encoding: 7bit X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: contradiction in boot/i386/pc/boot.S X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jan 2008 18:13:52 -0000 On Tue, 2008-01-08 at 11:50 +0100, Robert Millan wrote: > However, if 0x80 is really "the only possible boot drive", that means the > test is pointless and can be replaced with: > > boot_drive_check: > jmp 1f /* grub-setup may overwrite this jump */ > movb $0x80, %dl > 1: > > So AFAICT either the comment or the code needs adjusting. I think the code allows simplification regardless of what the comment says. Actually, the shortest solution (and we really want to be short in the bootsector) would be to only have NOPs there without any jumps, and have grub-setup overwrite the NOPs with "movb $0x80, %dl" for hard drive installations. Or the other way around - have "movb $0x80, %dl" in the code and have grub-setup overwrite it with NOPs if installing not on a hard drive. And by the way, I would remove the "boot_drive_check" label where it is now and rename "real_start" to it, moving that "movb" there. That would save a us label, making the code easier to read. -- Regards, Pavel Roskin