diff options
author | Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de> | 2009-11-26 14:50:52 +0000 |
---|---|---|
committer | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2009-11-26 14:50:52 +0000 |
commit | 650be85b5e6def7c67f82c72f8d572a6d40b03c1 (patch) | |
tree | 10dd150d40a182f9911df4020e2b004ef097f17e /m29f400bt.c | |
parent | 26922248354f70d0455afd46dec397b6174d83a5 (diff) | |
download | flashrom-650be85b5e6def7c67f82c72f8d572a6d40b03c1.zip flashrom-650be85b5e6def7c67f82c72f8d572a6d40b03c1.tar.gz |
This patch removes the extremely dangerous unprotect_jedec function which is not used at all within flashrom code, and renames the
Misleadingly named protect_jedec function to start_program_jedec. Calls to
protect_jedec after flashing are removed, because a) on LPC chips, the command
sent by protoct_jedec is not even in the datasheet and b) on parallel chips,
the block write command issued before already contained the software
protection sequence, so software protection is definitely enabled. This patch
also removes two clones of protect_jedec Background: JEDEC Software Data
Protection started as an optional feature, which was disabled on the first
single-voltage-flash chips. The software data protection is the need to prefix
a write with a magic "write enable" command, while without write protection
every write access into the chip's address space modifies flash content.
This magic write enable command also tells the flash chip that the programmer
obviously support sending write-enable commands and turns off the "any write
modifies flash content" mode. There also exist a two-command (6 writes)
sequence that disables Software Data Protection completey, which should only
ever be used to prepare updating with a device that can't handle software
data protection.
Corresponding to flashrom svn r783.
Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Diffstat (limited to 'm29f400bt.c')
-rw-r--r-- | m29f400bt.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/m29f400bt.c b/m29f400bt.c index 28e5da4..5c36db9 100644 --- a/m29f400bt.c +++ b/m29f400bt.c @@ -20,15 +20,6 @@ #include "flash.h" -void protect_m29f400bt(chipaddr bios) -{ - chip_writeb(0xAA, bios + 0xAAA); - chip_writeb(0x55, bios + 0x555); - chip_writeb(0xA0, bios + 0xAAA); - - programmer_delay(200); -} - void write_page_m29f400bt(chipaddr bios, uint8_t *src, chipaddr dst, int page_size) { @@ -194,7 +185,6 @@ int write_m29f400bt(struct flashchip *flash, uint8_t *buf) write_page_m29f400bt(bios, buf + 0x7c000, bios + 0x7c000, 16 * 1024); printf("\n"); - //protect_m29f400bt (bios); return 0; } @@ -248,7 +238,6 @@ int write_coreboot_m29f400bt(struct flashchip *flash, uint8_t *buf) write_page_m29f400bt(bios, buf + 0x30000, bios + 0x30000, 64 * 1024); printf("\n"); - //protect_m29f400bt (bios); return 0; } |