Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/23695
Change subject: driver/spi: Warn when probed SF size differs from CONFIG_ROM_SIZE ......................................................................
driver/spi: Warn when probed SF size differs from CONFIG_ROM_SIZE
Some assumptions are made with respect to CONFIG_ROM_SIZE being the actual size of the boot medium, e.g. when automatically creating an fmap with and RW_MRC_CACHE region. It is therefore a good to warn the user when this is not the case.
Change-Id: Ib5d6cc61ea29214d338d4c52ff799d6620a9cac7 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/drivers/spi/spi_flash.c 1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/95/23695/1
diff --git a/src/drivers/spi/spi_flash.c b/src/drivers/spi/spi_flash.c index 93335de..b166d2a 100644 --- a/src/drivers/spi/spi_flash.c +++ b/src/drivers/spi/spi_flash.c @@ -374,6 +374,10 @@
printk(BIOS_INFO, "SF: Detected %s with sector size 0x%x, total 0x%x\n", flash->name, flash->sector_size, flash->size); + if (flash->size != CONFIG_ROM_SIZE) + printk(BIOS_ERR, "SF size 0x%x does not correspond to" + " CONFIG_ROM_SIZE 0x%x!!", flash->size, + CONFIG_ROM_SIZE); return 0; }