Aaron Durbin (adurbin@chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10299
-gerrit
commit e6f25cf80d4406edd9a44a5cc3ee27b5960f9a18 Author: Kyösti Mälkki kyosti.malkki@gmail.com Date: Tue May 26 00:30:10 2015 +0300
CBMEM: Fix S3 resume path without EARLY_CBMEM_INIT
Implementation for cbmem_find() did not work for boards without EARLY_CBMEM_INIT in romstage.
This is required for S3 resume to work on AGESA plaforms.
First broken with commit 0dff57d cbmem: switch over to imd-based cbmem
Change-Id: I9c1a4f6839f5d90f825787baad2a3824a04b5bdc Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- src/arch/x86/boot/cbmem.c | 1 - src/lib/imd_cbmem.c | 15 ++++----------- 2 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/src/arch/x86/boot/cbmem.c b/src/arch/x86/boot/cbmem.c index f48e46a..ad8aacb 100644 --- a/src/arch/x86/boot/cbmem.c +++ b/src/arch/x86/boot/cbmem.c @@ -56,7 +56,6 @@ static inline void *saved_ramtop(void)
unsigned long __attribute__((weak)) get_top_of_ram(void) { - printk(BIOS_WARNING, "WARNING: you need to define get_top_of_ram() for your chipset\n"); return 0; }
diff --git a/src/lib/imd_cbmem.c b/src/lib/imd_cbmem.c index fc12c25..6255b18 100644 --- a/src/lib/imd_cbmem.c +++ b/src/lib/imd_cbmem.c @@ -96,9 +96,8 @@ static struct imd *imd_init_backing_with_recover(struct imd *backing)
imd = imd_init_backing(backing); if (!ENV_RAMSTAGE) { - /* Early cbmem init platforms need to always use cbmem_top(). */ - if (IS_ENABLED(CONFIG_EARLY_CBMEM_INIT)) - imd_handle_init(imd, cbmem_top()); + imd_handle_init(imd, cbmem_top()); + /* Need to partially recover all the time outside of ramstage * because there's object storage outside of the stack. */ imd_handle_init_partial_recovery(imd); @@ -118,10 +117,7 @@ void cbmem_initialize_empty_id_size(u32 id, u64 size) struct imd imd_backing;
imd = imd_init_backing(&imd_backing); - - /* Early cbmem init platforms need to always use cbmem_top(). */ - if (IS_ENABLED(CONFIG_EARLY_CBMEM_INIT)) - imd_handle_init(imd, cbmem_top()); + imd_handle_init(imd, cbmem_top());
printk(BIOS_DEBUG, "CBMEM:\n");
@@ -157,10 +153,7 @@ int cbmem_initialize_id_size(u32 id, u64 size) struct imd imd_backing;
imd = imd_init_backing(&imd_backing); - - /* Early cbmem init platforms need to always use cbmem_top(). */ - if (IS_ENABLED(CONFIG_EARLY_CBMEM_INIT)) - imd_handle_init(imd, cbmem_top()); + imd_handle_init(imd, cbmem_top());
if (imd_recover(imd)) return 1;