aboutsummaryrefslogtreecommitdiff
path: root/src/lib/hardwaremain.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/hardwaremain.c')
-rw-r--r--src/lib/hardwaremain.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/hardwaremain.c b/src/lib/hardwaremain.c
index 83bc7be522..5f06ca762a 100644
--- a/src/lib/hardwaremain.c
+++ b/src/lib/hardwaremain.c
@@ -26,6 +26,7 @@
#include <bootstate.h>
#include <console/console.h>
#include <console/post_codes.h>
+#include <cbmem.h>
#include <version.h>
#include <device/device.h>
#include <device/pci.h>
@@ -433,6 +434,14 @@ static void boot_state_schedule_static_entries(void)
void main(void)
{
+ /*
+ * CBMEM needs to be recovered in the EARLY_CBMEM_INIT case because
+ * timestamps, APCI, etc rely on the cbmem infrastructure being
+ * around. Explicitly recover it.
+ */
+ if (IS_ENABLED(CONFIG_EARLY_CBMEM_INIT))
+ cbmem_initialize();
+
/* Record current time, try to locate timestamps in CBMEM. */
timestamp_init(timestamp_get());