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

Wolfgang Denk wd at denx.de
Mon Aug 30 19:00:27 CEST 2004


In message <31ADFA827355984B9E2A161514595B561C33A3 at lpdsrv04.logicpd.com> you wrote:
> 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

Correct for configurations with embedded environment.

> 2)  "MONITOR" refers to _just_ the bootloader

Correct for configurations with separate environment.

> 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.

You are right. It should have this, in case  of  configurations  with
separate 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?

This is one of the common configurations.

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
Ninety-Ninety Rule of Project Schedules:
        The first ninety percent of the task takes ninety percent of
the time, and the last ten percent takes the other ninety percent.




More information about the U-Boot mailing list