futility: dump_fmap: Fix gap calculation
When fmap_base is non-zero, `futility dump_fmap -H` shows the addresses
relative to fmap_base, except that the "-entire flash-" line contains
absolute addresses. The problem also results in incorrect calculation of
the gap sizes.
Fix the problem by always showing the relative addresses.
Current output:
name start end size
-entire flash- 10090000 10110000 00080000
00070000 10110000 100a0000 // gap in -entire flash-
Fixed output:
name start end size // address relative to base=0x1009000
-entire flash- 00000000 00080000 00080000
00070000 10110000 100a0000 // gap in -entire flash-
BUG=none
TEST=make futil -j
TEST=futility dump_fmap -H ec.bin
BRANCH=none
Change-Id: Ifc164e7ff50bc3688e53518a280d309094f4152d
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/6342833
Reviewed-by: Julius Werner <jwerner@chromium.org>
4 files changed