<p>Richard Spiegel has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/28023">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">cpu/x86/smm/smm_module_loader.c: Avoid static analysis error "unused value"<br><br>In procedure smm_load_module, variables fxsave_size and fxsave_area are set<br>to 0 and NULL, but if CONFIG_SSE is enabled, they are overwritten. Change<br>the code setting the value to an "else" of the "if" testing CONFIG_SSE, thus<br>avoiding static analysis error.<br><br>BUG=b:112253891<br>TEST=Build and boot grunt.<br><br>Change-Id: I3042b037017a082378b53ee419c769c535632038<br>Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com><br>---<br>M src/cpu/x86/smm/smm_module_loader.c<br>1 file changed, 3 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/23/28023/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/cpu/x86/smm/smm_module_loader.c b/src/cpu/x86/smm/smm_module_loader.c</span><br><span>index e92fa05..7972686 100644</span><br><span>--- a/src/cpu/x86/smm/smm_module_loader.c</span><br><span>+++ b/src/cpu/x86/smm/smm_module_loader.c</span><br><span>@@ -371,13 +371,14 @@</span><br><span>            base += alignment_size;</span><br><span>      }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-   fxsave_size = 0;</span><br><span style="color: hsl(0, 100%, 40%);">-        fxsave_area = NULL;</span><br><span>  if (IS_ENABLED(CONFIG_SSE)) {</span><br><span>                fxsave_size = FXSAVE_SIZE * params->num_concurrent_stacks;</span><br><span>                /* FXSAVE area below all the stacks stack. */</span><br><span>                fxsave_area = params->stack_top;</span><br><span>          fxsave_area -= total_stack_size + fxsave_size;</span><br><span style="color: hsl(120, 100%, 40%);">+        } else {</span><br><span style="color: hsl(120, 100%, 40%);">+              fxsave_size = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+              fxsave_area = NULL;</span><br><span>  }</span><br><span> </span><br><span>        /* Does the required amount of memory exceed the SMRAM region size? */</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/28023">change 28023</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/28023"/><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: I3042b037017a082378b53ee419c769c535632038 </div>
<div style="display:none"> Gerrit-Change-Number: 28023 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Richard Spiegel <richard.spiegel@silverbackltd.com> </div>