summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/cbmem.c2
-rw-r--r--src/lib/cbmem_common.c11
-rw-r--r--src/lib/dynamic_cbmem.c4
3 files changed, 14 insertions, 3 deletions
diff --git a/src/lib/cbmem.c b/src/lib/cbmem.c
index 0b24ad2af9..5f834b74f4 100644
--- a/src/lib/cbmem.c
+++ b/src/lib/cbmem.c
@@ -243,7 +243,7 @@ int cbmem_recovery(int is_wakeup)
cbmem_fail_resume();
}
- cbmem_arch_init();
+ cbmem_run_init_hooks();
car_migrate_variables();
return !found;
}
diff --git a/src/lib/cbmem_common.c b/src/lib/cbmem_common.c
index a800173ffd..438fd7f8b9 100644
--- a/src/lib/cbmem_common.c
+++ b/src/lib/cbmem_common.c
@@ -47,3 +47,14 @@ void cbmem_print_entry(int n, u32 id, u64 base, u64 size)
}
#endif /* !__PRE_RAM__ */
+
+/* FIXME: Replace with CBMEM_INIT_HOOKS API. */
+#if !IS_ENABLED(CONFIG_ARCH_X86)
+void cbmem_run_init_hooks(void)
+{
+}
+
+void __attribute__((weak)) cbmem_fail_resume(void)
+{
+}
+#endif
diff --git a/src/lib/dynamic_cbmem.c b/src/lib/dynamic_cbmem.c
index 5eddbcaf18..ce4e625f55 100644
--- a/src/lib/dynamic_cbmem.c
+++ b/src/lib/dynamic_cbmem.c
@@ -171,7 +171,7 @@ void cbmem_initialize_empty(void)
printk(BIOS_DEBUG, "CBMEM: root @ %p %d entries.\n",
root, root->max_entries);
- cbmem_arch_init();
+ cbmem_run_init_hooks();
/* Migrate cache-as-ram variables. */
car_migrate_variables();
@@ -249,7 +249,7 @@ int cbmem_initialize(void)
root->locked = 1;
#endif
- cbmem_arch_init();
+ cbmem_run_init_hooks();
/* Migrate cache-as-ram variables. */
car_migrate_variables();