[coreboot] flashrom: Probe for up to 3 flash chips. [was: Fix ambiguity, if a board is equipped with more than one chip]

Claus Gindhart claus.gindhart at kontron.com
Tue May 6 09:01:07 CEST 2008


Kontron Modular Computers GmbH
Geschaeftsfuehrer / Managing Directors: Ulrich Gehrmann, Thomas Sabisch 
Sitz der Gesellschaft / Registered Office: Kaufbeuren, Rechtsform / Legal: GmbH 
Amtsgericht / Local District Court Kempten, HRB Nr. / Trade Register No. 6195
 
The information contained in this document is CONFIDENTIAL and property of Kontron.
Any unauthorized review, use, disclosure or distribution is prohibited without express
written consent of Kontron. If you are not the intended recipient, please contact the
sender and destroy all copies of the original message and enclosed attachments.

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen und ist
Eigentum von Kontron. Die Verwendung und Weitergabe von jeglichen Inhalten ist
ohne ausdrückliche schriftliche Genehmigung von Kontron strikt untersagt. Wenn Sie
diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und
vernichten diese Mail und enthaltene Dokumente.

-----Ursprüngliche Nachricht-----
Von: Peter Stuge [mailto:peter at stuge.se]
Gesendet: Mo 5/5/2008 17:49
An: coreboot at coreboot.org
Cc: Claus Gindhart
Betreff: Re: [coreboot] flashrom: Probe for up to 3 flash chips. [was: Fix ambiguity, if a board is equipped with more than one chip]
 
On Mon, May 05, 2008 at 05:07:45PM +0200, Carl-Daniel Hailfinger wrote:
> Can we support probing for an arbitrary number of chips instead?

I think that is overly ambitious.

flashrom assumes that flash chips are top-aligned at 4GB so there
will not be very many flash chips actually connected in a way that
flashrom understands today.


> By using an array flash[] instead of flash, flash2 and flash3 this
> could be done in a loop without limits on the number of detected
> chips.

I thought [] too, but I set a fixed size. It's simple and cheap to
increase the size should there be need, and the code will deal.


> What happens if there are multiple flash chips of the same
> technology?

If same name, then same size and at same address => larger problem.


> Overall, I really like what the patch does.

Yes, me too.


Claus, can you please test the attached patch and send an Acked-by
line it if it works, then I'll commit.

Thanks!


//Peter

Hi Peter,

i've tested the patch, it worked; i've acked-by the attached patch.

This was my screen output
------------8-<----------
Multiple flash chips were detected: SST49LF008A M25P16 at ICH9
Please specify which chip to use with the -c <chipname> option.
----------8-<----------

About the question "Multiple flash chips of the same technology": In my opinion, this is a problem, which has to be solved in a different way, even in regards, how this could be presented to the user. One possible approach could be the following:

If we have multiple chips of the same type, all will be detected by the same probe-function. If we know, that this technology can support up to n identical chips, we could add n lines to flashchips.c, with the device names
   "chipxxx#1"
   "chipxxx#2"
   ...
   "chipxxx#n"
It's up to the probe function then, to handle this; the flashrom.c would need to be changed.

But for the moment i would recommend to wait, until such a board appears on somebody's desk.


-- 

Mit freundlichen Grüßen / Best regards

 Claus Gindhart
 SW R&D 
 Kontron Modular Computers
 phone :++49 (0)8341-803-374
 mailto:claus.gindhart at kontron.com 



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20080506/32d36858/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fr.multichip.patch
Type: text/x-patch
Size: 2200 bytes
Desc: fr.multichip.patch
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20080506/32d36858/attachment.patch>


More information about the coreboot mailing list