Date: Sat, 05 Dec 2009 18:42:50 +0900 (JST) From: Hiroki Sato <hrs@FreeBSD.org> To: jhb@FreeBSD.org Cc: freebsd-stable@FreeBSD.org Subject: Re: loader(8) readin failed on 7.2R and later including 8.0R Message-ID: <20091205.184250.201700943.hrs@allbsd.org> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
----Security_Multipart(Sat_Dec__5_18_42_50_2009_959)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit John Baldwin <jhb@freebsd.org> 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)----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091205.184250.201700943.hrs>