Date: Thu, 18 Jun 2015 07:29:41 -0600 From: Ian Lepore <ian@freebsd.org> To: Maxim Sobolev <sobomax@sippysoft.com> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn: head/sys/boot: common uboot/common uboot/lib Message-ID: <1434634181.1415.88.camel@freebsd.org> In-Reply-To: <CAH7qZfvUwztY=2dNDYNgLvJE2_qUVYsCw-0Nk=SfJFQn=NxOmw@mail.gmail.com> References: <CAH7qZfts5k_4kOvkdsACNQdbqGd1Gu=m7%2BF1MO9FLgeQUOWEsg@mail.gmail.com> <CAH7qZfvUwztY=2dNDYNgLvJE2_qUVYsCw-0Nk=SfJFQn=NxOmw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 2015-06-13 at 14:53 -0700, Maxim Sobolev wrote: > Just in case, my debug code and proposed fix can be found here: > > https://github.com/sobomax/FreeBSD.arm/commit/48509790f82352cb455d0f5029291b917afb985b > > Unless I hear from you I am going to push it into the repository in the > next few days (modulo printf() debug stuff). > > Thanks! > > On Thu, Jun 11, 2015 at 6:21 AM, Maxim Sobolev <sobomax@freebsd.org> wrote: > > > Hi Ian, there is some issues with that commit that I've run into when > > trying to get FreeBSD booting on my Xilinx Zinq 7010-based board. > > Basically, the instructions we have on Wiki suggests that the ubldr loading > > address to be 0x100000. That makes ubldr panic with "not enough DRAM" > > error. I've added some debug code into the for loop, you can find the > > output below. As you can see the code is not handling the case when ubldr > > is below 2MB and as such sblock == eubldr. On top of that, this_block and > > this_size may be left uninitialized causing loading at some random address > > and panicing then, instead of DRAM is too small panic. > > > > kernel_addr=0x100000 > > ubldr_addr=0x100000 > > dtb_addr=0x1000 > > dtb_name=system.dtb > > uenvcmd=echo Booting FreeBSD from SD...; mmcinfo && fatload mmc 0 > > ${ubldr_addr} ubldr && fatload mmc 0 ${dtb_addr} ${dtb_name} && fdt addr > > ${dtb_addr} && bootelf ${ubldr_addr} > > I'm sorry for the long delay in responding to this, I'm enmeshed in a crazy-deadline project at $work. To tell you the truth, I had a feeling when I was working on that code that it was "too simple". When I've solved the "do these blocks overlap" problem before the code always ended up looking a lot more like what you propose. I think you should commit your changes, they look more correct than my code. -- Ian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1434634181.1415.88.camel>