Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Jan 2015 12:10:51 -0700
From:      Ian Lepore <ian@freebsd.org>
To:        Scott Ellis <scott@jumpnowtek.com>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: OMAP4 broken with r277215
Message-ID:  <1421435451.14601.309.camel@freebsd.org>
In-Reply-To: <1421434127781-5981309.post@n5.nabble.com>
References:  <1421434127781-5981309.post@n5.nabble.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--=-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=<auto> partition=<auto>... 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--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1421435451.14601.309.camel>