From: Brian Waite <bwaite@irobot.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] cfi_flash.c patches
Date: Tue, 23 Aug 2005 10:47:37 -0400 [thread overview]
Message-ID: <200508231047.37928.bwaite@irobot.com> (raw)
In-Reply-To: <20050822224604.A4E6F353C1A@atlas.denx.de>
On Monday 22 August 2005 6:46 pm, Wolfgang Denk wrote:
> > Just a couple of emails ago you were saying all sectors should be in
> > writable state in U-Boot. This is a policy which is announced today by
> > you.
>
> OK.
Why does *u-boot* want the FLASH in a writeable state? Some boards may want
FLASH in a writeable state, some command lines may want FLASH in a writable
state, but u-boot does not need FLASH in a writeable state to boot.
>
> > Leaving the state of sectors (except for U-Boot managed sectors) until
> > user takes explicit lock/unlock action as they are is another policy .
>
> I don't call this a policy.
Would you call it a policy of u-boot not to change the state of hardware in
common code unless it is needed to run u-boot? Ie many cpu features are not
enabled by default in u-boot. Would changing the powered up state of the
FLASH be considered a deviation of this policy?
>
> > Why do you think it is OK for U-Boot to unlock sectors/blocks that it
> > knows nothing about their usage? Wouldn't leaving these sectors in a
>
> Because in the general case (and this is what cfi_flash is used for)
> you don't expect to have any hardware protected sectors. Not in
> U-Boot, and neither in Linux when you for example want to use these
> for a writable MTD partition.
>
In the general case, if I lock my FLASH to protect a Linux kernel I have there
I have explicitly locked that region and I do not expect anyone to unlock it
for me.
> > safer state a common sense approach?
>
> Not for me. I don't like the hardware doing magic things to me. I
> want to be in control over the hardware - not vice versa.
>
You should change that in the board package. I do not consider this magic if I
have spec-ed the FLASH part for my board because of this feature. I consider
it software magic to undo a a feature I designed in.
> > While you see it important to protect U-Boot environment (for various
> > reasons and I agree), you do not seem to consider consistent protection
> > for another area of flash that may be storing equally vital information
> > for software system. Why?
>
> Not on a *automatic* base. I accept this only if explicitely
> requested by the user (by using the "protect on" command) *and* the
> board designer (by providing a flash implementation that supports
> hardware write protection both in hardware [by selcting appropriate
> flash chips] and in software [by enabling the needed features in
> U-Boot]).
>
> As mentioned before: if you want to have this on a board, OK, then
> implement it there and put apropriate big warnings and notes in your
> board documentation. If this is general code which is used by many
> boards that you don't control (and do not test!) then I want to
> provide a common interface. And common behaviour is that flash can be
> erased and written to in the boot loader.
>
You cannot tell the difference in the Intel part that was origianlly
referenced between sectors locked at reset and sectors explicitly locked.
Therfore you are unlocking explicitly locked sectors at the same time.
Another implimentation detail would be the additional time needed to unprotect
the FLASH at each powerup. On my board, with 64 MB of FLASH, you would be
adding ~2 seconds to the u-boot boot time by unprotecting the FLASH. I would
then need to waste ~1.5 seconds re locking most of my FLASH. (I only provide
write access to a small portion of the 64 MB). Your policy will add almost
3.5 seconds to boot time.
next prev parent reply other threads:[~2005-08-23 14:47 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-19 4:27 [U-Boot-Users] [PATCH] cfi_flash.c patches Sangmoon Kim
2005-08-19 18:36 ` Tolunay Orkun
2005-08-22 5:37 ` Sangmoon Kim
2005-08-22 6:31 ` Tolunay Orkun
2005-08-22 7:13 ` Sangmoon Kim
2005-08-22 15:37 ` Tolunay Orkun
2005-08-22 16:17 ` Wolfgang Denk
2005-08-22 16:49 ` Tolunay Orkun
2005-08-22 20:49 ` Wolfgang Denk
2005-08-22 16:41 ` Scott McNutt
2005-08-23 1:53 ` Sangmoon Kim
2005-08-22 7:58 ` Wolfgang Denk
2005-08-22 17:02 ` Tolunay Orkun
2005-08-22 20:53 ` Wolfgang Denk
2005-08-22 22:05 ` Tolunay Orkun
2005-08-22 22:46 ` Wolfgang Denk
2005-08-23 7:14 ` Yuli Barcohen
2005-08-23 8:39 ` Sangmoon Kim
2005-08-23 14:47 ` Brian Waite [this message]
2005-08-23 20:24 ` Wolfgang Denk
2005-08-24 5:58 ` Yuli Barcohen
2005-08-24 16:00 ` Detlev Zundel
2005-08-24 21:52 ` Tolunay Orkun
2005-08-24 23:12 ` Wolfgang Denk
2005-08-25 14:37 ` Brian Waite
2005-08-25 16:37 ` Tolunay Orkun
2005-08-26 14:12 ` U-Boot policy on flash protection (was [U-Boot-Users] [PATCH] cfi_flash.c patches) Detlev Zundel
2005-08-26 14:45 ` Wolfgang Denk
2006-02-28 16:34 ` [U-Boot-Users] [PATCH] cfi_flash.c patches Wolfgang Denk
-- strict thread matches above, loose matches on Subject: below --
2005-08-19 18:47 Woodruff, Richard
2005-08-19 20:16 ` Tolunay Orkun
2005-08-19 20:22 Woodruff, Richard
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=200508231047.37928.bwaite@irobot.com \
--to=bwaite@irobot.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