From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Guinot Date: Tue, 1 Feb 2011 09:09:08 +0000 Subject: [U-Boot] SPI flash protection In-Reply-To: <4D466210.7090906@emk-elektronik.de> References: <20110129170048.GE20942@kw.sim.vm.gnt> <4D453111.50107@free.fr> <20110130145610.GA20073@kw.sim.vm.gnt> <4D459D98.6000704@free.fr> <20110131003120.GC20073@kw.sim.vm.gnt> <4D465C4B.3020201@free.fr> <4D466210.7090906@emk-elektronik.de> Message-ID: <20110201090907.GF20073@kw.sim.vm.gnt> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Reinhard, On Mon, Jan 31, 2011 at 08:17:36AM +0100, Reinhard Meyer wrote: > Dear Albert ARIBAUD, Simon Guinot, > > > >>>>Here is the protect area map for a MX25L4005A 4Mb flash: > >>>> > >>>> bit 2 1 0 | protect level > >>>> ____________|_______________ > >>>> 0 0 0 | none > >>>> 0 0 1 | block 7 > >>>> 0 1 0 | block 6-7 > >>>> 0 1 1 | block 4-7 > >>>> 1 * * | all > >>Block size is 64KB. The compiled U-Boot image is about 220KB and > >>environment is 4KB. So, 4 blocks are required for U-Boot. > > I don't know your particular hardware, but is not u-boot (or the > initial bootloader if there is any) fetched from the *beginning* > of the flash? > > If so, you would have to *hardware* protect the *entire* flash. Yes you are right. Moreover the protected blocks (for a same register value) _could_ be different on an another Macronix device. For example, larger flash use 4 bits instead of 3 for block protection. > > In this case, a *software* protection mechanism like for NOR flash > would be a better choice. Or no protection at all. After all, there is no such mechanism implemented for u-boot and Linux... Best regards, Simon -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: Digital signature Url : http://lists.denx.de/pipermail/u-boot/attachments/20110201/c501b2fd/attachment.pgp