From owner-cvs-sys Wed Sep 4 18:30:04 1996 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id SAA12768 for cvs-sys-outgoing; Wed, 4 Sep 1996 18:30:04 -0700 (PDT) Received: from alpo.whistle.com (s205m1.whistle.com [207.76.205.1]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id SAA12733; Wed, 4 Sep 1996 18:29:31 -0700 (PDT) Received: from current1.whistle.com (current1.whistle.com [207.76.205.22]) by alpo.whistle.com (8.7.5/8.7.3) with SMTP id SAA01695; Wed, 4 Sep 1996 18:25:28 -0700 (PDT) Message-ID: <322E2BBE.237C228A@whistle.com> Date: Wed, 04 Sep 1996 18:24:14 -0700 From: Julian Elischer Organization: Whistle Communications X-Mailer: Mozilla 3.0b6 (X11; I; FreeBSD 2.2-CURRENT i386) MIME-Version: 1.0 To: Bruce Evans CC: cvs-all@freefall.freebsd.org, CVS-committers@freefall.freebsd.org, cvs-sys@freefall.freebsd.org, julian@freefall.freebsd.org Subject: Re: cvs commit: src/sys/i386/boot/biosboot Makefile boot.c boot2.S References: <199609042046.GAA16994@godzilla.zeta.org.au> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-cvs-sys@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Bruce Evans wrote: > > > Modified: sys/i386/boot/biosboot Makefile boot.c boot2.S > > Log: > > 3 changes: > > 1/ Makefile: the maximum size for boot2 is 7.5K not 7K, > > so don't complain until it reaches THAT size.. > > newfs leaves 8K and boot 1 is 512k. leaving 7.5K becasue the disklabel > > is considered to part of the boot2 file. > > Wrong. The limit is the size of a track on the boot media. It's 18 > sectors for 1440K floppies, 15 sectors for 1200K floppies, and 9 sectors > for 360K floppies (not supported). start.S always loads LOADSZ = 15, > so a larger size currently won't even work on 1440K floppies. To load > more, the i/o needs to be split up into track-size pieces. This requires > knowing the track size. The track size can be obtained using the BIOS > call in get_diskinfo(), unless the BIOS call fails... Ok, so who broke this? I'm quite sure that when I wrote it I set it up so that it would read an 8K chunk of data regardless of the tracksize! I'm guilty of thinking that what I did 4 years ago was still valid.. I'll back this out, but there should be a better answer.. there is 8k left on the device by newfs so we're wasting some of it.. > > > 3/ boot.c: > > Move the parsing of the command line into the > > place it's called for clarity.. alsoi comment it a bit and clean it > > up a bit.. for some reason this seems ot have made it a little > > larger, but I can't work out why.. maybe bruce might have ideas? > > compensated for by shrinkage elsewhere.. > > getbootdev() was one of the few places in boot/*/* that was already > clean (except boothowto is poorly named). I had to allow the default string to be parsed for args as well so I eneded to change some things.. I am considering backing out part of this too as I have been unable to convince gcc to generate smaller code.. $%& it's anoying that it's optimiser can't catch these things.. > > I once tried inlining it too :-). This made it larger so I didn't > commit it. gcc turns out to generate fairly space-efficient code for > all the indirections (*howto) and extremely space-inefficient code > for changing the loadflags global directly. AH that's the answer, I'll make them indirections... if this works I'll checkin a smaller working version, if not I'll un-inline it again.. hmm ok I can make the code smaller, but the filesize doesn't shrink.... wierd.. I'll check this in and continue to try to figure out what's up.. I'm checking it in under a branch JULIAN_HACK in the main branch I'm mostly reverting to the original.. I just don't understand why the smaller .o size is not reflected in the over-all size.. > > > Compile with CFLAGS+= -Wa,-al to see the instruction sizes. NEETO, I've been looking for that option, great.. > > Bruce