summaryrefslogtreecommitdiff
path: root/src/lib/dynamic_cbmem.c
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2015-04-06 16:12:58 -0500
committerAaron Durbin <adurbin@google.com>2015-04-07 23:02:32 +0200
commitb0d8f5e9cdab5c53cb8438175517ad171e9e5ddb (patch)
tree4e0903c2078bffec21ed433114c04e8e46ce0e78 /src/lib/dynamic_cbmem.c
parent8c5e4d93db845fc1942438d54eedbdefcfd2bbf9 (diff)
hardwaremain: explicitly call cbmem_initialize() early
Over the course of time there have been some implicit assumptions about cbmem being available for find() or add() operations. However, the cbmem area was never fully recovered until entering the state machine: BS_ON_ENTRY into BS_PRE_DEVICE. Correct this assumption by explicitly calling cbmem_initialize() in the EARLY_CBMEM_INIT case. This, however, doesn't fix timestamp_init() showing an error about not being able to allocate the timestamp table. Change-Id: Ib93fcc932e202ebd37822f07a278ea9694fe965c Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/9327 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/lib/dynamic_cbmem.c')
-rw-r--r--src/lib/dynamic_cbmem.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/lib/dynamic_cbmem.c b/src/lib/dynamic_cbmem.c
index 3b008c7614..c63cb46eb2 100644
--- a/src/lib/dynamic_cbmem.c
+++ b/src/lib/dynamic_cbmem.c
@@ -426,18 +426,7 @@ void *cbmem_entry_start(const struct cbmem_entry *entry)
#if !defined(__PRE_RAM__)
-#if IS_ENABLED(CONFIG_EARLY_CBMEM_INIT)
-/* selected cbmem can be initialized early in ramstage. Additionally, that
- * means cbmem console can be reinitialized early as well. The post_device
- * function is empty since cbmem was initialized early in ramstage. */
-static void init_cbmem_pre_device(void *unused)
-{
- cbmem_initialize();
-}
-
-BOOT_STATE_INIT_ENTRY(BS_PRE_DEVICE, BS_ON_ENTRY, init_cbmem_pre_device, NULL);
-#else
-
+#if !IS_ENABLED(CONFIG_EARLY_CBMEM_INIT)
static void init_cbmem_post_device(void *unused)
{
if (acpi_is_wakeup())