[U-Boot] [PATCH v2 5/5] cgtqmx6eval: Protect the manufacturing information in SPI NOR

Otavio Salvador otavio.salvador at ossystems.com.br
Wed Sep 23 15:36:48 CEST 2015


On Wed, Sep 23, 2015 at 5:15 AM, Jagan Teki <jteki at openedev.com> wrote:

> Sorry, I didn't understand why protection range or bits are specific
> to board, is it different in Congetc because the flash area being
> protected by means of sector range which is obviously the flash
> offset.

The protection range is board specific. For example: certain boards
don't need any region to be protected at all, other boards may want
the entire SPI flash to be protected. In Congatec's boards we only
need to protect the last 16KiB sector because it contains data that
are pre-programmed in the factory and we don't want the user to erase
it.

That's why we set in the congatec board code the BP bits to 001.

>
> m25p32
>
> BP2/BP1/BP0=protected sectors
> 000 = sector (none)
> 001 = sector (63)
> 010 = sector (63, 62)
> ....
> 111 = sector (all)
>
> I understand your concept of protecting sectors once you find the BP2,
> BP1 and BP0 bits on board and then you locked the particular sectors,

Yes, this is the idea.

> is it? it's totally reverse way that you're trying to do is it?

No, the logic is correct. In Congatec's board we only want the last
sector to be protected, hence BP2 BP1 BP0 is set to 001.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


More information about the U-Boot mailing list