summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2015-04-28 15:59:12 -0500
committerPatrick Georgi <pgeorgi@google.com>2015-04-30 13:05:13 +0200
commit5e8286bed6f18cd2a85b029911f97da21b38394d (patch)
tree26cdb02663397d6ab40697abef50c3ba6e39aaed /src/include
parent16110e7ffaf417f98bef2a359ec522f6fc160ee5 (diff)
downloadcoreboot-5e8286bed6f18cd2a85b029911f97da21b38394d.tar.xz
program loading: add optional is_loader_active() callback
Add a way for a loader to indicate if it is active. Such users of this callback would be vboot which can indicate to the rest of the system that it isn't active. is_loader_active() also gives vboot a chance to perform the necessary work to make said decision. Change-Id: I6679ac75b19bb1bfff9c2b709da5591986f752ff Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/10022 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/program_loading.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/include/program_loading.h b/src/include/program_loading.h
index 02e6f5fdbb..ca80b0e793 100644
--- a/src/include/program_loading.h
+++ b/src/include/program_loading.h
@@ -103,6 +103,9 @@ void platform_prog_run(struct prog *prog);
struct prog_loader_ops {
const char *name;
+ /* Determine if the loader is the active one. If so returns 1 else 0
+ * or < 0 on error. */
+ int (*is_loader_active)(struct prog *prog);
/* Returns < 0 on error or 0 on success. This function needs to do
* different things depending on the prog type. See definition
* of struct prog above. */