[flashrom] Broken OPMENUs (was: #flashrom talk (atomix vs. stefanct))

Stefan Tauner stefan.tauner at student.tuwien.ac.at
Thu Aug 8 16:03:00 CEST 2013


We could get this to work eventually today:
http://paste.flashrom.org/view.php?id=1747

But coincidentally this was the second occurrence of a very broken
OPMENU in a just a few days and I like to evaluate our options here.

There are two problems with board above. The first one is the
configuration of the OPMENU register which specifies the RDID probe
command to be opcode + address bytes although RDID does not require an
address (and flashrom naturally does not send dummy bytes by default):
        OP        Type      Pre-OP
op[0]: 0x9f, read  w/  addr, none

I could fix this with an ugly hack that is not mergeable as is and is
not easy to refine to something beautiful either I think: I have
enlarged the write buffer of the RDID command to 4 Bytes and use its
content as dummy bytes for the address the chipset wanted. Together with
my check_trans patch we may be able to design something generic that is
somewhat sane and mergeable. Alternatively we could handle some of the
problems inside ichspi.c by rewriting the read and write arrays: if we
want to write 1, 2 or 3 bytes we just need to create a new buffer and
copy the contents over. We "just" need to make sure the flash chip
happily ignores the (well chosen) dummy bytes and the read back values
get repeated in the right rhythm... the more I think about it the less
probable a mergeable solution seems possible, it rather worked for RDID
just by accident and not many other opcodes would work. :/

The second problem with the board is related to the above. AAI on
ichspi does not work as can be seen here:
http://paste.flashrom.org/view.php?id=1746
After fixing the probing we ran into the problem that AAI transactions
are not compatible with the current state of flashrom. I need to look
into this (and AAI) in more detail, but my guess is that a similar
approach as outlined above could solve this too...
-- 
Kind regards/Mit freundlichen Grüßen, Stefan Tauner




More information about the flashrom mailing list