summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2013-06-19 10:41:18 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2013-07-11 05:04:22 +0200
commitc65001fcda55758d3be1f8bc0571672263f9ab57 (patch)
treec0b4ca6b8c97b681f4a65659b848dd3b15d950ae /src/lib
parentb25a9da6e7692036fd34ee9327bc082e10c29ae0 (diff)
downloadcoreboot-c65001fcda55758d3be1f8bc0571672263f9ab57.tar.xz
Fix CBMEM console use with CAR_MIGRATION
With EARLY_CBMEM_INIT and CAR_MIGRATION selected, cbmemc_reinit() was called twice during romstage. This effectively deleted output of romstage in CBMEM console. Change-Id: I21072a319c0e4a5f695b0573bc017bf7921fc663 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/3609 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@google.com>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/cbmem_console.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/lib/cbmem_console.c b/src/lib/cbmem_console.c
index de452d781d..1b584028b4 100644
--- a/src/lib/cbmem_console.c
+++ b/src/lib/cbmem_console.c
@@ -193,7 +193,7 @@ static void copy_console_buffer(struct cbmem_console *new_cons_p)
new_cons_p->buffer_cursor = cursor;
}
-void cbmemc_reinit(void)
+static void cbmemc_reinit_(void)
{
struct cbmem_console *cbm_cons_p;
@@ -221,5 +221,12 @@ void cbmemc_reinit(void)
current_console_set(cbm_cons_p);
}
-/* Call cbmemc_reinit() at CAR migration time. */
-CAR_MIGRATE(cbmemc_reinit)
+void cbmemc_reinit(void)
+{
+#if !CONFIG_CAR_MIGRATION || !defined(__PRE_RAM__)
+ cbmemc_reinit_();
+#endif
+}
+
+/* Call cbmemc_reinit_() at CAR migration time. */
+CAR_MIGRATE(cbmemc_reinit_)