From: alfred hitch Date: Wed, 11 Jan 2006 01:01:47 -0500 Subject: [U-Boot-Users] u-boot locking ? In-Reply-To: <200601081727.24735.pantelis@embeddedalley.com> References: <29f916510601080110s2f598bftaa5c278fdc56518@mail.gmail.com> <29f916510601080721vd20b512u819ee9bce7ad1408@mail.gmail.com> <200601081727.24735.pantelis@embeddedalley.com> Message-ID: <29f916510601102201qd76ea4eyd5d5f6884b74f1b3@mail.gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Pantelis / All, I have been trying to get the protection working for ixdp425 + J3 flash. But, no luck so far. When I turn on the CFI_FLASH_PROTECTION option in include/configs/ixdp425.h I get flash_real_protect undeclared. A grep reveals that it is defined in file drivers/cfi_flash.c and is #ifdef'ed with CFG_FLASH_CFI_DRIVER ( Above needs CFG_FLASH_CFI) Doing these, I notice that the flash_init function is being called now from the drivers/cfi_flash.c instead of earlier include/board/ixdp425.c At this point code hangs. I guess the reason for this will be relocation for RAM is essential and isnt happening for this cfi_flash.c ? How to do this, I am sure I am missing something very trivial here I see lots of discussions on locking etc, but none which is similar to my problem. Regards, Alfred On 1/8/06, Pantelis Antoniou wrote: > On Sunday 08 January 2006 17:21, alfred hitch wrote: > > Hi, > > > > I have some (basic) question .. > > 1) Does u-boot lock the block on which it resides by default ? > > I mean the sector /erase block on which u-boot is there, it will be > > locked using the block lock bit by default ? > > > > Plafform in question being IXDP 425 with Intel J3 NOR Flash. > > > > 2) The flash content changing has to work in block sizes erase - > > modify - write cyecles only ?? > > > > Reason for all this is that we have few boards on which u-boot is > > getting corrupted (on flash image corruption itself). > > And so am wondering even if its a noise issue, how can it first cause > > an unlock of sector before write. > > > > Any help in understanding of above issues will be really appreciated, > > Regards, > > Alfred > > > > > > AFAIK u-boot normally only software protects sectors (mark them internally as > read-only). You can lock the sector(s) in your board startup routine. Remember > to do so after relocation to RAM. > > Regards > > Pantelis >