mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Alessandro Rubini <rubini-list@gnudd.com>
To: ivo.clarysse@gmail.com
Cc: barebox@lists.infradead.org
Subject: Re: [RFC] imx21ads nand boot
Date: Fri, 19 Mar 2010 14:00:34 +0100	[thread overview]
Message-ID: <20100319130034.GA23989@morgana.gnudd.com> (raw)
In-Reply-To: <ba216b431003190349n1d2c05e3i54c78520680ebce1@mail.gmail.com>

> I tried getting barebox MX21ADS to boot from NAND, but I can't get
> it to work.
> 
> Any clues, anyone ?


> +	ldmia	r0!, {r3-r9}		/* copy from source address [r0]    */
> +	stmia	r1!, {r3-r9}		/* copy to   target address [r1]    */

This is 7 registers, so 28 bytes at a time. So you copy
28, 56, .... 2044, 2072

I don't know what happens when you access memory over the end of
the SRAM area. Maybe it fires a data abort or something like that?

I'd use 4 registers instead of 7, but it might well not be the problem

> +	cmp	r0, r2			/* until source end addreee [r2]    */
> +	ble	copy_loop

"blt" would be better, because when it is equal you are done. Or using
4 registers will not prevent the extra accesses.

> +	ldr	pc, =1f			/* Jump to SDRAM                    */
> +1:
> +	bl	nand_boot		/* Load barebox from NAND Flash     */
> +

Finally, you should ensure the literary pool is within the first 2kB.
I'd place ".ltorg" before the "1:", or would check the disassembly.

Hope this helps, but it may well not help

/alessandro, who has an mx21ads looking at him but also real work to deliver

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      parent reply	other threads:[~2010-03-19 13:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-19 10:49 Ivo Clarysse
2010-03-19 11:03 ` Sascha Hauer
2010-03-22 12:07   ` Ivo Clarysse
2010-03-19 11:04 ` Juergen Beisert
2010-03-19 13:00 ` Alessandro Rubini [this message]

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=20100319130034.GA23989@morgana.gnudd.com \
    --to=rubini-list@gnudd.com \
    --cc=barebox@lists.infradead.org \
    --cc=ivo.clarysse@gmail.com \
    /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