public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Make flash protection work, when the environment is in	EEPROM
Date: Mon, 23 Mar 2009 08:15:41 +0100	[thread overview]
Message-ID: <20090323071541.GF20099@pengutronix.de> (raw)
In-Reply-To: <9e4733910903222001h54568fao2f96dcbdc8925df5@mail.gmail.com>

On Sun, Mar 22, 2009 at 11:01:09PM -0400, Jon Smirl wrote:
> On Sun, Mar 22, 2009 at 6:59 PM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> > Hi Wolgang,
> >
> > On Sat, Mar 21, 2009 at 09:24:05PM +0100, Wolfgang Denk wrote:
> >> Dear Jon Smirl,
> >>
> >> In message <9e4733910903211308v63878fabx19f3327371db56c6@mail.gmail.com> you wrote:
> >> >
> >> > My guess is getenv() returns a pointer to the environment variable,
> >> > not a copy of the environment variable. getenv_r() returns a copy. How
> >> > can you return a pointer to the variable if the variable is in
> >> > something not directly addressable like EEPROM? ?Does
> >>
> >> The environment always gets copied to RAM. And it's a perfectly simple
> >> thing to return an adress pointing to some memory in RAM :-)
> >>
> >> > getenv("unlock"); do what you want when the environment is in EEPROM?
> >>
> >> getenv() always works that way, no matter which actual media is used
> >> for the persistent storage of the environment.
> >
> > This is not quite true. In the PPC init sequence flash_init() is called
> > before env_relocate() and thus getenv is not available in flash_init().
> > Please note that this was just a quick way for us to make things work
> > and I never considered this a fix for mainline.
> 
> What is your fix for mainline?

I have none.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  reply	other threads:[~2009-03-23  7:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-21 13:59 [U-Boot] [PATCH] Make flash protection work, when the environment is in EEPROM Jon
2009-03-21 19:52 ` Wolfgang Denk
2009-03-21 20:08   ` Jon Smirl
2009-03-21 20:24     ` Wolfgang Denk
2009-03-21 20:25       ` Jon Smirl
2009-03-22 22:59       ` Sascha Hauer
2009-03-23  3:01         ` Jon Smirl
2009-03-23  7:15           ` Sascha Hauer [this message]
2009-03-23  8:15           ` Wolfgang Denk
2009-03-23  8:17 ` Wolfgang Denk
2009-03-23  8:54   ` Stefan Roese

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=20090323071541.GF20099@pengutronix.de \
    --to=s.hauer@pengutronix.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