Commit Graph

12 Commits

Author SHA1 Message Date
Bill Richardson
a4090b5a61 Addtional -h args to dump_fmap will ignore overlap errors.
Snow was built with overlapping regions in its FMAP, so when we use
dump_fmap -h to see what the layout is, it complains and dies. This change
lets it keep going if you give it multiple -h args. Nothing else is different.

BUG=none
BRANCH=none
TEST=manual

This complains and quits:

  dump_fmap -h image-snow.bin

This complains and keeps going:

  dump_fmap -hh image-snow.bin

Change-Id: Ia4592b9ba6963b8c5064dd6f51625e9495db2845
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39551
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2012-12-11 11:13:12 -08:00
Bill Richardson
ae98bf0572 Improved pretty-print for dump_fmap, with gap detection
BUG=none
BRANCH=none
TEST=manual

Use it to dump the FMAP from a firmware image:

  dump_fmap -h /build/link/firmware/image-link.bin

Change-Id: I94fb9396ea886b072845fadef6ef1e1e2ff85a59
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/30784
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2012-08-17 17:30:06 -07:00
Bill Richardson
9429f8807a Add human-readable output option to dump_fmap
The '-h' option will display the FMAP in a heirarchical nested format.

BUG=none
TEST=manual

$ dump_fmap -h stumpy_bios.bin

SI_BIOS                00180000   00800000   680000
  RO_SECTION            0670000    0800000   190000
    BOOT_STUB            700000     800000   100000
    GBB                  680000     700000    80000
    RO_PADDING           670840     680000     f7c0
    RO_FRID              670800     670840       40
    FMAP                 670000     670800      800
  RO_UNUSED_2           0590000    0670000    e0000
  RO_VPD                0570000    0590000    20000
  RO_UNUSED_1           0400000    0570000   170000
  RW_SECTION_B          0300000    0400000   100000
    RW_FWID_B            3fffc0     400000       40
    FW_MAIN_B            310000     3fffc0    effc0
    VBLOCK_B             300000     310000    10000
  RW_SECTION_A          0200000    0300000   100000
    RW_FWID_A            2fffc0     300000       40
    FW_MAIN_A            210000     2fffc0    effc0
    VBLOCK_A             200000     210000    10000
  RW_SHARED             01e8000    0200000    18000
    DEV_CFG              1fc000     200000     4000
    RW_MRC_CACHE         1ec000     1fc000    10000
    RW_ENVIRONMENT       1e8000     1ec000     4000
  RW_UNUSED             0181000    01e8000    67000
  RW_VPD                0180000    0181000     1000
SI_ALL                 00000000   00180000   180000
  SI_ME                 0001000    0180000   17f000
  SI_DESC               0000000    0001000     1000

Change-Id: I41672b62528dac32663bc300ff013e8003d3efa8
Reviewed-on: https://gerrit.chromium.org/gerrit/28513
Commit-Ready: Bill Richardson <wfrichar@chromium.org>
Tested-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2012-07-26 16:25:34 -07:00
Bill Richardson
f47291926a Require -Wall -Werror for everything.
BUG=none
TEST=none

Change-Id: Ib9781238274285f73d00d8fca4ecda28fc2c6678
Reviewed-on: https://gerrit.chromium.org/gerrit/21748
Commit-Ready: Bill Richardson <wfrichar@chromium.org>
Tested-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
2012-05-03 17:38:57 -07:00
Bill Richardson
e7e8ecd3e2 Specify the sections you want dump_fmap to dump, if not all
BUG=none
TEST=manual

Compare

  dump_fmap -f bios.bin

with

  dump_fmap -f bios.bin FW_MAIN_A FW_MAIN_B GBB

Change-Id: Id567113ab5e7121422b89f00d9eb8c0b27942259
Reviewed-on: https://gerrit.chromium.org/gerrit/17179
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Tested-by: Bill Richardson <wfrichar@chromium.org>
Commit-Ready: Bill Richardson <wfrichar@chromium.org>
2012-03-02 09:44:30 -08:00
Louis Yung-Chieh Lo
9462e3e4c4 dump_fmap: flashrom format should generate [start, end] pair.
Rather than [start, size] pair.

BUG=no bug id
TEST=tested on chroot.

Change-Id: I34ec1f654f88f2e9a27b06f07825ff8bf4d9cd8e
Reviewed-on: http://gerrit.chromium.org/gerrit/6573
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Yung-Chieh Lo <yjlou%chromium.org@gtempaccount.com>
Tested-by: Yung-Chieh Lo <yjlou%chromium.org@gtempaccount.com>
2011-08-24 18:38:46 -07:00
Bill Richardson
77c02433b1 Add a -f option to dump_fmap to emit flashrom's layout format.
BUG=none
TEST=none

Change-Id: Ic4fe7d9962eee9b819b5517ea375ca0855ce6968
Reviewed-on: http://gerrit.chromium.org/gerrit/5019
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Tested-by: Bill Richardson <wfrichar@chromium.org>
2011-07-29 13:13:35 -07:00
Bill Richardson
9a2c3b25fd Add -p option to dump_fmap to make output prettier.
BUG=chromium-os:16456
TEST=manual

To test: run dump_fmap with and without the '-p' option.

Without -p, the output looks like this:

  area:            14
  area_offset:     0x00110000
  area_size:       0x000f0000 (983040)
  area_name:       RW_SECTION_B
  area:            15
  area_offset:     0x00110000
  area_size:       0x00010000 (65536)
  area_name:       VBLOCK_B

With -p, the output looks like this:

  RW_SECTION_B 1114112 983040
  VBLOCK_B 1114112 65536

Change-Id: I53a3527fa92d22fef16563b0a950366a3a3db8a4
Reviewed-on: http://gerrit.chromium.org/gerrit/2545
Tested-by: Rajesh Chenna <rchenna@google.com>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
2011-06-13 13:02:45 -07:00
Bill Richardson
ccdaa47b4d Support new flashmap layout in dev_debug_vboot.
Make dev_debug_vboot look first for the new section names, then the old ones.

Change-Id: I723f022bbbb23257c7c57db9543d7c35f524f95d

BUG=chromium-os:12611
TEST=manual

Rerun the steps that reproduce the problem as reported in the initial bug
report. You should see much more information.

Review URL: http://codereview.chromium.org/6621003
2011-03-03 18:08:18 -08:00
Che-Liang Chiou
305e9e5e85 Add load_firmware_test utility program
BUG=chromium-os:1302
TEST=emerge vboot_reference &&
	(load_firmware_test firmware_image.bin | grep LOAD_FIRMWARE_SUCCESS)

Review URL: http://codereview.chromium.org/6465018

Change-Id: I85fce39aaf4abb50bd70d126ac8c7cb892a7857b
2011-02-17 17:56:16 +08:00
Bill Richardson
cf0b05a9b7 Fix stupid wrong-stride bug.
Change-Id: Ic07d7409511adf1b30a9206cef0aa5d18a837897

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/3405024
2010-09-24 07:47:47 +08:00
Bill Richardson
60bcbe3cd4 New tools to help debug vboot failures.
This adds some tools to help us figure out why a particular kernel isn't
booting. Often we suspect it's because it was signed with the wrong keys, or
has flags restricting its use to certain boot modes. This change adds some
tools to extract and display all the keys from the BIOS, and try them on the
various kernels. We also display the sha1sum of all the keys we find, to
make comparing them easier.

Change-Id: I38e447bf95cb6c3a0b87aa949611bb135f2f94b4

BUG=chromeos-partner:888
TEST=manual

To test, obtain a root shell, and run dev_debug_vboot. You should see lots
of useful information go by.

Review URL: http://codereview.chromium.org/3303018
2010-09-09 14:53:56 -07:00