[coreboot-gerrit] Patch set updated for coreboot: AMD k8 fam10: Fix romstage handoff

Kyösti Mälkki (kyosti.malkki@gmail.com) gerrit at coreboot.org
Fri Jul 8 20:58:02 CEST 2016


Kyösti Mälkki (kyosti.malkki at gmail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15472

-gerrit

commit b4e5943fb3c32862f14874625c5455dc7c5bf215
Author: Kyösti Mälkki <kyosti.malkki at gmail.com>
Date:   Sun Jun 26 15:44:05 2016 +0300

    AMD k8 fam10: Fix romstage handoff
    
    It is not possible for cbmem_add() to complete succesfully before
    cbmem_recovery() is called. Adding more tables on S3 resume path
    is also not possible.
    
    Change-Id: Ic14857eeef2932562acee4a36f59c22ff4ca1a84
    Signed-off-by: Kyösti Mälkki <kyosti.malkki at gmail.com>
---
 src/cpu/amd/car/post_cache_as_ram.c | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/src/cpu/amd/car/post_cache_as_ram.c b/src/cpu/amd/car/post_cache_as_ram.c
index 22f39ba..ed0a3a5 100644
--- a/src/cpu/amd/car/post_cache_as_ram.c
+++ b/src/cpu/amd/car/post_cache_as_ram.c
@@ -130,19 +130,22 @@ void post_cache_as_ram(void)
 	if ((*lower_stack_boundary) != 0xdeadbeef)
 		printk(BIOS_WARNING, "BSP overran lower stack boundary.  Undefined behaviour may result!\n");
 
-	struct romstage_handoff *handoff;
-	handoff = romstage_handoff_find_or_add();
-	if (handoff != NULL)
-		handoff->s3_resume = acpi_is_wakeup_s3();
-	else
-		printk(BIOS_DEBUG, "Romstage handoff structure not added!\n");
-
 	int s3resume = acpi_is_wakeup_s3();
-	if (s3resume)
+
+	if (IS_ENABLED(CONFIG_EARLY_CBMEM_INIT) || s3resume)
 		cbmem_recovery(s3resume);
 
 	prepare_romstage_ramstack(s3resume);
 
+	if (IS_ENABLED(CONFIG_EARLY_CBMEM_INIT)) {
+		struct romstage_handoff *handoff;
+		handoff = romstage_handoff_find_or_add();
+		if (handoff != NULL)
+			handoff->s3_resume = s3resume;
+		else
+			printk(BIOS_DEBUG, "Romstage handoff structure not added!\n");
+	}
+
 	/* from here don't store more data in CAR */
 	if (family >= 0x1f && family <= 0x3f) {
 		/* Family 10h and 12h, 11h until shown otherwise */



More information about the coreboot-gerrit mailing list