From owner-freebsd-arm@FreeBSD.ORG Fri Jan 16 19:10:55 2015 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3A5712DE for ; Fri, 16 Jan 2015 19:10:55 +0000 (UTC) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF9E7F8 for ; Fri, 16 Jan 2015 19:10:54 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1YCCIG-0004mx-Vh; Fri, 16 Jan 2015 19:10:53 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t0GJApTS002485; Fri, 16 Jan 2015 12:10:51 -0700 (MST) (envelope-from ian@freebsd.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+4KwdJhr3sgyv9tcBOxvUW Message-ID: <1421435451.14601.309.camel@freebsd.org> Subject: Re: OMAP4 broken with r277215 From: Ian Lepore To: Scott Ellis Date: Fri, 16 Jan 2015 12:10:51 -0700 In-Reply-To: <1421434127781-5981309.post@n5.nabble.com> References: <1421434127781-5981309.post@n5.nabble.com> Content-Type: multipart/mixed; boundary="=-rAwItr/nFANCf1CsU1Vz" X-Mailer: Evolution 3.12.8 FreeBSD GNOME Team Port Mime-Version: 1.0 Cc: freebsd-arm@freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 19:10:55 -0000 --=-rAwItr/nFANCf1CsU1Vz Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Fri, 2015-01-16 at 11:48 -0700, Scott Ellis wrote: > I'm having problems booting systems built with r277215 on my > OMAP4 boards. I haven't tried any other ARM boards. > > Systems built with r277214 are fine. > > r277215 committed some changes to loader for Xen multiboot support. > > I'm pretty sure the panic is coming from uboot_vm_translate() in > sys/boot/uboot/lib/copy.c > > Rebuilding with some debugging now to track down the caller, but > maybe someone has already fixed this. > > The boot hangs like this > > U-Boot SPL 2014.10 (Jan 16 2015 - 07:01:57) > OMAP4430 ES2.3 > reading u-boot.img > reading u-boot.img > > > U-Boot 2014.10 (Jan 16 2015 - 07:01:57) > > CPU : OMAP4430 ES2.3 > Board: duovero > I2C: ready > DRAM: 1 GiB > WARNING: Caches not enabled > MMC: OMAP SD/MMC: 0 > reading u-boot.env > > ** Unable to read "u-boot.env" from mmc0:1 ** > Using default environment > > Net: smc911x-0 > Warning: smc911x-0 using MAC address from net device > > reading uEnv.txt > ** Unable to read file uEnv.txt ** > Hit any key to stop autoboot: 0 > Booting from: mmc 0 ubldr > reading ubldr > 262362 bytes read in 26 ms (9.6 MiB/s) > ## Starting application at 0x88000074 ... > Consoles: U-Boot console > Compatible U-Boot API signature found @bef562a8 > > FreeBSD/armv6 U-Boot loader, Revision 1.2 > (root@fbsd, Fri Jan 16 11:59:13 EST 2015) > > DRAM: 1024MB > MMC Device 1 not found > MMC Device 1 not found > Number of U-Boot devices: 2 > U-Boot env: loaderdev='mmc 0' > Found U-Boot device: disk > Checking unit=0 slice= partition=... good. > / > /boot/kernel/kernel data=0x618688+0x43978 syms=[0x4+0x5f030+0x4+0x5a3d5] > panic: Address offset 0x40000001 bigger than size 0x40000000 > > --> Press a key on the console to reboot <-- Yeah, it's broken. A fix will be committed after a make universe completes, I'll attach the patch so you can get working again until then. -- Ian --=-rAwItr/nFANCf1CsU1Vz Content-Disposition: inline; filename="ubldrfix.diff" Content-Type: text/x-patch; name="ubldrfix.diff"; charset="us-ascii" Content-Transfer-Encoding: 7bit diff --git a/sys/boot/common/load_elf.c b/sys/boot/common/load_elf.c index 6860815..4c801e9 100644 --- a/sys/boot/common/load_elf.c +++ b/sys/boot/common/load_elf.c @@ -77,7 +77,7 @@ static int __elfN(lookup_symbol)(struct preloaded_file *mp, elf_file_t ef, const static int __elfN(reloc_ptr)(struct preloaded_file *mp, elf_file_t ef, Elf_Addr p, void *val, size_t len); static int __elfN(parse_modmetadata)(struct preloaded_file *mp, elf_file_t ef, - u_int64_t p_start, u_int64_t p_end); + Elf_Addr p_start, Elf_Addr p_end); static symaddr_fn __elfN(symaddr); static char *fake_modname(const char *name); @@ -300,7 +300,7 @@ __elfN(loadimage)(struct preloaded_file *fp, elf_file_t ef, u_int64_t off) Elf_Size size; u_int fpcopy; Elf_Sym sym; - u_int64_t p_start, p_end; + Elf_Addr p_start, p_end; dp = NULL; shdr = NULL; @@ -712,7 +712,7 @@ __elfN(load_modmetadata)(struct preloaded_file *fp, u_int64_t dest) Elf_Shdr *sh_data[2]; char *shstrtab = NULL; size_t size; - u_int64_t p_start, p_end; + Elf_Addr p_start, p_end; bzero(&ef, sizeof(struct elf_file)); ef.fd = -1; @@ -820,7 +820,7 @@ out: int __elfN(parse_modmetadata)(struct preloaded_file *fp, elf_file_t ef, - u_int64_t p_start, u_int64_t p_end) + Elf_Addr p_start, Elf_Addr p_end) { struct mod_metadata md; #if (defined(__i386__) || defined(__powerpc__)) && __ELF_WORD_SIZE == 64 --=-rAwItr/nFANCf1CsU1Vz--