<p>Furquan Shaikh has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/22207">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">arch/x86: Restore forwarding table on resume for non EARLY_EBDA_INIT<br><br>In commit c06a3f72 (arch/x86: initialize EBDA in S3 and S0/S5 path),<br>BDA and EBDA are wiped in the resume path. It results in coreboot<br>forwarding table address being wiped out since it is stored in the<br>BDA. This issue was resolved for platforms using EARLY_EBDA_INIT in<br>commit f46a9a0d (arch/x86: restore forwarding table on resume for<br>EARLY_EBDA_INIT). However platforms that do not use EARLY_EBDA_INIT<br>still run into the same issue and hence cbmem does not work on<br>resume. This change fixes the issue by using the stash/restore of<br>forwarding table address for all platforms using BDA.<br><br>BUG=b:68412690<br>TEST=Verified that cbmem works on S3 resume for coral.<br><br>Change-Id: I42ae2ccb0b4ce8e989b1032d82b9bb34d0d84db0<br>Signed-off-by: Furquan Shaikh <furquan@chromium.org><br>---<br>M src/arch/x86/tables.c<br>1 file changed, 1 insertion(+), 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/07/22207/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/arch/x86/tables.c b/src/arch/x86/tables.c<br>index fc5870d..057f665 100644<br>--- a/src/arch/x86/tables.c<br>+++ b/src/arch/x86/tables.c<br>@@ -216,7 +216,6 @@<br>  memcpy(cbmem_addr, (void *)addr, sz);<br> }<br> <br>-#if IS_ENABLED(CONFIG_EARLY_EBDA_INIT)<br> static void restore_forwarding_table(void *dest)<br> {<br>  const struct cbmem_entry *fwd_entry;<br>@@ -233,7 +232,6 @@<br> <br> BOOT_STATE_INIT_ENTRY(BS_OS_RESUME, BS_ON_ENTRY,<br>       restore_forwarding_table, (void *)FORWARDING_TABLE_ADDR);<br>-#endif<br> <br> void arch_write_tables(uintptr_t coreboot_table)<br> {<br>@@ -256,8 +254,7 @@<br> <br>  sz = write_coreboot_forwarding_table(forwarding_table, coreboot_table);<br> <br>-   if (IS_ENABLED(CONFIG_EARLY_EBDA_INIT))<br>-              stash_forwarding_table(forwarding_table, sz);<br>+        stash_forwarding_table(forwarding_table, sz);<br> <br>      forwarding_table += sz;<br>       /* Align up to page boundary for historical consistency. */<br></pre><p>To view, visit <a href="https://review.coreboot.org/22207">change 22207</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/22207"/><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: I42ae2ccb0b4ce8e989b1032d82b9bb34d0d84db0 </div>
<div style="display:none"> Gerrit-Change-Number: 22207 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Furquan Shaikh <furquan@google.com> </div>