From f6d95cf4ba6ce1bc0e1df4a0e9f655ad9fea9feb Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Tue, 4 Feb 2014 12:38:41 -0600 Subject: [PATCH] chromeos: provide stub functions for !CONFIG_VBOOT_VERIFY_FIRMWARE Instead of checking #if CONFIG_VBOOT_VERIFY_FIRMWARE #else #endif provide empty stub functions for !CONFIG_VBOOT_VERIFY_FIRMWARE. BUG=none BRANCH=baytrail TEST=Built and booted. Change-Id: Id9d1843a0ec47c5a186c9a22ea3e4c13c89ec379 Signed-off-by: Aaron Durbin Reviewed-on: https://chromium-review.googlesource.com/184841 --- src/cpu/intel/haswell/romstage.c | 4 ---- src/lib/cbfs.c | 4 ---- src/southbridge/intel/lynxpoint/spi_loading.c | 4 ---- src/vendorcode/google/chromeos/chromeos.h | 6 ++++++ 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/cpu/intel/haswell/romstage.c b/src/cpu/intel/haswell/romstage.c index c3dd21d876..3d5bb6fe09 100644 --- a/src/cpu/intel/haswell/romstage.c +++ b/src/cpu/intel/haswell/romstage.c @@ -36,9 +36,7 @@ #include #include #include -#if CONFIG_CHROMEOS #include -#endif #if CONFIG_EC_GOOGLE_CHROMEEC #include #endif @@ -327,9 +325,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/lib/cbfs.c b/src/lib/cbfs.c index 7c59e95c1c..e0454fd812 100644 --- a/src/lib/cbfs.c +++ b/src/lib/cbfs.c @@ -63,11 +63,7 @@ #include "cbfs_core.c" -#if CONFIG_VBOOT_VERIFY_FIRMWARE #include -#else -static inline void *vboot_get_payload(int *len) { return NULL; } -#endif #ifndef __SMM__ static inline int tohex4(unsigned int c) diff --git a/src/southbridge/intel/lynxpoint/spi_loading.c b/src/southbridge/intel/lynxpoint/spi_loading.c index 1ae7a263eb..aeab29e450 100644 --- a/src/southbridge/intel/lynxpoint/spi_loading.c +++ b/src/southbridge/intel/lynxpoint/spi_loading.c @@ -25,11 +25,7 @@ #include #include #include -#if CONFIG_VBOOT_VERIFY_FIRMWARE #include -#else -static inline void *vboot_get_payload(int *len) { return NULL; } -#endif #define CACHELINE_SIZE 64 #define INTRA_CACHELINE_MASK (CACHELINE_SIZE - 1) diff --git a/src/vendorcode/google/chromeos/chromeos.h b/src/vendorcode/google/chromeos/chromeos.h index 0225ed3915..feb9bfd339 100644 --- a/src/vendorcode/google/chromeos/chromeos.h +++ b/src/vendorcode/google/chromeos/chromeos.h @@ -21,6 +21,7 @@ #define __CHROMEOS_H__ #include +#include /* functions implemented per mainboard: */ int get_developer_mode_switch(void); @@ -53,6 +54,11 @@ void *vboot_get_payload(int *len); int vboot_get_handoff_info(void **addr, uint32_t *size); #else static inline void vboot_verify_firmware(struct romstage_handoff *h) {} +static inline void *vboot_get_payload(int *len) { return NULL; } +static inline int vboot_get_handoff_info(void **addr, uint32_t *size) +{ + return -1; +} #endif #endif