[coreboot-gerrit] Change in coreboot[master]: arch/x86: Restore forwarding table on resume for non EARLY_EBDA_INIT

Furquan Shaikh (Code Review) gerrit at coreboot.org
Sat Oct 28 09:23:20 CEST 2017


Furquan Shaikh has uploaded this change for review. ( https://review.coreboot.org/22207


Change subject: arch/x86: Restore forwarding table on resume for non EARLY_EBDA_INIT
......................................................................

arch/x86: Restore forwarding table on resume for non EARLY_EBDA_INIT

In commit c06a3f72 (arch/x86: initialize EBDA in S3 and S0/S5 path),
BDA and EBDA are wiped in the resume path. It results in coreboot
forwarding table address being wiped out since it is stored in the
BDA. This issue was resolved for platforms using EARLY_EBDA_INIT in
commit f46a9a0d (arch/x86: restore forwarding table on resume for
EARLY_EBDA_INIT). However platforms that do not use EARLY_EBDA_INIT
still run into the same issue and hence cbmem does not work on
resume. This change fixes the issue by using the stash/restore of
forwarding table address for all platforms using BDA.

BUG=b:68412690
TEST=Verified that cbmem works on S3 resume for coral.

Change-Id: I42ae2ccb0b4ce8e989b1032d82b9bb34d0d84db0
Signed-off-by: Furquan Shaikh <furquan at chromium.org>
---
M src/arch/x86/tables.c
1 file changed, 1 insertion(+), 4 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/07/22207/1

diff --git a/src/arch/x86/tables.c b/src/arch/x86/tables.c
index fc5870d..057f665 100644
--- a/src/arch/x86/tables.c
+++ b/src/arch/x86/tables.c
@@ -216,7 +216,6 @@
 	memcpy(cbmem_addr, (void *)addr, sz);
 }
 
-#if IS_ENABLED(CONFIG_EARLY_EBDA_INIT)
 static void restore_forwarding_table(void *dest)
 {
 	const struct cbmem_entry *fwd_entry;
@@ -233,7 +232,6 @@
 
 BOOT_STATE_INIT_ENTRY(BS_OS_RESUME, BS_ON_ENTRY,
 	restore_forwarding_table, (void *)FORWARDING_TABLE_ADDR);
-#endif
 
 void arch_write_tables(uintptr_t coreboot_table)
 {
@@ -256,8 +254,7 @@
 
 	sz = write_coreboot_forwarding_table(forwarding_table, coreboot_table);
 
-	if (IS_ENABLED(CONFIG_EARLY_EBDA_INIT))
-		stash_forwarding_table(forwarding_table, sz);
+	stash_forwarding_table(forwarding_table, sz);
 
 	forwarding_table += sz;
 	/* Align up to page boundary for historical consistency. */

-- 
To view, visit https://review.coreboot.org/22207
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I42ae2ccb0b4ce8e989b1032d82b9bb34d0d84db0
Gerrit-Change-Number: 22207
Gerrit-PatchSet: 1
Gerrit-Owner: Furquan Shaikh <furquan at google.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20171028/48264f7f/attachment.html>


More information about the coreboot-gerrit mailing list