public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jeroen Hofstee <jeroen@myspectrum.nl>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 3/4] ARM: use r9 for gd
Date: Wed, 21 Aug 2013 18:22:59 +0200	[thread overview]
Message-ID: <5214E963.3020208@myspectrum.nl> (raw)
In-Reply-To: <52125692.7010001@myspectrum.nl>

Hello Simon,

On 08/19/2013 07:32 PM, Jeroen Hofstee wrote:
>
> On 08/19/2013 05:08 AM, Simon Glass wrote:
>> On Sat, Aug 17, 2013 at 3:40 AM, Jeroen Hofstee 
>> <jeroen@myspectrum.nl> wrote:
>>>
>>> This patch assumes only crt0.S sets the register used for
>>> gd in asm. I just noticed cpu/armv7/lowlevel_init.S does set gd
>>> manually, so all users of the common board.c are likely
>>> bricked with the patch as is. Looking into it....
>> I may misunderstood what you are saying here,
>
> Likely, this is not about how to set reserve gd, but why gd
> is setup twice. The answer is because some more cleanup
> is needed (which deserves its own patch).
>

Right... Now I understand what you were talking about.  Gd is actually
setup _three_ times in a row:

1) cpu/armv7/lowlevel_init.S
2) ./arch/arm/lib/crt0.S
3) common/board_f.c

>> but I believe that the
>> code in common/board_f.c which creates a global_data on the stack can
>> be removed for ARM now that Albert has tidied all this up with the
>> crt0.S changes, etc. So in common/board_f.c something like:
>>
>> void board_init_f(ulong boot_flags)
>> {
>> /* These two archs set up the global_data before board_init_f() */
>> #if !defined(CONFIG_X86) && !defined(CONFIG_ARM)
>> gd_t data;
>>
>> gd = &data;
>> #endif
>>
>> gd->flags = boot_flags;
>>
>

Yup understood now, this makes sense (but as part of a cleanup patchset)

Thanks, Regards,
Jeroen

  reply	other threads:[~2013-08-21 16:22 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-11 20:58 [U-Boot] [PATCH 0/3] ARM: use r9 for gd instead of r8 Jeroen Hofstee
2013-08-11 20:58 ` [U-Boot] [PATCH 1/3] ARM: make reserving the gd register a make variable Jeroen Hofstee
2013-08-11 20:58 ` [U-Boot] [PATCH 2/3] ARM,relocate: do not use r9 Jeroen Hofstee
2013-08-11 20:58 ` [U-Boot] [PATCH 3/3] ARM: use r9 for gd Jeroen Hofstee
2013-08-12  5:53   ` Wolfgang Denk
2013-08-12 14:44     ` Albert ARIBAUD
2013-08-12 15:23       ` Wolfgang Denk
2013-08-13 19:41         ` Jeroen Hofstee
2013-08-11 22:08 ` [U-Boot] [PATCH 0/3] ARM: use r9 for gd instead of r8 Benoît Thébaudeau
2013-08-12  5:49   ` Albert ARIBAUD
2013-08-13 19:36   ` Jeroen Hofstee
2013-08-14 18:25 ` [U-Boot] [PATCH v2 0/4] " Jeroen Hofstee
2013-08-14 18:25   ` [U-Boot] [PATCH v2 1/4] ARM: make reserving the gd register a make variable Jeroen Hofstee
2013-08-17 13:55     ` Jeroen Hofstee
2013-09-19  6:57       ` Albert ARIBAUD
2013-09-19 16:54         ` Jeroen Hofstee
2013-08-14 18:25   ` [U-Boot] [PATCH v2 2/4] ARM,relocate: do not use r9 Jeroen Hofstee
2013-08-14 18:25   ` [U-Boot] [PATCH v2 3/4] ARM: use r9 for gd Jeroen Hofstee
2013-08-17  9:40     ` Jeroen Hofstee
2013-08-17 13:51       ` Jeroen Hofstee
2013-08-19  3:08       ` Simon Glass
2013-08-19 17:32         ` Jeroen Hofstee
2013-08-21 16:22           ` Jeroen Hofstee [this message]
2013-08-21 23:44             ` Simon Glass
2013-08-14 18:25   ` [U-Boot] [PATCH v2 4/4] README: update ARM register usage Jeroen Hofstee
2013-09-21 12:04 ` [U-Boot] [PATCH v3 0/3] ARM: use r9 for gd instead of r8 Jeroen Hofstee
2013-09-21 12:04   ` [U-Boot] [PATCH v3 1/3] ARM,relocate: do not use r9 Jeroen Hofstee
2013-09-21 12:04   ` [U-Boot] [PATCH v3 2/3] ARM: use r9 for gd Jeroen Hofstee
2013-09-21 15:30     ` Jeroen Hofstee
2013-09-21 12:04   ` [U-Boot] [PATCH v3 3/3] README: update ARM register usage Jeroen Hofstee
2013-09-23 16:56   ` [U-Boot] [PATCH v3 0/3] ARM: use r9 for gd instead of r8 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=5214E963.3020208@myspectrum.nl \
    --to=jeroen@myspectrum.nl \
    --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