From: Xuebing Wang <xbing6@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Latest u-boot release on BeagleBone Black for FreeBSD
Date: Wed, 07 May 2014 10:09:19 +0800 [thread overview]
Message-ID: <536995CF.4060404@gmail.com> (raw)
In-Reply-To: <1399203211.1994.25.camel@yellow>
On 05/04/2014 07:33 PM, Jeroen Hofstee wrote:
> Hello Xuebing, (freebsd-arm added on cc),
>
> On di, 2014-04-08 at 16:52 +0800, Xuebing Wang wrote:
>> Hi u-boot community,
>>
>> I am trying to port u-boot (release u-boot-2014.04-rc3.tar.bz2) to
>> FreeBSD on BeagleBone Black.
>>
>> In FreeBSD, there is a u-boot loader (named ubldr), which can call
>> u-boot API to get fdt (Flat Device Tree) data.
>>
>> I have to comment out below 3 lines, in order to get correct fdt data in
>> FreeBSD ubldr from u-boot. Would you please advice what is the best way
>> to fix this?
>>
>> In file common/env_common.c:
>> const uchar *env_get_addr(int index)
>> {
>> // if (gd->env_valid)
>> // return (uchar *)(gd->env_addr + index);
>> // else
>> return &default_environment[index];
>> }
>>
> Assuming that you checked that your environment is valid you might be
> facing the fact that the gd pointer is corrupted. gd is a pointer to the
> "global data" and used for storing globals which are available before
> and after relocation. On (32bit) ARM this value used to be stored in
> register r8 but moved to r9 (llvm cannot reserve an arbitrary register,
> but can reserve r9 for platform specific usage). If ubldr uses r9 you
> end up with a invalid gd pointer when calling back into u-boot. ubldr
> now reserves r8 and r9 so a recent version should work fine on an older
> U-boot as well as current master.
>
> Can you check the latest ubldr?
Hi Jeroen,
Thanks for your response.
1) Today, I tested ubldr in the snapshot build
FreeBSD-11.0-CURRENT-arm-armv6-BEAGLEBONE-20140428-r265054.img.bz2
without commenting out those 3 lines, I still can not get "fdt ls" in
ubldr command line.
After commenting out those 3 lines and rebuild u-boot, I can get "fdt
ls" in ubldr command line.
Note: All my previous test was based on
FreeBSD-11.0-CURRENT-arm-armv6-BEAGLEBONE-20140323-r263665.img.bz2
2) Would you please point to me which revision that reserves both r8 and r9?
Thanks.
> Regards,
> Jeroen
>
>
>
--
Thanks,
Xuebing Wang
next prev parent reply other threads:[~2014-05-07 2:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-08 8:52 [U-Boot] Latest u-boot release on BeagleBone Black for FreeBSD Xuebing Wang
2014-05-04 11:33 ` Jeroen Hofstee
2014-05-07 2:09 ` Xuebing Wang [this message]
2014-05-07 14:15 ` Ian Lepore
2014-05-07 15:02 ` Tim Kientzle
2014-05-07 15:17 ` Tim Kientzle
-- strict thread matches above, loose matches on Subject: below --
2014-04-07 7:16 Xuebing Wang
2014-04-08 13:00 ` Ian Lepore
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=536995CF.4060404@gmail.com \
--to=xbing6@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.