summaryrefslogtreecommitdiff
path: root/src/lib/bootblock.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/bootblock.c')
-rw-r--r--src/lib/bootblock.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/bootblock.c b/src/lib/bootblock.c
index d7d0bb56f4..4a36a58f85 100644
--- a/src/lib/bootblock.c
+++ b/src/lib/bootblock.c
@@ -19,8 +19,11 @@
#include <console/console.h>
#include <delay.h>
#include <program_loading.h>
+#include <symbols.h>
#include <timestamp.h>
+DECLARE_OPTIONAL_REGION(timestamp);
+
__attribute__((weak)) void bootblock_mainboard_early_init(void) { /* no-op */ }
__attribute__((weak)) void bootblock_soc_init(void) { /* do nothing */ }
__attribute__((weak)) void bootblock_mainboard_init(void) { /* do nothing */ }
@@ -28,7 +31,9 @@ __attribute__((weak)) void bootblock_mainboard_init(void) { /* do nothing */ }
void main(void)
{
init_timer();
- if (IS_ENABLED(CONFIG_HAS_PRECBMEM_TIMESTAMP_REGION))
+
+ /* Initialize timestamps if we have TIMESTAMP region in memlayout.ld. */
+ if (IS_ENABLED(CONFIG_COLLECT_TIMESTAMPS) && _timestamp_size > 0)
timestamp_init(timestamp_get());
bootblock_mainboard_early_init();