<p>Marshall Dawson has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/20965">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">arch/x86: make postcar TempRamExit call generic<br><br>Move the FSP-specific call for tearing down cache-as-RAM out of postcar.c<br>and replace it with an empty weak function.<br><br>This patch omits checking if (IS_ENABLED(CONFIG_FSP_CAR)).  The<br>temp_ram_exit.c file with the real fsp_temp_ram_exit() is only built<br>when CONFIG_FSP_CAR is true.<br><br>Change-Id: I9adbb1f2a7b2ff50d9f36d5a3640f63410c09479<br>Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com><br>---<br>M src/arch/x86/include/arch/cpu.h<br>M src/arch/x86/postcar.c<br>M src/drivers/intel/fsp2_0/temp_ram_exit.c<br>3 files changed, 16 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/65/20965/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/arch/x86/include/arch/cpu.h b/src/arch/x86/include/arch/cpu.h<br>index 8a44ef9..a379d20 100644<br>--- a/src/arch/x86/include/arch/cpu.h<br>+++ b/src/arch/x86/include/arch/cpu.h<br>@@ -297,6 +297,13 @@<br>  * utilizes prog_run() internally.<br>  */<br> void run_postcar_phase(struct postcar_frame *pcf);<br>+<br>+/*<br>+ * Generic call from postcar for relying on FSP or binayPI to<br>+ * perform the cache-as-ram teardown.<br>+ */<br>+void run_blob_temp_ram_exit(void);<br>+<br> #endif<br> <br> #endif /* ARCH_CPU_H */<br>diff --git a/src/arch/x86/postcar.c b/src/arch/x86/postcar.c<br>index 34a4335..099650a 100644<br>--- a/src/arch/x86/postcar.c<br>+++ b/src/arch/x86/postcar.c<br>@@ -13,18 +13,18 @@<br>  * GNU General Public License for more details.<br>  */<br> <br>+#include <arch/cpu.h><br> #include <cbmem.h><br> #include <console/console.h><br> #include <main_decl.h><br> #include <program_loading.h><br> #include <soc/intel/common/util.h><br>-#include <fsp/util.h><br>+<br>+__attribute__((weak)) void run_blob_temp_ram_exit(void) { /* do nothing */ }<br> <br> void main(void)<br> {<br>-     /* Call TempRamExit FSP API if enabled. */<br>-   if (IS_ENABLED(CONFIG_FSP_CAR))<br>-              fsp_temp_ram_exit();<br>+ run_blob_temp_ram_exit();<br> <br>  console_init();<br> <br>diff --git a/src/drivers/intel/fsp2_0/temp_ram_exit.c b/src/drivers/intel/fsp2_0/temp_ram_exit.c<br>index 21eb367..fe33b74 100644<br>--- a/src/drivers/intel/fsp2_0/temp_ram_exit.c<br>+++ b/src/drivers/intel/fsp2_0/temp_ram_exit.c<br>@@ -47,3 +47,8 @@<br>                die("TempRamExit returned an error!\n");<br>    }<br> }<br>+<br>+void run_blob_temp_ram_exit(void)<br>+{<br>+     fsp_temp_ram_exit();<br>+}<br></pre><p>To view, visit <a href="https://review.coreboot.org/20965">change 20965</a>. To unsubscribe, 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/20965"/><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: I9adbb1f2a7b2ff50d9f36d5a3640f63410c09479 </div>
<div style="display:none"> Gerrit-Change-Number: 20965 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Marshall Dawson <marshalldawson3rd@gmail.com> </div>