<p>Marshall Dawson has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/25575">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">amd/stoneyridge: Reorder temp mtrr for flash<br><br>Relocate setting the temp range MTRR, for the SPI flash device, to<br>after completion of mp_init.  The mp_init functionality mirrors the<br>BSP's exact MTRR settings into the AP cores.  The ranges need to be<br>the correct calculated values and not some temporary setting.<br><br>This solves an MTRR sync issue on APUs with more than two cores,<br>i.e. more than a single compute-unit.  MTRRs within a CU are shared<br>so the AP always stays in sync.<br><br>BUG=b:77457944<br>TEST=run on Kahlee<br><br>Change-Id: Idc4cccdf721e252bc87d6cba62a3406a9f19b940<br>Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com><br>---<br>M src/soc/amd/stoneyridge/cpu.c<br>1 file changed, 3 insertions(+), 4 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/75/25575/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/soc/amd/stoneyridge/cpu.c b/src/soc/amd/stoneyridge/cpu.c</span><br><span>index 14b6881..15dd381 100644</span><br><span>--- a/src/soc/amd/stoneyridge/cpu.c</span><br><span>+++ b/src/soc/amd/stoneyridge/cpu.c</span><br><span>@@ -49,10 +49,6 @@</span><br><span> static void pre_mp_init(void)</span><br><span> {</span><br><span>       x86_setup_mtrrs_with_detect();</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-  /* The flash is now no longer cacheable. Reset to WP for performance. */</span><br><span style="color: hsl(0, 100%, 40%);">-        mtrr_use_temp_range(FLASH_BASE_ADDR, CONFIG_ROM_SIZE, MTRR_TYPE_WRPROT);</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span>     x86_mtrr_check();</span><br><span> }</span><br><span> </span><br><span>@@ -113,6 +109,9 @@</span><br><span>     /* Clear for take-off */</span><br><span>     if (mp_init_with_smm(dev->link_list, &mp_ops) < 0)</span><br><span>                 printk(BIOS_ERR, "MP initialization failure.\n");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ /* The flash is now no longer cacheable. Reset to WP for performance. */</span><br><span style="color: hsl(120, 100%, 40%);">+      mtrr_use_temp_range(FLASH_BASE_ADDR, CONFIG_ROM_SIZE, MTRR_TYPE_WRPROT);</span><br><span> }</span><br><span> </span><br><span> static void model_15_init(device_t dev)</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/25575">change 25575</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/25575"/><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: Idc4cccdf721e252bc87d6cba62a3406a9f19b940 </div>
<div style="display:none"> Gerrit-Change-Number: 25575 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Marshall Dawson <marshalldawson3rd@gmail.com> </div>