[flashrom] [RFC + PATCH] lock command for flashrom

Mathias Krause mathias.krause at secunet.com
Fri Jan 28 10:03:27 CET 2011


flashrom currently tries to unlock the chip before each read/write/erase
command. To prevent further modifications of the chip content, e.g. for
security reasons, it would be helpful if flashrom would also be capable
of the opposite operation. I talked with Carl-Daniel a little about it
and he mentioned problems like having to implement features like partial
locks, chips that cannot be unlocked after being locked, etc. To support
those features and handle the problematic chips something more than this
little patch can do must be implemented. But for now it would be nice to
have *something*. See it as a starting point to solve the much bigger

This patch adds a function pointer to struct flashchip and a command
line option to trigger this function to enable full flash chip write
protection. It's currently only implemented for the Atmel AT26DF081A
since this is the chip I'm currently working with and which I can test

ToDo: Add man page documentation.

Signed-off-by: Mathias Krause <mathias.krause at secunet.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: flash-lock.diff
Type: text/x-patch
Size: 8238 bytes
Desc: not available
URL: <http://www.flashrom.org/pipermail/flashrom/attachments/20110128/34a94721/attachment.diff>

More information about the flashrom mailing list