summaryrefslogtreecommitdiff
path: root/src/lib/dynamic_cbmem.c
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2014-01-06 17:20:31 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2014-01-22 20:54:57 +0100
commit2d8520b275d47e0670e7f9e166e0f63c32855548 (patch)
tree71b69480daeb5e800b3863448cd0776dba265b7c /src/lib/dynamic_cbmem.c
parent97e1b11f416aa23787e71b6133702b82daf1552e (diff)
CBMEM: Replace cbmem_initialize() with cbmem_recovery()
The replacement function confirms CBMEM TOC is wiped clean on power cycles and resets. It also introduces compatibility interface to ease up transition to DYNAMIC_CBMEM. Change-Id: Ic5445c5bff4aff22a43821f3064f2df458b9f250 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/4668 Reviewed-by: Aaron Durbin <adurbin@google.com> Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/lib/dynamic_cbmem.c')
-rw-r--r--src/lib/dynamic_cbmem.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/dynamic_cbmem.c b/src/lib/dynamic_cbmem.c
index 0ab8f81224..0cc6295545 100644
--- a/src/lib/dynamic_cbmem.c
+++ b/src/lib/dynamic_cbmem.c
@@ -256,6 +256,16 @@ int cbmem_initialize(void)
return 0;
}
+int cbmem_recovery(int is_wakeup)
+{
+ int rv = 0;
+ if (!is_wakeup)
+ cbmem_initialize_empty();
+ else
+ rv = cbmem_initialize();
+ return rv;
+}
+
static void *cbmem_base(void)
{
struct cbmem_root *root;