diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2016-10-04 09:48:18 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-10-17 15:23:12 -0700 |
commit | 1fd0b10f791f045fdf61195f9769d9c637137113 (patch) | |
tree | 1491e7a89426534ab1e49c39669f9970e7b6ae95 | |
parent | 0d503c7923ed80e1b4d208c81da38116b454cd18 (diff) | |
download | vboot-1fd0b10f791f045fdf61195f9769d9c637137113.tar.gz |
bdb: Enable futility-show to dump more header info
This change makes futility show command dump more information
of the BDB header.
BUG=chromium:649554
BRANCH=none
TEST=make runtests
$ futility show --type bdb ~/tmp/rotor/bin/coreboot.rom
Change-Id: I8a10ed03b673879ab80f777b34863e670d37cd8c
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/399061
Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r-- | futility/bdb_helper.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/futility/bdb_helper.c b/futility/bdb_helper.c index daaf9160..b0f2dcd0 100644 --- a/futility/bdb_helper.c +++ b/futility/bdb_helper.c @@ -82,6 +82,11 @@ static void show_bdb_header(const uint8_t *bdb) printf("BDB Header:\n"); printf(" Struct Version: 0x%x:0x%x\n", header->struct_major_version, header->struct_minor_version); + printf(" Struct Size: %d\n", header->struct_size); + printf(" Load Address: 0x%" PRIx64 "\n", header->bdb_load_address); + printf(" Size: %d\n", header->bdb_size); + printf(" Signed Size: %d\n", header->signed_size); + printf(" OEM0 Size: %d\n", header->oem_area_0_size); } static void show_bdbkey_info(const uint8_t *bdb) @@ -104,12 +109,13 @@ static void show_data_header(const uint8_t *bdb) const struct bdb_data *data = bdb_get_data(bdb); printf("Data Header:\n"); - printf(" Struct Version: 0x%x:0x%x\n", + printf(" Struct Version: 0x%x:0x%x\n", data->struct_major_version, data->struct_minor_version); - printf(" # of Hashes: %d\n", data->num_hashes); - printf(" Hash Entry Size:%d\n", data->hash_entry_size); - printf(" Signed Size: %d\n", data->signed_size); - printf(" Description: %s\n", data->description); + printf(" Data Version: %d\n", data->data_version); + printf(" # of Hashes: %d\n", data->num_hashes); + printf(" Hash Entry Size: %d\n", data->hash_entry_size); + printf(" Signed Size: %d\n", data->signed_size); + printf(" Description: %s\n", data->description); } static void show_hashes(const uint8_t *bdb) |