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

Issue 6681027: leverage flashrom fast partial read function to speed up VPD read. (Closed)

Created:
9 years, 9 months ago by Nick Sanders
Modified:
9 years, 7 months ago
Reviewers:
Louis, Benson Leung
CC:
chromium-os-reviews_chromium.org
Visibility:
Public.

Description

leverage flashrom fast partial read function to speed up VPD read. Dmitry, this is FYR. After this is committed, the VPD read can be much faster for OOBE to read default locale setting. Hi, David, please kindly review my code. Thanks. This patch basically re-wrote the flashromRead() and flashromWrite(). In the old code, to handle image on BIOS, we always read the whole flash chip content and then parse fmap. Since David's CL (http://codereview.chromium.org/6025013/) makes flashrom to parse fmap, we can just call flashrom partial read to get VPD partition. This reduce the VPD read from 5 secs to less than 1 sec. fmapNormalizeAreaName() is also refined because we no longer generate layout file for flashrom. Hence, user must specify the exact partition name on BIOS fmap, and unfortunately Mario BIOS' partition name has space. Some comments are also refined. Another minor improvement is that VPD utility now guesses the EPS base address by looking at eps->table_address. This is more user-friendly when handling the small VPD partition slice file: no longer specify -E argument. But still can use -E argument to overwrite it (with -O option). Change-Id: I7caa215ff775da78b7844586d45e5e1ceae3c7a9 BUG=chromium-os:12355 TEST=Tested on Z600 and Mario machine. On Z600, I manually run the below commands: 1. a standalone VPD.bin file 2. Mario BIOS with VPD 1.0 partition 3. Mario BIOS with blank VPD partition 4. old version of VPD 2.0 partition (located at 0x100) 5. new BIOS with SPD data present (at 0x400) and VPD 2.0 (at 0x600) On Mario machine, % vpd -i "RO VPD" -O % vpd -i "RO VPD" -s A=B Review URL: http://codereview.chromium.org/6646016 (cherry picked from commit 1de3ef287a62c8348d48a6a8914cd8e5381b43e9) Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=461cd4b

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+92 lines, -54 lines) Patch
M include/lib/flashrom.h View 1 chunk +4 lines, -4 lines 0 comments Download
M include/lib/fmap.h View 1 chunk +7 lines, -1 line 0 comments Download
M include/lib/vpd.h View 1 chunk +7 lines, -3 lines 0 comments Download
M lib/flashrom.c View 3 chunks +10 lines, -31 lines 0 comments Download
M lib/fmap.c View 1 chunk +1 line, -1 line 0 comments Download
M vpd.c View 14 chunks +63 lines, -14 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Nick Sanders
9 years, 9 months ago (2011-03-13 09:34:35 UTC) #1
Benson Leung
9 years, 9 months ago (2011-03-13 09:37:49 UTC) #2
On 2011/03/13 09:34:35, Nick Sanders wrote:

LGTM.

Powered by Google App Engine
This is Rietveld 408576698