path: root/flashrom.c
diff options
authorDaniel Lenski <>2012-02-15 23:40:23 +0000
committerStefan Tauner <>2012-02-15 23:40:23 +0000
commit65922a3860654676ece5de12fa21abac49e21e5e (patch)
treeb762698047deda76ed7e16c43552c3b388bc3e48 /flashrom.c
parentb286da7ffc0dd978bb6efe4530c3e904b57c4aca (diff)
Warn of one-time programmable (OTP) memory
Some flash chips contain OTP memory that we cannot read or write (yet). This prohibits us from cloning them, hence warn the user if we detect it. Not all variations of the tagged chips contain OTP memory. They are often only enabled on request or have there own ordering numbers. There is usually no way to distinguish them. Because this is a supposedly seldomly used feature the warning is shown in with dbg verbosity. The manpage is extended to describe the backgrounds a bit. Corresponding to flashrom svn r1493. This patch is based on the idea and code of Daniel Lenski. Signed-off-by: Daniel Lenski <> Signed-off-by: Stefan Tauner <> Acked-by: Carl-Daniel Hailfinger <>
Diffstat (limited to 'flashrom.c')
1 files changed, 7 insertions, 0 deletions
diff --git a/flashrom.c b/flashrom.c
index ee68344..a378e51 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -1560,6 +1560,13 @@ int selfcheck(void)
void check_chip_supported(const struct flashctx *flash)
+ if (flash->feature_bits & FEATURE_OTP) {
+ msg_cdbg("This chip may contain one-time programmable memory. "
+ "flashrom cannot read\nand may never be able to write "
+ "it, hence it may not be able to completely\n"
+ "clone the contents of this chip (see man page for "
+ "details).\n");
+ }
if (TEST_OK_MASK != (flash->tested & TEST_OK_MASK)) {
if (flash->tested & TEST_BAD_MASK) {
OpenPOWER on IntegriCloud