[U-Boot-Users] Environment Flash Sector Protection w/ cfi_fla sh.c?

Michael Bendzick michaelb at logicpd.com
Mon Aug 30 18:30:25 CEST 2004


I'm back revisiting the CFI driver, and am wondering which of these is the
intent of the sector protection for memory at (CFG_MONITOR_BASE +
CFG_MONITOR_LEN - 1):

1)  "MONITOR" refers to the bootloader _and_ environment
2)  "MONITOR" refers to _just_ the bootloader

If 1, cfi_flash.c can stay as it is with:

        /* Monitor protection ON by default */
#if (CFG_MONITOR_BASE >= CFG_FLASH_BASE)
        flash_protect (FLAG_PROTECT_SET,
                       CFG_MONITOR_BASE,
                       CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1,
                       &flash_info[0]);
#endif

Otherwise, with 2, it should have a second block to protect the environment.
This is only useful if it's common for boards to keep the bootloader and
environment in non-contiguous segments of memory.  Is that common?

-----Original Message-----
From: Wolfgang Denk [mailto:wd at denx.de]
Sent: Monday, July 19, 2004 5:06 PM
To: Michael Bendzick
Cc: U-Boot-Users (E-mail)
Subject: Re: [U-Boot-Users] Environment Flash Sector Protection w/
cfi_flash.c? 


In message <31ADFA827355984B9E2A161514595B561C32E8 at lpdsrv04.logicpd.com> you
wrote:
> I have noticed that when using the cfi_flash.c driver that the environment
> sector (the second sector, counting from one) in flash is not protected by
> default.  When I was working with the omap1510inn board using its original
> flash.c driver, it would protect the environment in flash_init.  Would it
be
> good to add default to protection for the environment sector to
cfi_flash.c?

If this  is  whatis  required  to  have  the  U-Boot  image  and  the
environment sector(s) protected, tthen yes.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
Hacking's just another word for nothing left to kludge.




More information about the U-Boot mailing list