Date: Wed, 04 Sep 1996 18:24:14 -0700 From: Julian Elischer <julian@whistle.com> To: Bruce Evans <bde@zeta.org.au> 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 Message-ID: <322E2BBE.237C228A@whistle.com> References: <199609042046.GAA16994@godzilla.zeta.org.au>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?322E2BBE.237C228A>
