Skip to contentSkip to conversation

hardware flash protect kept during a reboot?

U-Boot Timur Tabi 2 participants 4 messages May 14, 2010 – May 18, 2010

lore
Share & tools
lore

Timur Tabi

author
#0 lore raw

If I enable CONFIG_SYS_FLASH_PROTECTION and have a support flash chipset, are my protected sectors supposed to remain protected during a reboot?

That is, if I protect some flash sector, and then reboot U-Boot, I know U-Boot will not show the sector as being protected, because the info->protect[] array is initialized on every boot. However, since I was using hardware protection, I expect the chip will still protect the sector.

Signature · 2 lines
Timur Tabi
Linux kernel developer at Freescale
#1 lore raw

Hi Timur,

Quoted 7 lines · On Friday 14 May 2010 21:33:28 Timur Tabi wrote:

If I enable CONFIG_SYS_FLASH_PROTECTION and have a support flash chipset, are my protected sectors supposed to remain protected during a reboot?

That is, if I protect some flash sector, and then reboot U-Boot, I know U-Boot will not show the sector as being protected, because the info->protect[] array is initialized on every boot. However, since I was using hardware protection, I expect the chip will still protect the sector.

This protection is chip specific. IIRC, then some Intel (Strata) chips either protect all sectors or have a sectore-wise protection mechanism. You need to check your FLASH documentation for the exact behaviour. Which chip are you using?

Please note that we have the special "unlock" env variable. By setting it to "yes", all sectors will be unlocked upon startup. At least on Intel Strata FLASH chips.

Cheers,
Stefan

--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de

author
#2 lore raw
Quoted 4 lines · Stefan Roese

This protection is chip specific. IIRC, then some Intel (Strata) chips either protect all sectors or have a sectore-wise protection mechanism. You need to check your FLASH documentation for the exact behaviour. Which chip are you using?

I just want to know whether hardware protection works at all for anyone through a reboot. Is the CFI "protect sector" command persistent through a hardware power reset or power loss?

Quoted 3 lines

Please note that we have the special "unlock" env variable. By setting it to "yes", all sectors will be unlocked upon startup. At least on Intel Strata FLASH chips.

I put a printf() in flash_real_protect(), so I know that's not the problem.

Signature · 2 lines
Timur Tabi
Linux kernel developer at Freescale
#3 lore raw
Quoted 9 lines · On Monday 17 May 2010 16:11:22 Timur Tabi wrote:
Quoted 4 lines · Stefan Roese

This protection is chip specific. IIRC, then some Intel (Strata) chips either protect all sectors or have a sectore-wise protection mechanism. You need to check your FLASH documentation for the exact behaviour. Which chip are you using?

I just want to know whether hardware protection works at all for anyone through a reboot. Is the CFI "protect sector" command persistent through a hardware power reset or power loss?

Yes. Its working at least for Intel Strata FLASH chips.

Cheers,
Stefan

--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de