Carl-Daniel Hailfinger wrote:
One way to detect this is to compare ID output with flash chip contents for the same location. If they are identical, there is a high chance you're not actually seeing ID output. Warn the user in that case.
There are already several examples on the list. This patch is much needed.
Minor opinion below and it is Acked-by: FENG Yu Ning fengyuning1984@gmail.com
Index: flashrom-real-jedec-id/jedec.c =================================================================== --- flashrom-real-jedec-id/jedec.c (Revision 470) +++ flashrom-real-jedec-id/jedec.c (Arbeitskopie) @@ -92,6 +92,7 @@ volatile uint8_t *bios = flash->virtual_memory; uint8_t id1, id2; uint32_t largeid1, largeid2; + uint32_t flashcontent1, flashcontent2;
I think b1 and b2 are enough for the names. Whenever the naming is not confusing, shorter names make me feel more comfortable. A taste matter, though.
yu ning