summaryrefslogtreecommitdiff
path: root/src/lib/cbfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/cbfs.c')
-rw-r--r--src/lib/cbfs.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/lib/cbfs.c b/src/lib/cbfs.c
index 45ae7c7683..39e6c11000 100644
--- a/src/lib/cbfs.c
+++ b/src/lib/cbfs.c
@@ -63,6 +63,12 @@
#include "cbfs_core.c"
+#if CONFIG_VBOOT_VERIFY_FIRMWARE
+#include <vendorcode/google/chromeos/chromeos.h>
+#else
+static inline void *vboot_get_payload(int *len) { return NULL; }
+#endif
+
#ifndef __SMM__
static inline int tohex4(unsigned int c)
{
@@ -302,8 +308,15 @@ int cbfs_execute_stage(struct cbfs_media *media, const char *name)
#if !CONFIG_ALT_CBFS_LOAD_PAYLOAD
void *cbfs_load_payload(struct cbfs_media *media, const char *name)
{
- return (struct cbfs_payload *)cbfs_get_file_content(
+ struct cbfs_payload *payload;
+
+ payload = vboot_get_payload(NULL);
+ if (payload != NULL)
+ return payload;
+
+ payload = (struct cbfs_payload *)cbfs_get_file_content(
media, name, CBFS_TYPE_PAYLOAD);
+ return payload;
}
#endif