From: Stefan Roese <sr@denx.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 09:54:09 +0100 [thread overview]
Message-ID: <200903230954.09491.sr@denx.de> (raw)
In-Reply-To: <20090323081738.912F6832E406@gemini.denx.de>
Hi Wolfgang,
On Monday 23 March 2009, Wolfgang Denk wrote:
> > +++ b/drivers/mtd/cfi_flash.c
> > @@ -2009,7 +2009,9 @@ unsigned long flash_init (void)
> > #endif
> >
> > #ifdef CONFIG_SYS_FLASH_PROTECTION
> > - char *s = getenv("unlock");
> > + /* read environment from EEPROM */
> > + char s[4];
> > + getenv_r ("unlock", s, sizeof(s));
> > #endif
> >
> > #define BANK_BASE(i) (((phys_addr_t
> > [CFI_MAX_FLASH_BANKS])CONFIG_SYS_FLASH_BANKS_LIST)[i])
>
> Please change "char s[4];" into "char s[256];", otherwise:
>
> Acked-by: Wolfgang Denk <wd@denx.de>
OK, I changed the array to 64 (256 is a bit high without "real" stack) and
will push this patch quickly to the cfi repository.
Best regards,
Stefan
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
prev parent reply other threads:[~2009-03-23 8:54 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
2009-03-23 8:15 ` Wolfgang Denk
2009-03-23 8:17 ` Wolfgang Denk
2009-03-23 8:54 ` Stefan Roese [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=200903230954.09491.sr@denx.de \
--to=sr@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