summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/include/program_loading.h6
-rw-r--r--src/lib/prog_loaders.c2
2 files changed, 8 insertions, 0 deletions
diff --git a/src/include/program_loading.h b/src/include/program_loading.h
index 7aba30214c..2e8364604a 100644
--- a/src/include/program_loading.h
+++ b/src/include/program_loading.h
@@ -65,6 +65,7 @@ struct prog {
* payload. For architectures that use a bounce buffer
* then it would represent the bounce buffer. */
enum prog_type type;
+ uint32_t cbfs_type;
const char *name;
struct region_device rdev;
/* Entry to program with optional argument. It's up to the architecture
@@ -89,6 +90,11 @@ static inline enum prog_type prog_type(const struct prog *prog)
return prog->type;
}
+static inline uint32_t prog_cbfs_type(const struct prog *prog)
+{
+ return prog->cbfs_type;
+}
+
static inline struct region_device *prog_rdev(struct prog *prog)
{
return &prog->rdev;
diff --git a/src/lib/prog_loaders.c b/src/lib/prog_loaders.c
index 8a6d6afafa..04b573e5ee 100644
--- a/src/lib/prog_loaders.c
+++ b/src/lib/prog_loaders.c
@@ -44,6 +44,8 @@ int prog_locate(struct prog *prog)
if (cbfs_boot_locate(&file, prog_name(prog), NULL))
return -1;
+ cbfsf_file_type(&file, &prog->cbfs_type);
+
cbfs_file_data(prog_rdev(prog), &file);
return 0;