summaryrefslogtreecommitdiff
path: root/firmware/include
diff options
context:
space:
mode:
authorMatt Delco <delco@google.com>2019-02-13 11:13:27 -0800
committerchrome-bot <chrome-bot@chromium.org>2019-03-13 21:04:59 -0700
commit3bfaab121cbafbd5c6d57004df6784866b8de5de (patch)
treee23a950730e73515c31375bf0b4aba5724f67737 /firmware/include
parent98b9928b6aa2da5622cd84c5565a9debbf12be35 (diff)
downloadvboot-3bfaab121cbafbd5c6d57004df6784866b8de5de.tar.gz
vboot: changes to allow RW_LEGACY hash verification
This is largely a cherry-pick of CL:1133598 - Externalize vb2_digest_buffer function to vb2api_digest_buffer. - Change VbExLegacy()'s altfw_num parameter from int to enum so caller can specify which specific payload to run. BUG=b:124358784 BRANCH=None TEST=Local compile. Verified with subsequent change that legacy boot still works and new functionality can opt-in to and utilize payload verification. CQ-DEPEND=CL:1471053 Change-Id: I9700c2e38c3cfa255eeff72ce416295af9d076fb Signed-off-by: Matt Delco <delco@google.com> Reviewed-on: https://chromium-review.googlesource.com/1471051 Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'firmware/include')
-rw-r--r--firmware/include/vboot_api.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/firmware/include/vboot_api.h b/firmware/include/vboot_api.h
index fdb7615b..6e738dc4 100644
--- a/firmware/include/vboot_api.h
+++ b/firmware/include/vboot_api.h
@@ -1011,13 +1011,30 @@ enum {
MAX_COMPRESS,
};
+enum VbAltFwIndex_t {
+ VB_ALTFW_DEFAULT = 0,
+ VB_ALTFW_FIRST = 1,
+ VB_ALTFW_SECOND,
+ VB_ALTFW_THIRD,
+ VB_ALTFW_FOURTH,
+ VB_ALTFW_FIFTH,
+ VB_ALTFW_SIXTH,
+ VB_ALTFW_SEVENTH,
+ VB_ALTFW_EIGHTH,
+ VB_ALTFW_NINTH,
+};
+
/**
* Execute legacy boot option.
*
* @param altfw_num Bootloader sequence number to execute. Use
* 0 to boot the default payload, if any
+ * >0 (i.e., positive #) run a payload by # based in altfw/list file
+ * <0 (i.e., negative #) run a specific payload by name without using
+ * the altfw/list file. Typically payloads in this category will be
+ * verified before they are run. Currently no #s are defined.
*/
-int VbExLegacy(int altfw_num);
+int VbExLegacy(enum VbAltFwIndex_t altfw_num);
/* Regions for VbExRegionRead() */
enum vb_firmware_region {