From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tolunay Orkun Date: Mon, 22 Aug 2005 11:49:59 -0500 Subject: [U-Boot-Users] [PATCH] cfi_flash.c patches In-Reply-To: <20050822161708.3365F352B0C@atlas.denx.de> References: <20050822161708.3365F352B0C@atlas.denx.de> Message-ID: <430A0237.9060703@orkun.us> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Wolfgang Denk wrote: >In message <4309F122.5090907@orkun.us> you wrote: > > > >>The point is you can simply use already available "protect off" >>mechanism to lift the lock on these sectors instead of defining >> >> > >You can do this, but I would reject such a broken implementation. > > I guess I do not understand what is broken by having to use "protect off" for a flash that auto protects all sectors. If you automatically unlock sectors how do you know that sector X that was explicitly locked or not. I would personally err on being on the safe side and keep it locked until explicitly told by the user to unlock the sectors prior to be written. I consider unlocking all sectors unconditionally is broken implementation. >U-Boot shall come up with writapble flash, except for the few >protected sectors where U-Boot itself lives (plus the environment, >plus eventually FPGA images needed to boot the hardware). > > What about the sectors that are not in direct use by U-Boot. If I put a lock on a certain sector in Linux I would certainly would like to keep that lock to remain in that state across boot. U-Boot does not have any knowledge of the use of these other sectors and should not make assumptions on their lock/unlock state. Best regards, Tolunay