[coreboot-gerrit] Change in coreboot[master]: driver/spi: Warn when probed SF size differs from CONFIG_ROM_SIZE

Arthur Heymans (Code Review) gerrit at coreboot.org
Sun Feb 11 19:44:49 CET 2018


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 at 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;
 }
 

-- 
To view, visit https://review.coreboot.org/23695
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib5d6cc61ea29214d338d4c52ff799d6620a9cac7
Gerrit-Change-Number: 23695
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur at aheymans.xyz>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180211/07b5065c/attachment.html>


More information about the coreboot-gerrit mailing list