<p>Arthur Heymans has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/23695">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">driver/spi: Warn when probed SF size differs from CONFIG_ROM_SIZE<br><br>Some assumptions are made with respect to CONFIG_ROM_SIZE being the<br>actual size of the boot medium, e.g. when automatically creating an<br>fmap with and RW_MRC_CACHE region. It is therefore a good to warn the<br>user when this is not the case.<br><br>Change-Id: Ib5d6cc61ea29214d338d4c52ff799d6620a9cac7<br>Signed-off-by: Arthur Heymans <arthur@aheymans.xyz><br>---<br>M src/drivers/spi/spi_flash.c<br>1 file changed, 4 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/95/23695/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/drivers/spi/spi_flash.c b/src/drivers/spi/spi_flash.c</span><br><span>index 93335de..b166d2a 100644</span><br><span>--- a/src/drivers/spi/spi_flash.c</span><br><span>+++ b/src/drivers/spi/spi_flash.c</span><br><span>@@ -374,6 +374,10 @@</span><br><span> </span><br><span>     printk(BIOS_INFO, "SF: Detected %s with sector size 0x%x, total 0x%x\n",</span><br><span>                   flash->name, flash->sector_size, flash->size);</span><br><span style="color: hsl(120, 100%, 40%);">+       if (flash->size != CONFIG_ROM_SIZE)</span><br><span style="color: hsl(120, 100%, 40%);">+                printk(BIOS_ERR, "SF size 0x%x does not correspond to"</span><br><span style="color: hsl(120, 100%, 40%);">+                      " CONFIG_ROM_SIZE 0x%x!!", flash->size,</span><br><span style="color: hsl(120, 100%, 40%);">+                  CONFIG_ROM_SIZE);</span><br><span>    return 0;</span><br><span> }</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/23695">change 23695</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/23695"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ib5d6cc61ea29214d338d4c52ff799d6620a9cac7 </div>
<div style="display:none"> Gerrit-Change-Number: 23695 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Arthur Heymans <arthur@aheymans.xyz> </div>