From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] U-Boot Scripting suggestions to decrement counter in EEPROM. Alignment bug in itest on ARM.
Date: Tue, 3 Mar 2009 09:33:40 +0100 [thread overview]
Message-ID: <20090303083340.GA9951@game.jcrosoft.org> (raw)
In-Reply-To: <49ACD0DC.10309@ceos.com.au>
On 17:40 Tue 03 Mar , Tom Evans wrote:
> I'm implementing a rather complex boot that involves flags and counters
> in EEPROM.
in which case do you need this?
update?
in u-boot you have better system that involve watchdog and bootcount
I do not known which cpu or soc you use but you can implement it simply
> BUG IN ITEST
> ------------
> itest crashes ARM chips. I can "iread.b *82000000 == 0", but
> "iread.b *82000001 == 0" throws an alignment exception that kills the
> box. The code in itest.c is:
>
> static long evalexp(char *s, int w)
> {
> long l, *p;
>
> /* if the parameter starts with a * then assume is a
> pointer to the value we want */
> if (s[0] == '*') {
> p = (long *)simple_strtoul(&s[1], NULL, 16);
> l = *p;
here you are support to use the good accessor readb/readw/readl
b> } else {
> l = simple_strtoul(s, NULL, 16);
> }
>
> return (l & ((1 << (w * 8)) - 1));
> }
>
> "l = *p" works on a 486 but not on an ARM. It is a simple change - a
> three-way case on the width reading through the "right pointer".
the arm does not allow you to do an non aligned access
Best Regards,
J.
prev parent reply other threads:[~2009-03-03 8:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080827053319.18025.qmail@devel>
2008-12-30 4:31 ` [U-Boot] Minor bug found in board/zylonite/lowlevel_init.S. 0x300 changed to 300 Tom Evans
2009-01-27 21:24 ` Wolfgang Denk
2009-03-03 6:40 ` [U-Boot] U-Boot Scripting suggestions to decrement counter in EEPROM. Alignment bug in itest on ARM Tom Evans
2009-03-03 8:33 ` Jean-Christophe PLAGNIOL-VILLARD [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=20090303083340.GA9951@game.jcrosoft.org \
--to=plagnioj@jcrosoft.com \
--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