aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKangheui Won <khwon@chromium.org>2020-09-17 16:37:13 +1000
committerPatrick Georgi <pgeorgi@google.com>2020-09-22 07:00:22 +0000
commit4e2f5fd1418996b0a736f7109dfc257cbfe30db8 (patch)
treed5b7cf51e9d9d86cc5950649be6385f1c37c2d95
parentb13bd1efcf568bb220500ca94e4de097f3bed9ec (diff)
soc/amd/picasso: record timestamps in psp_verstage
Verstage in PSP used stub for timestamps since we didn't know about clock. Now we figured out clock source so we can enable timestamp functions. BRANCH=zork BUG=b:154142138, b:159220781 TEST=build without CONFIG_PSP_VERSTAGE_FILE, flash and boot Change-Id: I431a243878e265b68783f54ee9424bb1d4fe03c1 Signed-off-by: Kangheui Won <khwon@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/45467 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
-rw-r--r--src/lib/Makefile.inc3
-rw-r--r--src/soc/amd/picasso/psp_verstage/Makefile.inc1
-rw-r--r--src/soc/amd/picasso/psp_verstage/psp_verstage.c2
-rw-r--r--src/soc/amd/picasso/psp_verstage/timestamp.c17
4 files changed, 2 insertions, 21 deletions
diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc
index e23b9de414..96dd06e215 100644
--- a/src/lib/Makefile.inc
+++ b/src/lib/Makefile.inc
@@ -68,10 +68,7 @@ verstage-y += libgcc.c
verstage-y += memcmp.c
verstage-y += string.c
-# TODO: Remove this when PSP bootblock timestamps are implemented.
-ifeq ($(CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK),)
verstage-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c
-endif
verstage-y += boot_device.c
verstage-$(CONFIG_CONSOLE_CBMEM) += cbmem_console.c
diff --git a/src/soc/amd/picasso/psp_verstage/Makefile.inc b/src/soc/amd/picasso/psp_verstage/Makefile.inc
index 905613e219..4f1642bdf7 100644
--- a/src/soc/amd/picasso/psp_verstage/Makefile.inc
+++ b/src/soc/amd/picasso/psp_verstage/Makefile.inc
@@ -15,7 +15,6 @@ verstage-y += psp.c
verstage-y += reset.c
verstage-y += svc.c
verstage-y += timer.c
-verstage-y += timestamp.c
verstage-y += vboot_crypto.c
verstage-y += $(top)/src/vendorcode/amd/fsp/picasso/bl_uapp/bl_uapp_startup.S
diff --git a/src/soc/amd/picasso/psp_verstage/psp_verstage.c b/src/soc/amd/picasso/psp_verstage/psp_verstage.c
index c2178a347e..f367dce6fd 100644
--- a/src/soc/amd/picasso/psp_verstage/psp_verstage.c
+++ b/src/soc/amd/picasso/psp_verstage/psp_verstage.c
@@ -16,6 +16,7 @@
#include <arch/stages.h>
#include <stdarg.h>
#include <stdio.h>
+#include <timestamp.h>
extern char _bss_start, _bss_end;
static struct mem_region_device boot_dev =
@@ -217,6 +218,7 @@ void Main(void)
* Do not use printk() before console_init()
* Do not use post_code() before verstage_mainboard_init()
*/
+ timestamp_init(timestamp_get());
svc_write_postcode(POSTCODE_ENTERED_PSP_VERSTAGE);
svc_debug_print("Entering verstage on PSP\n");
memset(&_bss_start, '\0', &_bss_end - &_bss_start);
diff --git a/src/soc/amd/picasso/psp_verstage/timestamp.c b/src/soc/amd/picasso/psp_verstage/timestamp.c
deleted file mode 100644
index b3b8f75f7e..0000000000
--- a/src/soc/amd/picasso/psp_verstage/timestamp.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-
-#include <timestamp.h>
-
-/* Stubs */
-void timestamp_add_now(enum timestamp_id id)
-{
-}
-
-void timestamp_add(enum timestamp_id id, uint64_t ts)
-{
-}
-
-uint64_t timestamp_get(void)
-{
- return 0;
-}