summaryrefslogtreecommitdiffstats
path: root/spi.h
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2010-08-18 15:12:43 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2010-08-18 15:12:43 +0000
commita366e83c530805e9b78177fe1623f8154ad9874f (patch)
treee9eb1f6a1701f8bbe8fdabf6bcfad87870e2547a /spi.h
parentec4bd95f3e35e3db25dd7167cd1b0f733da35ea6 (diff)
downloadflashrom-a366e83c530805e9b78177fe1623f8154ad9874f.zip
flashrom-a366e83c530805e9b78177fe1623f8154ad9874f.tar.gz
Add paranoid checks for correct values in essential registers in the SB600/SB700/... SPI driver. If something else changes the values we
Wrote, we will see severe read/write corruption. sb600spi will now abort the access and return an error if it detects this sort of corruption. Note: This corruption can be caused by a few different events: - IPMI/BMC/IMC accesses flash - Other software accesses flash The nature of flash access (read/write/ID/...) is irrelevant. Each such access will cause corruption for all other accesses happening at the same time. Thanks to Matthias Kretz for testing this patch. Corresponding to flashrom svn r1145. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Matthias Kretz <kretz@kde.org>
Diffstat (limited to 'spi.h')
-rw-r--r--spi.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/spi.h b/spi.h
index 6f5442a..b908603 100644
--- a/spi.h
+++ b/spi.h
@@ -124,5 +124,6 @@
#define SPI_INVALID_ADDRESS -3
#define SPI_INVALID_LENGTH -4
#define SPI_FLASHROM_BUG -5
+#define SPI_PROGRAMMER_ERROR -6
#endif /* !__SPI_H__ */
OpenPOWER on IntegriCloud