From cad7c4e45308ced5a43f2a59374a9e575503a311 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Thu, 20 Mar 2014 15:08:54 -0500 Subject: nyans: prepare for vboot verification of ramstage Set the appropriate config options and make the appropriate calls to perform vboot verification. The flashmap offset as well as the TPM information needs to be properly set. Lastly, call into vboot_verify_firmware() to perform the vboot verification when it is enabled. BUG=chrome-os-partner:27094 BRANCH=None TEST=Built vboot verification on nyan. Original-Change-Id: I6113badd6143008ceb2b80f0ec0832e1addd03d7 Original-Signed-off-by: Aaron Durbin Original-Signed-off-by: Gabe Black Original-Reviewed-on: https://chromium-review.googlesource.com/190928 Original-Commit-Queue: Gabe Black Original-Tested-by: Gabe Black Original-Reviewed-by: Tom Warren Original-Reviewed-by: Stefan Reinauer (cherry picked from commit 8c6c48c7823738bf9b029a467b077d2ee20d04e5) Signed-off-by: Marc Jones Change-Id: I2a442b1b0fff55e737df2e96740c05c1726502d5 Reviewed-on: http://review.coreboot.org/7743 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/mainboard/google/nyan_blaze/romstage.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/mainboard/google/nyan_blaze/romstage.c') diff --git a/src/mainboard/google/nyan_blaze/romstage.c b/src/mainboard/google/nyan_blaze/romstage.c index d7cc1bf3a3..c239b4eb7e 100644 --- a/src/mainboard/google/nyan_blaze/romstage.c +++ b/src/mainboard/google/nyan_blaze/romstage.c @@ -26,6 +26,8 @@ #include #include #include +#include +#include #include "sdram_configs.h" #include #include @@ -195,11 +197,8 @@ static void __attribute__((noinline)) romstage(void) cbmem_initialize_empty(); -#if CONFIG_COLLECT_TIMESTAMPS timestamp_init(0); timestamp_add(TS_START_ROMSTAGE, romstage_start_time); - timestamp_add(TS_START_COPYRAM, timestamp_get()); -#endif // Enable additional peripherals we need for ROM stage. clock_enable_clear_reset(0, CLK_H_SBC1, CLK_U_I2C3, 0, 0, 0); @@ -209,11 +208,13 @@ static void __attribute__((noinline)) romstage(void) configure_ec_spi_bus(); configure_tpm_i2c_bus(); + vboot_verify_firmware(romstage_handoff_find_or_add()); + + timestamp_add(TS_START_COPYRAM, timestamp_get()); void *entry = cbfs_load_stage(CBFS_DEFAULT_MEDIA, "fallback/coreboot_ram"); -#if CONFIG_COLLECT_TIMESTAMPS timestamp_add(TS_END_COPYRAM, timestamp_get()); -#endif + stage_exit(entry); } -- cgit v1.2.3