diff options
author | Daniel Lenski <dlenski@gmail.com> | 2012-02-15 23:40:23 +0000 |
---|---|---|
committer | Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> | 2012-02-15 23:40:23 +0000 |
commit | df5d5917be397d12d42e37ae1547a29ccf79a1ef (patch) | |
tree | b762698047deda76ed7e16c43552c3b388bc3e48 /flashrom.c | |
parent | 8bed718b50c3d193e79bb1edd762dbf4c4f2d459 (diff) | |
download | flashrom-df5d5917be397d12d42e37ae1547a29ccf79a1ef.zip flashrom-df5d5917be397d12d42e37ae1547a29ccf79a1ef.tar.gz |
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.
This patch is based on the idea and code of Daniel Lenski.
Corresponding to flashrom svn r1493.
Signed-off-by: Daniel Lenski <dlenski@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Diffstat (limited to 'flashrom.c')
-rw-r--r-- | flashrom.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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)) { msg_cinfo("===\n"); if (flash->tested & TEST_BAD_MASK) { |