<p>Julien Viard de Galbert has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/25437">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">FSP 2.0: Add fsp_relax_security<br><br>Change-Id: I972e7387c2612ee0053df21afb55b0b264961174<br>Signed-off-by: Julien Viard de Galbert <jviarddegalbert@online.net><br>---<br>M src/drivers/intel/fsp2_0/include/fsp/api.h<br>M src/drivers/intel/fsp2_0/notify.c<br>2 files changed, 15 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/37/25437/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/drivers/intel/fsp2_0/include/fsp/api.h b/src/drivers/intel/fsp2_0/include/fsp/api.h</span><br><span>index 123db30..66e4291 100644</span><br><span>--- a/src/drivers/intel/fsp2_0/include/fsp/api.h</span><br><span>+++ b/src/drivers/intel/fsp2_0/include/fsp/api.h</span><br><span>@@ -62,6 +62,10 @@</span><br><span> uint8_t fsp_memory_mainboard_version(void);</span><br><span> uint8_t fsp_memory_soc_version(void);</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+/* The following function is used to allow not calling FSP notify in</span><br><span style="color: hsl(120, 100%, 40%);">+   READY_TO_BOOT and END_OF_FIRMWARE phases. */</span><br><span style="color: hsl(120, 100%, 40%);">+bool fsp_relax_security(void);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> /* Callback after processing FSP notify */</span><br><span> void platform_fsp_notify_status(enum fsp_notify_phase phase);</span><br><span> </span><br><span>diff --git a/src/drivers/intel/fsp2_0/notify.c b/src/drivers/intel/fsp2_0/notify.c</span><br><span>index 34a4262..3d18e83 100644</span><br><span>--- a/src/drivers/intel/fsp2_0/notify.c</span><br><span>+++ b/src/drivers/intel/fsp2_0/notify.c</span><br><span>@@ -67,10 +67,21 @@</span><br><span>       platform_fsp_notify_status(phase);</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+__attribute__((weak)) bool fsp_relax_security(void)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+   return false;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> static void fsp_notify_dummy(void *arg)</span><br><span> {</span><br><span>   enum fsp_notify_phase phase = (uint32_t)arg;</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+      if ((phase == READY_TO_BOOT) && fsp_relax_security()) {</span><br><span style="color: hsl(120, 100%, 40%);">+               printk(BIOS_CRIT, "Relax Security Mode,"</span><br><span style="color: hsl(120, 100%, 40%);">+                              " do not use in production!\n");</span><br><span style="color: hsl(120, 100%, 40%);">+          return;</span><br><span style="color: hsl(120, 100%, 40%);">+       }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>  /* Display the MTRRs */</span><br><span>      if (IS_ENABLED(CONFIG_DISPLAY_MTRRS))</span><br><span>                soc_display_mtrrs();</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/25437">change 25437</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/25437"/><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: I972e7387c2612ee0053df21afb55b0b264961174 </div>
<div style="display:none"> Gerrit-Change-Number: 25437 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Julien Viard de Galbert <jviarddegalbert@online.net> </div>