public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Detlev Zundel <dzu@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] bootcounter implementation for OMAP3
Date: Tue, 09 Mar 2010 09:33:59 +0100	[thread overview]
Message-ID: <m26355ki6g.fsf@ohwell.denx.de> (raw)
In-Reply-To: <251177.91741.qm@web50106.mail.re2.yahoo.com> (Nitin Mahajan's message of "Mon, 8 Mar 2010 19:46:12 -0800 (PST)")

Hi Nitin,

> I am trying to implement the bootcount_store and bootcount_load
> methods for the OMAP3503 processor based board which I am using.
>
> For this I decided to use the location at the end of scratchpad RAM,
> that is I am trying to write at location 0x480029BF. The code looks like 
> this, but the boot loader hags when it encounters bootcount_load.
>
>
> #ifdef CONFIG_BOOTCOUNT_LIMIT
> void bootcount_store(ulong a)
> {
> 	volatile ulong *save_addr = 
> 		(volatile ulong *)(0x480029BF);
> 	*save_addr = (BOOTCOUNT_MAGIC & 0xffff0000) | (a & 0x0000ffff);

You are writing a 32 bit entity to an non 32-bit aligned address.
Although I do not know the omap too well, this can be a problem on any
architecture.

Can you write 32-bot to that exact address from within the U-Boot
commandline with e.g. "mm"?

Cheers
  Detlev

-- 
Q: What do you get when you cross an elephant and a banana?
A: |elephant| * |banana| * sin(theta)
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de

  reply	other threads:[~2010-03-09  8:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-09  3:46 [U-Boot] bootcounter implementation for OMAP3 Nitin Mahajan
2010-03-09  8:33 ` Detlev Zundel [this message]
2010-03-09 11:53   ` Nitin Mahajan
2010-03-09 17:22     ` Detlev Zundel
2010-03-10  5:04       ` Nitin Mahajan
2010-03-10  6:28         ` Wolfgang Denk

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=m26355ki6g.fsf@ohwell.denx.de \
    --to=dzu@denx.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