From owner-freebsd-stable@FreeBSD.ORG Sat Dec 5 09:43:28 2009 Return-Path: Delivered-To: freebsd-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4CCC1106566B; Sat, 5 Dec 2009 09:43:28 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (gatekeeper-int.allbsd.org [IPv6:2001:2f0:104:e002::2]) by mx1.freebsd.org (Postfix) with ESMTP id 72FFD8FC0C; Sat, 5 Dec 2009 09:43:27 +0000 (UTC) Received: from delta.allbsd.org (p3177-ipbf416funabasi.chiba.ocn.ne.jp [123.225.92.177]) (authenticated bits=128) by mail.allbsd.org (8.14.3/8.14.3) with ESMTP id nB59h3sD035789; Sat, 5 Dec 2009 18:43:14 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (alph.allbsd.org [192.168.0.10]) (authenticated bits=0) by delta.allbsd.org (8.13.4/8.13.4) with ESMTP id nB59gr6L058614; Sat, 5 Dec 2009 18:43:02 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Sat, 05 Dec 2009 18:42:50 +0900 (JST) Message-Id: <20091205.184250.201700943.hrs@allbsd.org> To: jhb@FreeBSD.org From: Hiroki Sato In-Reply-To: <200912041734.24016.jhb@freebsd.org> References: <20091204.062008.155444535.hrs@allbsd.org> <200912041035.59173.jhb@freebsd.org> <200912041734.24016.jhb@freebsd.org> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.3rc1 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Sat_Dec__5_18_42_50_2009_959)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.95.3 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.3 (mail.allbsd.org [133.31.130.32]); Sat, 05 Dec 2009 18:43:19 +0900 (JST) X-Spam-Status: No, score=-5.0 required=13.0 tests=AWL,BAYES_00, CONTENT_TYPE_PRESENT, FAKEDWORD_ONE, FAKEDWORD_VERTICALLINE, SPF_SOFTFAIL, X_MAILER_PRESENT autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on gatekeeper.allbsd.org Cc: freebsd-stable@FreeBSD.org Subject: Re: loader(8) readin failed on 7.2R and later including 8.0R 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: Sat, 05 Dec 2009 09:43:28 -0000 ----Security_Multipart(Sat_Dec__5_18_42_50_2009_959)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit John Baldwin wrote in <200912041734.24016.jhb@freebsd.org>: jh> On Friday 04 December 2009 10:35:59 am John Baldwin wrote: jh> > So memtop_copyin would start off as 0xf00000 but would end up as 0xc00000, jh> > and since the kernel starts at 4MB, I think that only leaves about 8MB for jh> > the kernel. Probably the loader needs to be more intelligent about using jh> > high memory for malloc by using the largest region > 1MB but < 4GB for jh> > malloc() instead of stealing memory from bios_extmem in the SMAP case. jh> > Try the attached patch which tries to make the loader use better smarts jh> > when picking a memory region for the heap (warning, I haven't tested it jh> > myself yet). jh> jh> Use the updated patch (actually tested in qemu) instead. Thanks! I applied your patch and tried loading an 8.0R kernel (without LOADER_NO_GPT_SUPPORT=yes). The "elf32_loadimage: read failed" error message disappeared: OK load /boot/kernel.N/kernel /boot/kernel.N/kernel text=0x8db9a4 data=0xdd134+0xa5e84 syms=[0x4+0x99390+0x4+0xd2201 elf32_loadimage: could not read symbols - skipped! OK A summary so far is: 1) a <8MB 7.1R kernel + stock 8.0R loader 2a) a >8MB 8.0R kernel + stock 8.0R loader 2b) a >8MB 8.0R kernel + 8.0R loader with LOADER_NO_GPT_SUPPORT=yes 2c) a >8MB 8.0R kernel + loader with your patch 3a) a <8MB 8.0R kernel + stock 8.0R loader 3b) a <8MB 8.0R kernel + 8.0R loader with LOADER_NO_GPT_SUPPORT=yes 3c) a <8MB 8.0R kernel + loader with your patch loading text loading syms boot 1) OK OK OK 2a) "readin failed" - - 2b) OK "skipped!" NG 2c) OK "skipped!" NG 3a) not tried yet 3b) OK OK NG 3c) OK OK NG Loading syms sections still fails for the large kernel. The "boot=NG" means it got stuck after l_exec() in boot.c and before cninit() in i386/machdep.c as far as I can check by inserting printf(). So the cause of that is something in the kernel, I guess. Hm. One thing something special of that box is that it has four quad-hme PCI cards. I will try removing them and see if it changes something or not. -- Hiroki ----Security_Multipart(Sat_Dec__5_18_42_50_2009_959)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEABECAAYFAksaKxoACgkQTyzT2CeTzy23DwCgyVD8h+hTuu5cA1Fkrm8YF3QI OFMAn1GHUR+npWtYmbMH/o1IB77MKJxK =UJny -----END PGP SIGNATURE----- ----Security_Multipart(Sat_Dec__5_18_42_50_2009_959)----