[coreboot] [PATCH] flashrom: Detect non-ID responses
Carl-Daniel Hailfinger
c-d.hailfinger.devel.2006 at gmx.net
Mon May 11 16:44:42 CEST 2009
On 11.05.2009 16:08, FENG Yu Ning wrote:
> 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 at gmail.com>
>
Thanks, committed in r494.
> 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.
>
I first had short names, but I felt the long names would be more
readable since we have 3 different variables per ID and telling them
apart is easier when their names make their purpose painfully obvious. I
don't have a really strong opinion about this topic, though.
Please feel free to change variable naming to b1 and b2. I will probably
even ack it.
Regards,
Carl-Daniel
--
http://www.hailfinger.org/
More information about the coreboot
mailing list