From owner-cvs-all Sat Dec 14 21:34:54 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BE5D437B401; Sat, 14 Dec 2002 21:34:52 -0800 (PST) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id F3F4D43EC2; Sat, 14 Dec 2002 21:34:51 -0800 (PST) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.6/8.12.3) with ESMTP id gBF5YhuB096068; Sat, 14 Dec 2002 22:34:51 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sat, 14 Dec 2002 22:34:20 -0700 (MST) Message-Id: <20021214.223420.98776954.imp@bsdimp.com> To: peter@wemm.org Cc: phk@FreeBSD.org, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/boot/i386/boot2 Makefile boot1.s From: "M. Warner Losh" In-Reply-To: <20021215005215.2476D2A7EA@canning.wemm.org> References: <200212141944.gBEJiDWS027256@repoman.freebsd.org> <20021215005215.2476D2A7EA@canning.wemm.org> X-Mailer: Mew version 2.1 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message: <20021215005215.2476D2A7EA@canning.wemm.org> Peter Wemm writes: : Poul-Henning Kamp wrote: : > Modified files: : > sys/boot/i386/boot2 Makefile boot1.s : > Log: : > Employ the unused bytes after the disklabel in the second sector. This mak : es : > it possible to make UFS1_ONLY and UFS2_ONLY versions which fit inside the : > traditional 16 sectors. : > : > UFS1_AND_UFS2 still needs another 150 bytes to work, and that is probably : > not within our reach, ever. : : That sounds like a challenge! :-) : http://people.freebsd.org/~peter/boot2.diff : : That is a WIP and COMPLETELY UNTESTED patch to turn on UFS1_AND_UFS2 : and it ends up with 7 bytes free. I wouldn't install this on anything : but a spare floppy disk yet. I found two minor improvements that can be made on this diff, which I've sent to Peter privately. First, why do we have "wd" and " " as device names? Can't we just remove them? There's no wd driver in i386 anymore (pc98 has one, but uses different boot2). I have no clue what purpose the " " device served, except maybe as a way to patch something in later that we never seem to have patched in. Elimination saves 20 bytes. Second, you can rearrange getstr a little and save 4 more bytes by using continue in two places rather than break and eliminating the if before the putchar. This would bring Peter's diffs up to 31 bytes free. I'm sure some careful study would increase the number. Also, a lot more comments should be added in places where we're clever in case future compilers generate bloatified code and others need to read the code for comprehension. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message