summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorPatrick Rudolph <patrick.rudolph@9elements.com>2018-05-03 10:35:26 +0200
committerRonald G. Minnich <rminnich@gmail.com>2018-05-16 20:02:52 +0000
commit71327fbad86bfb2d6ef343d465d0ce071bb6be0d (patch)
tree7c1bb5d40927393fc8dadbe12abb8f0ac1f96fb2 /src/include
parentd8ec973fd24e091d0038d7060bfb516bad7534f0 (diff)
lib/prog_loaders: Store CBFS type in struct prog
Store the type of the loaded program after locating the file and add a method to retrieve the type. Will be used to distinguish between SELF and FIT payloads. Change-Id: Ic226e7e028d722ab9e3c6f7f1c22bde2a1cd8a85 Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-on: https://review.coreboot.org/26028 Reviewed-by: Ronald G. Minnich <rminnich@gmail.com> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/program_loading.h6
1 files changed, 6 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;