diff options
author | Peter Marheine <pmarheine@chromium.org> | 2023-03-08 09:27:40 +1100 |
---|---|---|
committer | Thomas Heijligen <src@posteo.de> | 2023-03-14 10:40:02 +0000 |
commit | dcd8ad0dcb077cec8791f4f9d8d5eed9f4db86e3 (patch) | |
tree | 1d8b53f96d1ba24a7813454fa6df73c198121a7e /dmi.c | |
parent | 0e8902f1ff2b927bb91a5e89e4fde3d8d71f6692 (diff) | |
download | flashrom-dcd8ad0dcb077cec8791f4f9d8d5eed9f4db86e3.tar.gz flashrom-dcd8ad0dcb077cec8791f4f9d8d5eed9f4db86e3.tar.bz2 flashrom-dcd8ad0dcb077cec8791f4f9d8d5eed9f4db86e3.zip |
fmap: ignore areas with zero size
It's impossible for flashrom_layout to represent zero-sized flash
regions but it is possible for a fmap to contain a zero-sized region
which causes the resulting layout to fail layout_sanity_checks(),
preventing use of that fmap.
Because it would very rarely make sense to be able to operate on
zero-sized regions anyway and changing layouts to be able to support
zero-size regions would entail large changes, instead ignore zero-size
regions when present in fmap.
TEST=Warning is now printed when using fmap that contains a zero-sized
area, and operations on other regions are allowed to proceed.
BUG=b:271933192
Change-Id: Ie20971f779acece7a0b3b8f38796fff128ce689a
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/73571
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Thomas Heijligen <src@posteo.de>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Diffstat (limited to 'dmi.c')
0 files changed, 0 insertions, 0 deletions