<p>Raul Rangel has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/27033">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">x86 smm: Increase SMM stack size to 2K<br><br>GSMI Set Event Log is taking more than 1K in stack. This causes the<br>stack to overflow into the adjacent stack. This has the side effect of<br>causing any CPU waiting for the SMI handler to complete to crash when<br>the lock is unlocked because the return pointer has been smashed.<br><br>BUG=b:80539294<br>TEST=built on grunt and tested by running `halt` from the OS.<br><br>Change-Id: Ib170c7d03909ef3d20831726b285178a75007b06<br>Signed-off-by: Raul E Rangel <rrangel@chromium.org><br>---<br>M src/cpu/x86/Kconfig<br>M src/cpu/x86/mp_init.c<br>2 files changed, 9 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/33/27033/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/cpu/x86/Kconfig b/src/cpu/x86/Kconfig</span><br><span>index a20febb..1c5514e 100644</span><br><span>--- a/src/cpu/x86/Kconfig</span><br><span>+++ b/src/cpu/x86/Kconfig</span><br><span>@@ -112,6 +112,14 @@</span><br><span>          This option determines the size of the heap within the SMM handler</span><br><span>           modules.</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+config SMM_MODULE_STACK_SIZE</span><br><span style="color: hsl(120, 100%, 40%);">+  hex</span><br><span style="color: hsl(120, 100%, 40%);">+   default 0x800</span><br><span style="color: hsl(120, 100%, 40%);">+ depends on SMM_TSEG</span><br><span style="color: hsl(120, 100%, 40%);">+   help</span><br><span style="color: hsl(120, 100%, 40%);">+    This option determines the size of the stack within the SMM handler</span><br><span style="color: hsl(120, 100%, 40%);">+   modules.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> config SMM_LAPIC_REMAP_MITIGATION</span><br><span>    bool</span><br><span>         default y if NORTHBRIDGE_INTEL_I945</span><br><span>diff --git a/src/cpu/x86/mp_init.c b/src/cpu/x86/mp_init.c</span><br><span>index a696cd0..9fd10f7 100644</span><br><span>--- a/src/cpu/x86/mp_init.c</span><br><span>+++ b/src/cpu/x86/mp_init.c</span><br><span>@@ -792,7 +792,7 @@</span><br><span>   /* There are num_cpus concurrent stacks and num_cpus concurrent save</span><br><span>          * state areas. Lastly, set the stack size to 1KiB. */</span><br><span>       struct smm_loader_params smm_params = {</span><br><span style="color: hsl(0, 100%, 40%);">-         .per_cpu_stack_size = 1 * KiB,</span><br><span style="color: hsl(120, 100%, 40%);">+                .per_cpu_stack_size = CONFIG_SMM_MODULE_STACK_SIZE,</span><br><span>          .num_concurrent_stacks = num_cpus,</span><br><span>           .per_cpu_save_state_size = save_state_size,</span><br><span>          .num_concurrent_save_states = num_cpus,</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/27033">change 27033</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/27033"/><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: Ib170c7d03909ef3d20831726b285178a75007b06 </div>
<div style="display:none"> Gerrit-Change-Number: 27033 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Raul Rangel <rrangel@chromium.org> </div>