From 7b0e0d98101a49b1e53567ff1bfa3d6a3bda6cf5 Mon Sep 17 00:00:00 2001 From: Paul Kocialkowski Date: Mon, 27 Jun 2016 18:17:14 +0200 Subject: [PATCH] nyan: Avoid running early_mainboard_init twice in vboot context A call to early_mainboard_init is already present in verstage, thus it is only necessary to call it from romstage when not in vboot context. Change-Id: I2e0b5a369c5fb24efae4ac40d83a31f5cf4a078d Signed-off-by: Paul Kocialkowski Reviewed-on: https://review.coreboot.org/15450 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth Reviewed-by: Julius Werner Reviewed-by: Paul Menzel --- src/mainboard/google/nyan/romstage.c | 4 +++- src/mainboard/google/nyan_big/romstage.c | 4 +++- src/mainboard/google/nyan_blaze/romstage.c | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/mainboard/google/nyan/romstage.c b/src/mainboard/google/nyan/romstage.c index d09bf5e5ae..2388f95aee 100644 --- a/src/mainboard/google/nyan/romstage.c +++ b/src/mainboard/google/nyan/romstage.c @@ -82,7 +82,9 @@ static void __attribute__((noinline)) romstage(void) /* FIXME: this may require coordination with moving timestamps */ cbmem_initialize_empty(); - early_mainboard_init(); + /* This was already called from verstage in vboot context. */ + if (!IS_ENABLED(CONFIG_VBOOT_VERIFY_FIRMWARE)) + early_mainboard_init(); run_ramstage(); } diff --git a/src/mainboard/google/nyan_big/romstage.c b/src/mainboard/google/nyan_big/romstage.c index d09bf5e5ae..2388f95aee 100644 --- a/src/mainboard/google/nyan_big/romstage.c +++ b/src/mainboard/google/nyan_big/romstage.c @@ -82,7 +82,9 @@ static void __attribute__((noinline)) romstage(void) /* FIXME: this may require coordination with moving timestamps */ cbmem_initialize_empty(); - early_mainboard_init(); + /* This was already called from verstage in vboot context. */ + if (!IS_ENABLED(CONFIG_VBOOT_VERIFY_FIRMWARE)) + early_mainboard_init(); run_ramstage(); } diff --git a/src/mainboard/google/nyan_blaze/romstage.c b/src/mainboard/google/nyan_blaze/romstage.c index 373d43bceb..e91fa3379e 100644 --- a/src/mainboard/google/nyan_blaze/romstage.c +++ b/src/mainboard/google/nyan_blaze/romstage.c @@ -86,7 +86,9 @@ static void __attribute__((noinline)) romstage(void) /* FIXME: this may require coordination with moving timestamps */ cbmem_initialize_empty(); - early_mainboard_init(); + /* This was already called from verstage in vboot context. */ + if (!IS_ENABLED(CONFIG_VBOOT_VERIFY_FIRMWARE)) + early_mainboard_init(); run_ramstage(); }