[flashrom] [PATCH] Clean up action parameter handling

Stefan Tauner stefan.tauner at alumni.tuwien.ac.at
Thu Jul 31 18:32:46 CEST 2014


On Thu, 31 Jul 2014 11:06:55 -0500 (CDT)
Nate Case <ncase at xes-inc.com> wrote:

> > Carl-Daniel is going on vacation tomorrow and won't be readily available
> > for at least a week. Also, we have a very bad history of merging
> > patches (not only foreign ones, or own too). So, if you don't hear
> > anything from him soonish, I suggest you either implement my proposition
> > (I believe that has a good probability of getting merged, apart from
> > some name bikeshedding), or continue with what you have so far and be
> > prepared to adapt your changes later. After all, your changes so far
> > are not that bold and have a relatively limited extent. That should not
> > cause to many troubles if changed later.
> 
> I decided to implement your proposal since I think it's cleaner;  I just
> submitted that as v2 a few minutes ago.  Feel free to bikeshed to your
> heart's content.

Thanks, that looks ok to me in general. I'd use just 'opts' for the
field name, but let's hear what Carl-Daniel thinks about it first.

>  
> > I am interested in hearing more about your further plans. We had
> > patches for a few related functionalities (e.g. setting the status
> > register of SPI flashes manually) and google is using a very extended
> > CLI for unlocking address ranges of flash chips that you might want to
> > look at first.
> 
> The most immediate need was to add an option to bypass the
> check_erased_range() call in erase_and_write_block_helper() to speed up
> erases.  Supposedly it reduced erase times from ~13 minutes to ~3 minutes.
> I don't know if this is a great idea or not since I had little to do with
> it;  I just saw it in an internal svn branch where they implemented it
> by adding an ugly "erase_check" argument in addition to read_it, write_it,
> etc.

The erase check is one part of the safety net, and allows to bail out
early if there are problems. The speedup you mentioned seems
unreasonable from such a change alone IMHO. It does only read the
erased block, so essentially the whole chip is read (in chunks) one
additional time with the check enabled. Anyway, I think you can base
your changes on this patch. And I personally would not mind if the
infrastructure for the skipping would end up in flashrom as well (but
disabled in cli_classic.c).

-- 
Kind regards/Mit freundlichen Grüßen, Stefan Tauner




More information about the flashrom mailing list