From d37705c3b0ead5f0ff715bd27959114cd273fb6c Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Thu, 10 Oct 2013 20:58:57 -0500 Subject: vboot: provide empty vboot_verify_firmware() In the case of CONFIG_VBOOT_VERIFY_FIRMWARE not being selected allow for calling vboot_verify_firmware() with an empty implementation. This allows for one not to clutter the source with ifdefs. BUG=chrome-os-partner:23249 BRANCH=None TEST=Built with a !CONFIG_VBOOT_VERIFY_FIRMWARE and non-guarded call to vboot_verify_firmware(). Change-Id: I72af717ede3c5d1db2a1f8e586fefcca82b191d5 Signed-off-by: Aaron Durbin Reviewed-on: https://chromium-review.googlesource.com/172711 Reviewed-by: Shawn Nematbakhsh Reviewed-on: http://review.coreboot.org/4879 Tested-by: build bot (Jenkins) Reviewed-by: Alexandru Gagniuc --- src/cpu/intel/haswell/romstage.c | 2 -- src/vendorcode/google/chromeos/chromeos.h | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cpu/intel/haswell/romstage.c b/src/cpu/intel/haswell/romstage.c index 40a396d501..6b5780bdbc 100644 --- a/src/cpu/intel/haswell/romstage.c +++ b/src/cpu/intel/haswell/romstage.c @@ -308,9 +308,7 @@ void romstage_after_car(void) prepare_for_resume(handoff); -#if CONFIG_VBOOT_VERIFY_FIRMWARE vboot_verify_firmware(handoff); -#endif /* Load the ramstage. */ copy_and_run(); diff --git a/src/vendorcode/google/chromeos/chromeos.h b/src/vendorcode/google/chromeos/chromeos.h index f51215e12e..5493801a09 100644 --- a/src/vendorcode/google/chromeos/chromeos.h +++ b/src/vendorcode/google/chromeos/chromeos.h @@ -46,12 +46,14 @@ int recovery_mode_enabled(void); /* functions implemented in vboot.c */ void init_chromeos(int bootmode); -#if CONFIG_VBOOT_VERIFY_FIRMWARE struct romstage_handoff; +#if CONFIG_VBOOT_VERIFY_FIRMWARE void vboot_verify_firmware(struct romstage_handoff *handoff); void *vboot_get_payload(size_t *len); /* Returns 0 on success < 0 on error. */ int vboot_get_handoff_info(void **addr, uint32_t *size); +#else +static inline void vboot_verify_firmware(struct romstage_handoff *h) {} #endif #endif -- cgit v1.2.3