Maximilian Brune has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/74735 )
Change subject: util/ifdtool/ifdtool.c: Fix default FMAP generation ......................................................................
util/ifdtool/ifdtool.c: Fix default FMAP generation
According to SPI programming guide, a region size of 0 as well as region base of 7FFFh indicates an unused/reserved region.
Signed-off-by: Maximilian Brune maximilian.brune@9elements.com Change-Id: I790d7f5631ecef3043b2c17c41430dc4fd854f72 --- M util/ifdtool/ifdtool.c 1 file changed, 18 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/35/74735/1
diff --git a/util/ifdtool/ifdtool.c b/util/ifdtool/ifdtool.c index 625b4cf..131daa8 100644 --- a/util/ifdtool/ifdtool.c +++ b/util/ifdtool/ifdtool.c @@ -1027,8 +1027,11 @@ struct region sorted_regions[MAX_REGIONS] = { 0 }; for (unsigned int i = 0; i < max_regions; i++) { struct region region = get_region(frba, i); - /* is region invalid? */ - if (region.size < 1) + + /* A region size of 0 is an indicator of an unused region as well as a region + * base of 7FFFh (according to SPI programming guide) + */ + if (region.size < 1 || region.base == 0x07FFF000) continue;
/* Here we decide to use the coreboot generated FMAP BIOS region, instead of