From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cliff Brake Date: Thu, 9 Dec 2004 15:27:59 -0500 Subject: [U-Boot-Users] Overwriting protected flash memory!!! In-Reply-To: <20041209192215.CD773C146C@atlas.denx.de> References: <20041209192215.CD773C146C@atlas.denx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, 09 Dec 2004 20:22:10 +0100, Wolfgang Denk wrote: > No. Not even that. For most boards, the "protect" feature in U-Boot > is only a flag that prevents certain commands from working on such > "protected" flash areas. Only very few flash chips, and even fewer > boards using these chips, actually use some kind of hardware > protection.In most cases, just using a couple of "mm" or "mw" > commands to enter the erase or program seqence is all what's needed > to erase / corrupt "protected" sectors. > > The "protect" stuff is something that is intended to prevent > accidential data loss by a istyped command etc. It cannot protect you > from doing stupid things. Thanks for the information -- I had assumed the protect command set the lock bits (for Intel flash). Setting the CFG_FLASH_PROTECTION option may cause the lock bits to be set in the flash (did not trace through the code fully). But it is still very possible to corrupt flash as writes to a range of address will clear the lock bit (as Wolfgang pointed out). -- ======================= Cliff Brake http://bec-systems.com