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

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

In message 31ADFA827355984B9E2A161514595B561C33A3@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):
- "MONITOR" refers to the bootloader _and_ environment
Correct for configurations with embedded environment.
- "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
participants (2)
-
Michael Bendzick
-
Wolfgang Denk