From: Helmut Raiger <helmut.raiger@hale.at>
To: u-boot@lists.denx.de
Subject: [U-Boot] SPL broken on i.mx31 platforms
Date: Tue, 08 Jul 2014 14:32:20 +0200 [thread overview]
Message-ID: <53BBE4D4.3060007@hale.at> (raw)
In-Reply-To: <53BBA64A.70309@hale.at>
On 07/08/2014 10:05 AM, Helmut Raiger wrote:
>
> I meant, that the SPL is now doing the RAM init and copying of the SPL
> code
> correctly. RAM is working, the SPL code is at 0x87dc0000 after that
> (CRCed it via JTAG).
> I could not track it further (I have very limited development time
> right now ... repeating myself).
>
> After all I need to debug further. If someone could test the current
> state on the
> mx31pdk, this still would be great. Just to rule out any other board
> specific issues.
>
> Helmut
Ok, I've got some new input and I have no clue what's going on.
1) I fixed the first branch to reset (uses b reset instead of ldr pc,
_reset)
2) The startup does:
b reset
...
reset:
- set the cpu to SVC32 mode
- bl cpu_init_crit (cache and MMU stuff, calls low_level_init)
- bl _main
low_level_init:
unlike in mx31pdk this only does:
ldr r0, =ARM_PPMRR /* start from AIPS 2GB region */
mcr p15, 0, r0, c15, c2, 4
mov pc, lr
_main:
- set up stack pointer to internal SRAM
- bl board_init_f
As I can't break right after reset with peedi, I do:
- reset stop
- set pc 0xb8000000
- go -> system never returns
next:
reset stop
- set pc 0xb8000000
- break add hard 0xb80000c8 // set hardware breakpoint to the
'bl board_init_f' instruction
- go
... it stops at the breakpoint
- go
... I'm at the u-boot command prompt
If I set the breakpoint somewhere after the bl board_init_f it fails, if
I break a few instructions
early and go from there it also fails. Tracking down the location
in-between I end up at:
at the end of cpu_init_crit():
mov ip, lr /* persevere link reg across call */
bl lowlevel_init /* go setup pll,mux,memory */
-> mov lr, ip /* restore link */
mov pc, lr /* back to my caller */
That is, if I set the breakpoint to mov lr, ip it works, if I set it one
instruction later it ends working.
Could be struggling with the debugger here, as the SPL probably ran a
few instruction before it
was stopped. Might this be a cache issue? But it is invalidated in
cpu_init_crit() anyway ...
Feeling a little dumbstruck right now ...
Sorry for the mess, but it's hard to describe.
Any ideas?
Helmut
--
Scanned by MailScanner.
next prev parent reply other threads:[~2014-07-08 12:32 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
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 [this message]
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=53BBE4D4.3060007@hale.at \
--to=helmut.raiger@hale.at \
--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