diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2015-05-26 00:30:10 +0300 |
---|---|---|
committer | Aaron Durbin <adurbin@chromium.org> | 2015-05-26 19:10:23 +0200 |
commit | e1fb052ed70b0471ece637f37db01bde6d4b9076 (patch) | |
tree | 8950e49321e861cebe87460886932b84d18d0c79 /src/lib | |
parent | 28d5ec9a7d8fe11175c8907cc6fa0305c469b194 (diff) |
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>
Reviewed-on: http://review.coreboot.org/10299
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/imd_cbmem.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/lib/imd_cbmem.c b/src/lib/imd_cbmem.c index fc12c2536d..6255b18932 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; |