Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(395)

Issue 6612048: dynamically generate strides in fmap_find() to cover all of ROM (Closed)

Created:
9 years, 9 months ago by dhendrix
Modified:
9 years, 5 months ago
Base URL:
svn://coreboot.org/flashrom/trunk
Visibility:
Public.

Description

dynamically generate strides in fmap_find() to cover all of ROM This changes the hard coded array of strides to cover with an algorithm that will result in every bit of the ROM being checked. Now the algorithm starts at 1/2 the ROM's total size and divides its stride by 2 on each iteration. BUG= TEST=Tested on Alex with an FMAP structure at various alignments (2M, 1M, 64K, 4K, 16, 5, 1).

Patch Set 1 #

Patch Set 2 : adds brute force method if stride reaches 16 bytes, updates comments #

Patch Set 3 : minor fix to a comment #

Patch Set 4 : include stride == 16 in clever method, update comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -15 lines) Patch
M fmap.c View 1 2 3 2 chunks +37 lines, -15 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
dhendrix
9 years, 9 months ago (2011-03-09 22:43:34 UTC) #1
dhendrix
9 years, 9 months ago (2011-03-09 23:16:15 UTC) #2
Stefan Reinauer
LGTM
9 years, 9 months ago (2011-03-09 23:21:38 UTC) #3
Louis
Can we remove brute force loop? This loop increases 6 secs when reading EC flash.
9 years, 9 months ago (2011-03-11 05:43:32 UTC) #4
Stefan Reinauer
On 2011/03/11 05:43:32, Louis wrote: > Can we remove brute force loop? This loop increases ...
9 years, 9 months ago (2011-03-11 06:26:45 UTC) #5
david.hendricks
On 2011/03/11 06:26:45, Stefan Reinauer wrote: > On 2011/03/11 05:43:32, Louis wrote: > > Can ...
9 years, 9 months ago (2011-03-11 08:00:49 UTC) #6
dhendrix
9 years, 9 months ago (2011-03-11 08:03:40 UTC) #7
On 2011/03/11 08:00:49, david.hendricks wrote:
> On 2011/03/11 06:26:45, Stefan Reinauer wrote:
> > On 2011/03/11 05:43:32, Louis wrote:
> > > Can we remove brute force loop?  This loop increases 6 secs when reading
EC
> > > flash.
> > 
> > Only when there is no fmap. Will this be the case for us?

I don't think Louis' reply went thru... the answer is "yes" for older firmwares.

I'll try to fix the issue tomorrow and have it so the brute force method works
to fill the "oldcontents" buffer in doit(). That will eliminate the penalty and
give us the benefit.

Powered by Google App Engine
This is Rietveld 408576698