aboutsummaryrefslogtreecommitdiff
path: root/src/lib/hardwaremain.c
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2015-04-21 11:57:18 -0500
committerPatrick Georgi <pgeorgi@google.com>2015-04-23 16:35:51 +0200
commitbe34797e4c2a5b74bb8fcbbe9e4301b471d185e5 (patch)
treed7067dc06722a83c26e161eedce3143f7ab2ee1c /src/lib/hardwaremain.c
parentd70bf7cc219f8478e8336f60542a50c078bf531b (diff)
ramstage: don't drop cbmem console
In commit b0d8f5e9 I moved the call to cbmem_initialize() in the CONFIG_EARLY_CBMEM_INIT case to the very beginning of ramstage. However, that caused an issue in the ordering of the cbmem console driver in that it expects cbmemc_init() to be called prior to cbmemc_reinit(). Therefore, ensure console is called as the first thing even if some time is lost w.r.t. timestamp tracking. Change-Id: I42137d28116e0bccb9235f4e3f394d4fd8b84e37 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/9933 Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com> Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/lib/hardwaremain.c')
-rw-r--r--src/lib/hardwaremain.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/hardwaremain.c b/src/lib/hardwaremain.c
index 3d1b8f2a58..295edcdd69 100644
--- a/src/lib/hardwaremain.c
+++ b/src/lib/hardwaremain.c
@@ -434,6 +434,12 @@ static void boot_state_schedule_static_entries(void)
void main(void)
{
+ /* console_init() MUST PRECEDE ALL printk()! Additionally, ensure
+ * it is the very first thing done in ramstage.*/
+ console_init();
+
+ post_code(POST_CONSOLE_READY);
+
/*
* CBMEM needs to be recovered in the EARLY_CBMEM_INIT case because
* timestamps, APCI, etc rely on the cbmem infrastructure being
@@ -448,11 +454,6 @@ void main(void)
timestamp_add_now(TS_START_RAMSTAGE);
post_code(POST_ENTRY_RAMSTAGE);
- /* console_init() MUST PRECEDE ALL printk()! */
- console_init();
-
- post_code(POST_CONSOLE_READY);
-
/* Handoff sleep type from romstage. */
#if CONFIG_HAVE_ACPI_RESUME
acpi_is_wakeup();