Some vendors forget to disable regions properly and set their FRAP bits and FREG to 0. While not documented publicly this is being ignored by the chipset(s)[1] and hence flashrom should do so too. Without this patch flashrom prints a warning and disables writes. The check for i (region index) excludes the descriptor region which should not be becessary because specs suggest that the descriptor region should not be locked, but if vendors would follow the specs this patch would not have been necessary in the first place.
[1]: http://www.flashrom.org/pipermail/flashrom/2012-May/009303.html
Signed-off-by: Stefan Tauner stefan.tauner@student.tuwien.ac.at --- Justin, you could help testing this patch by applying it to the latest development source from http://flashrom.org/Downloads and sending us the flashrom output as before. You will need to specify -p internal when running that version of flashrom due to some other change. If you need any help feel free to ask or join our IRC channel.
ichspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ichspi.c b/ichspi.c index 0223ae3..d4849c2 100644 --- a/ichspi.c +++ b/ichspi.c @@ -1441,7 +1441,7 @@ static int ich9_handle_frap(uint32_t frap, int i)
base = ICH_FREG_BASE(freg); limit = ICH_FREG_LIMIT(freg); - if (base > limit) { + if (base > limit || (freg == 0 && i > 0)) { /* this FREG is disabled */ msg_pdbg2("0x%02X: 0x%08x FREG%i: %s region is unused.\n", offset, freg, i, region_names[i]);