From: Thomas Chou <thomas@wytron.com.tw>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] Fix board init code to use a valid C runtime environment
Date: Thu, 12 Nov 2015 16:28:38 +0800 [thread overview]
Message-ID: <56444DB6.3020108@wytron.com.tw> (raw)
In-Reply-To: <20151112081703.66022f2d@lilith>
Hi Albert,
On 2015?11?12? 15:17, Albert ARIBAUD wrote:
>> ------------------------------------------------------------------------
>> diff --git a/common/init/board_init.c b/common/init/board_init.c
>> index 8839a4a..703e6d8 100644
>> --- a/common/init/board_init.c
>> +++ b/common/init/board_init.c
>> @@ -46,6 +46,7 @@ void board_init_f_gd(struct global_data *gd_ptr)
>> for (ptr = (int *)gd_ptr; ptr < (int *)(gd_ptr + 1); )
>> *ptr++ = 0;
>> #endif
>> + arch_setup_gd(gd_ptr);
>
> Correct -- in ARM (Thumb-1 at least) we cannot use arch_setup_gd() so
> we set GD (in r9) from within arch/arm/lib/crt0.S, but for NIOS2 it
> might (and apparently does) work. Where is GD stored in NIOS2?
>
It is a register, r26 "gp".
I have another question. Will it be simpler to have two calls instead of
four?
1. get size of gd plus malloc.
2. init gd and malloc.
Best regards,
Thomas
next prev parent reply other threads:[~2015-11-12 8:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-10 18:30 [U-Boot] [PATCH v2] Fix board init code to use a valid C runtime environment Albert ARIBAUD
2015-11-11 8:52 ` Albert ARIBAUD
2015-11-12 5:59 ` Thomas Chou
2015-11-12 7:17 ` Albert ARIBAUD
2015-11-12 8:28 ` Thomas Chou [this message]
2015-11-12 10:23 ` Albert ARIBAUD
2015-11-13 6:41 ` Albert ARIBAUD
2015-11-13 8:20 ` Thomas Chou
2015-11-13 9:08 ` Bin Meng
2015-11-13 12:22 ` Albert ARIBAUD
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=56444DB6.3020108@wytron.com.tw \
--to=thomas@wytron.com.tw \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox