From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] SPL broken on i.mx31 platforms
Date: Thu, 3 Jul 2014 15:35:57 +0200 [thread overview]
Message-ID: <E1X2hB8-0001ed-Ob@janus> (raw)
In-Reply-To: <53B5121B.809@hale.at>
Hi Helmut,
On Thu, 03 Jul 2014 10:19:39 +0200, Helmut Raiger
<helmut.raiger@hale.at> wrote:
> Hi,
>
> On 07/03/2014 01:20 AM, Beno?t Th?baudeau wrote:
> > )Dear Helmut Raiger,
> >
> > On Wed, Jul 2, 2014 at 9:04 AM, Helmut Raiger <helmut.raiger@hale.at> wrote:
> >>> the commit 41623c91 breaks the SPL on i.mx31 platforms.
> > Here, you are talking about mx31pdk, right?
> Actually im talking TT-01, but it has no contributed NAND boot code (which I
> was working on), but it should hit mx31pdk in the same way.
> This should answer Albert's question about the board.
It does, thanks -- but I fail to see any SPL code built for TT-01.
You're getting SPL issues with another target, right?
> >> No, it will only be a minor change, I think, but I thought there might
> >> have been an additional intention behind the change to position
> >> dependent code. One could link the first part to 0xB8000000
> >> (the original position of the SPL when loaded by the IPL) and
> >> the part after the relocation to CONFIG_SPL_TEXT_BASE.
> > Actually, the ROM bootloader first copies the first NAND page to
> > 0xB8000000. Then, the SPL placed here but linked at
> > CONFIG_SPL_TEXT_BASE copies itself to CONFIG_SPL_TEXT_BASE in order
> > to free the NFC buffer so that it can be used by the SPL. There is
> > no relocation going on at this stage, but only a copy, and the SPL
> > code size is limited to 2 kiB. Then, the SPL does its NAND load job
> > towards CONFIG_SYS_TEXT_BASE and starts executing the non-SPL
> > binary, which then relocates itself according to the heap size, etc.
Ok, I think I'm getting it, but actually you don't need PIC (your code
won't run at arbitrary locations), you need VMAs vs LMAs (your code
will run partly at one location, partly at another, but will be loaded
at only one of these locations).
Therefore, we should be able to manage this in the linker script, by
basically defining two output sections: the first one with a VMA and
LMA equal to 0xB8000000 both, and which would contain the 'copier' code;
and the second one with a VMA equal to CONFIG_SPL_TEXT_BASE (so that it
links properly for running at that address) and a LMA equal to 0xB800000
(so that it gets lumped with the first section in the less-than-2K ELF
file produced by the linker.
(actually we'd have several output sections with VMA==LMA, but it
does not affect the core of the idea.)
Does it make sense to you?
> Helmut
Amicalement,
--
Albert.
next prev parent reply other threads:[~2014-07-03 13:35 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-01 13:33 [U-Boot] SPL broken on i.mx31 platforms Helmut Raiger
2014-07-01 13:53 ` Fabio Estevam
2014-07-01 19:45 ` Albert ARIBAUD
2014-07-02 7:04 ` Helmut Raiger
2014-07-02 10:58 ` Albert ARIBAUD
2014-07-02 23:20 ` Benoît Thébaudeau
2014-07-03 8:19 ` Helmut Raiger
2014-07-03 13:35 ` Albert ARIBAUD [this message]
2014-07-03 20:58 ` Benoît Thébaudeau
2014-07-04 8:50 ` Albert ARIBAUD
2014-07-04 10:42 ` Magnus Lilja
2014-07-04 21:42 ` Benoît Thébaudeau
2014-07-04 21:29 ` Benoît Thébaudeau
2014-07-03 20:58 ` Benoît Thébaudeau
2014-07-08 8:05 ` Helmut Raiger
2014-07-08 12:32 ` Helmut Raiger
2014-07-08 12:48 ` Helmut Raiger
2014-07-09 8:22 ` [U-Boot] SPL broken on i.mx31 platforms, FIX? Helmut Raiger
2014-07-11 7:56 ` [U-Boot] SPL broken on i.mx31 platforms Magnus Lilja
2014-07-15 9:31 ` Helmut Raiger
2014-08-04 20:23 ` Magnus Lilja
2014-08-04 20:40 ` Jeroen Hofstee
2014-08-05 12:28 ` Fabio Estevam
2014-08-05 12:32 ` Magnus Lilja
2014-08-13 12:01 ` Helmut Raiger
2014-08-15 17:45 ` Magnus Lilja
2014-08-19 20:55 ` Benoît Thébaudeau
2014-08-19 22:01 ` Fabio Estevam
2014-09-03 0:53 ` Benoît Thébaudeau
2014-09-03 1:13 ` Tom Rini
2014-09-04 19:12 ` Magnus Lilja
2014-09-04 19:50 ` Benoît Thébaudeau
2014-09-04 19:59 ` Magnus Lilja
2014-07-02 8:11 ` Stefano Babic
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=E1X2hB8-0001ed-Ob@janus \
--to=albert.u.boot@aribaud.net \
--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