summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/cbfs.h14
-rw-r--r--src/include/program_loading.h5
2 files changed, 15 insertions, 4 deletions
diff --git a/src/include/cbfs.h b/src/include/cbfs.h
index dcca173bea..7848d6d6fd 100644
--- a/src/include/cbfs.h
+++ b/src/include/cbfs.h
@@ -81,4 +81,18 @@ struct cbfs_props {
/* Return < 0 on error otherwise props are filled out accordingly. */
int cbfs_boot_region_properties(struct cbfs_props *props);
+/* Allow external logic to take action prior to locating a program
+ * (stage or payload). */
+void cbfs_prepare_program_locate(void);
+
+/* Object used to identify location of current cbfs to use for cbfs_boot_*
+ * operations. It's used by cbfs_boot_region_properties() and
+ * cbfs_prepare_program_locate(). */
+struct cbfs_locator {
+ const char *name;
+ void (*prepare)(void);
+ /* Returns 0 on successful fill of cbfs properties. */
+ int (*locate)(struct cbfs_props *props);
+};
+
#endif
diff --git a/src/include/program_loading.h b/src/include/program_loading.h
index 2f3a537fd6..4385e3602e 100644
--- a/src/include/program_loading.h
+++ b/src/include/program_loading.h
@@ -106,10 +106,7 @@ static inline void prog_set_entry(struct prog *prog, void *e, void *arg)
}
/* Locate the identified program to run. Return 0 on success. < 0 on error. */
-static inline int prog_locate(struct prog *prog)
-{
- return asset_locate(&prog->asset);
-}
+int prog_locate(struct prog *prog);
/* Run the program described by prog. */
void prog_run(struct prog *prog);