From owner-freebsd-stable@FreeBSD.ORG Thu Sep 28 10:30:26 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D828B16A4E0; Thu, 28 Sep 2006 10:30:26 +0000 (UTC) (envelope-from ru@rambler-co.ru) Received: from relay0.rambler.ru (relay0.rambler.ru [81.19.66.187]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3561543D82; Thu, 28 Sep 2006 10:30:23 +0000 (GMT) (envelope-from ru@rambler-co.ru) Received: from relay0.rambler.ru (localhost [127.0.0.1]) by relay0.rambler.ru (Postfix) with ESMTP id 0C2116333; Thu, 28 Sep 2006 14:30:21 +0400 (MSD) Received: from edoofus.park.rambler.ru (unknown [81.19.65.108]) by relay0.rambler.ru (Postfix) with ESMTP id 5E3746221; Thu, 28 Sep 2006 14:29:00 +0400 (MSD) Received: (from ru@localhost) by edoofus.park.rambler.ru (8.13.8/8.13.8) id k8SAT0dg038127; Thu, 28 Sep 2006 14:29:00 +0400 (MSD) (envelope-from ru) Date: Thu, 28 Sep 2006 14:29:00 +0400 From: Ruslan Ermilov To: Danny Braniss Message-ID: <20060928102900.GC4708@rambler-co.ru> References: <20060927223310.GB35467@rambler-co.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/e2eDi0V/xtL+Mc8" Content-Disposition: inline In-Reply-To: <20060927223310.GB35467@rambler-co.ru> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: No virus found Cc: Maxim Sobolev , freebsd-stable@freebsd.org, John Baldwin Subject: Re: 6.2-PRERELEASE/amd64 boot kernel.gz failes X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Sep 2006 10:30:27 -0000 --/e2eDi0V/xtL+Mc8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 28, 2006 at 02:33:10AM +0400, Ruslan Ermilov wrote: > I can confirm this: RELENG_6 doesn't pxeboot when /boot/kernel/kernel > is gzipped. In my case, it hangs just after loading a loader.conf file. > I've also verified that loading gzipped kernels/modules works on > 7-CURRENT/i386. So it's either loader vs. pxeboot issue (unlikely, > since pxeboot reuses the loader binary), or i386 vs. amd64 issue > (unlikely as well as amd64 reuses the i386 boot code), or more likely > because some changes were not MFCed. Perhaps this one: >=20 > : sobomax 2005-12-19 09:00:11 UTC > :=20 > : FreeBSD src repository > :=20 > : Modified files: > : sys/boot/i386/libi386 Makefile biosdisk.c biospnp.c biossmap.c=20 > : i386_copy.c=20 > : Log: > : Long-long time ago, when the trees were large and memory expensive am= ount of > : memory directly available to loader(8) and friends was limited to 640= K on i386. > : Those times have passed long time ago and now loader(8) can directly = access > : up to 4GB of RAM at least theoretically. At the same time, there are = several > : places where it's assumed that malloc() will only allocate memory wit= hin > : first megabyte. > : =20 > : Remove that assumption by allocating appropriate bounce buffers for B= IOS > : calls on stack where necessary. > : =20 > : This allows using memory above first megabyte for heap if necessary. > : =20 > : Revision Changes Path > : 1.39 +3 -0 src/sys/boot/i386/libi386/Makefile > : 1.46 +10 -17 src/sys/boot/i386/libi386/biosdisk.c > : 1.10 +1 -1 src/sys/boot/i386/libi386/biospnp.c > : 1.4 +3 -2 src/sys/boot/i386/libi386/biossmap.c > : 1.11 +6 -22 src/sys/boot/i386/libi386/i386_copy.c >=20 > I'll narrow this down tomorrow if noone bites me while I sleep. :-) >=20 Yes, this and the follow-up commit plus the following diff make pxeboot work with gzipped files. %%% Index: i386/loader/main.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/sys/boot/i386/loader/main.c,v retrieving revision 1.37 diff -u -r1.37 main.c --- i386/loader/main.c 4 Aug 2006 07:56:32 -0000 1.37 +++ i386/loader/main.c 28 Sep 2006 09:06:02 -0000 @@ -91,7 +91,7 @@ */ bios_getmem(); =20 -#ifdef LOADER_BZIP2_SUPPORT +#if 1 heap_top =3D PTOV(memtop_copyin); memtop_copyin -=3D 0x300000; heap_bottom =3D PTOV(memtop_copyin); %%% Here's the loader "heap" command output on the same machine: : 6.x /boot/loader (unpatched): : OK heap : Active Allocations: 803/2173 : 274432 bytes reserved 194432 bytes allocated : 65 fragments (30016 bytes fragmented) : heap base at 0x404c0, top at 0x834c0 :=20 : 7.x pxeboot loader (unpatched): : OK heap : Active Allocations: 896/2209 : 229376 bytes reserved 196728 bytes allocated : 71 fragments (18992 bytes fragmented) : heap base at 0x404c0, top at 0x784c0, upper limit at 0x9fc00 :=20 : 7.x pxeboot loader (patched): : OK heap : Active Allocations: 896/2209 : 229376 bytes reserved 196728 bytes allocated : 71 fragments (18992 bytes fragmented) : heap base at 0xfbce6000, top at 0xfbd1e000, upper limit at 0xfbfe6000 Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --/e2eDi0V/xtL+Mc8 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFG6PsqRfpzJluFF4RAgjvAJ9pjVsW+cIAawyQDg9qStl988jo8ACfXQLX MO/zqToNwV5k/KgI43g52b0= =YDFn -----END PGP SIGNATURE----- --/e2eDi0V/xtL+Mc8--