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
commiteb0e7fc4f08dcc704565ae07c83878171cc71a44 (patch)
treee9eb1f6a1701f8bbe8fdabf6bcfad87870e2547a /spi.h
parenta84b0bd6ad4b5ab7220deb799f30515a9eb0d7fc (diff)
downloadast2050-flashrom-eb0e7fc4f08dcc704565ae07c83878171cc71a44.zip
ast2050-flashrom-eb0e7fc4f08dcc704565ae07c83878171cc71a44.tar.gz
Add paranoid checks to sb600spi driver
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