public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Reinhard Meyer <u-boot@emk-elektronik.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] previous two e-mails are RFC/demonstration!
Date: Sun, 14 Nov 2010 20:42:24 +0100	[thread overview]
Message-ID: <4CE03BA0.7010800@emk-elektronik.de> (raw)
In-Reply-To: <20101114162340.9766714EA7E@gemini.denx.de>

Dear Wolfgang Denk,
> Dear Reinhard Meyer,
>
> and - do they compile? Do they work?

Compile and work on top9000 = at91sam9xe = arm926ejs.

Since no tricks are used anymore, it is very likely
this will work on all other ARM variants or even on all
architectures with a similar GLOBAL_DATA method.

I made this patch as demo/reference to show how simple it is.
Honestly, it should have sprung into someones' eyes long ago,
but sometimes simple solutions hide themselves well :)

TODOs:

1. I am quite sure that in arm/lib/board.c
__asm__ __volatile__("": : :"memory");
was never needed and definitely is not needed anymore.
Can anyone shed some light on why this was added?
Probably just copied from other architectures where some trickery
around gd was done?

2. All board config files (for ARM) should be similarly updated:
-#define CONFIG_SYS_INIT_SP_ADDR \
-	(ATMEL_BASE_SRAM + 0x4000 - GENERATED_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_SP_ADDR (ATMEL_BASE_SRAM + 0x4000)
However, having the subtraction does not hurt except for wasted
memory.

3. After this, GENERATED_GBL_DATA_SIZE is not needed anymore
(for ARM).

4. start.S need just set the SP to CONFIG_SYS_INIT_SP_ADDR,
if one wants to be over-cautious extra alignment *can* be done.

5. Test the change for other architectures.

Best Regards,
Reinhard

  reply	other threads:[~2010-11-14 19:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-14 16:00 [U-Boot] previous two e-mails are RFC/demonstration! Reinhard Meyer
2010-11-14 16:23 ` Wolfgang Denk
2010-11-14 19:42   ` Reinhard Meyer [this message]
2010-11-14 20:24     ` Albert ARIBAUD
2010-11-14 20:33       ` Reinhard Meyer
2010-11-14 20:44       ` Wolfgang Denk
2010-11-14 20:59         ` Reinhard Meyer

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=4CE03BA0.7010800@emk-elektronik.de \
    --to=u-boot@emk-elektronik.de \
    --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