summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaveh Jalali <caveh@google.com>2017-05-12 16:31:16 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-05-23 23:59:11 -0700
commit2c8597214882cebdaf7d82297f9832c0dd11da1a (patch)
treea32b4a3fa3ffd246c33e1f00b9c985af1001aaad
parentf7ce79499974c7fb2eab532e50918a33dd4662c9 (diff)
downloadvboot-2c8597214882cebdaf7d82297f9832c0dd11da1a.tar.gz
define callback APIs for auxiliary firmware update.
TEST="COV=1 make" passes depthcharge still compiles in combination with follow-up CLs, ps8751 firmware update succeeds. BUG=b:35586896 Change-Id: Ibadc41e56e4e25ee0aba5c83caa0e3596fb9ad20 Reviewed-on: https://chromium-review.googlesource.com/505259 Commit-Ready: Caveh Jalali <caveh@google.com> Tested-by: Caveh Jalali <caveh@google.com> Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r--firmware/include/vboot_api.h38
-rw-r--r--firmware/stub/vboot_api_stub.c11
2 files changed, 49 insertions, 0 deletions
diff --git a/firmware/include/vboot_api.h b/firmware/include/vboot_api.h
index fdae5dda..a8e79ce7 100644
--- a/firmware/include/vboot_api.h
+++ b/firmware/include/vboot_api.h
@@ -998,6 +998,44 @@ VbError_t VbExEcVbootDone(int in_recovery);
*/
VbError_t VbExEcBatteryCutOff(void);
+/*
+ * severity levels for an auxiliary firmware update request
+ */
+typedef enum {
+ /* no update needed */
+ VB_AUX_FW_NO_UPDATE = 0,
+ /* update needed, can be done quickly */
+ VB_AUX_FW_FAST_UPDATE = 1,
+ /* update needed, "this would take a while..." */
+ VB_AUX_FW_SLOW_UPDATE = 2,
+} VbAuxFwUpdateSeverity_t;
+
+/**
+ * Perform auxiliary firmware checks.
+ *
+ * This is called after the EC has been updated and is intended to
+ * version-check additional firmware blobs such as TCPCs.
+ *
+ * @param severity return parameter for health of auxiliary firmware
+ * 0: no update needed
+ * 1: fast update needed
+ * 2: slow update needed
+ * @return VBERROR_... error, VBERROR_SUCCESS on success.
+ */
+
+VbError_t VbExCheckAuxFw(VbAuxFwUpdateSeverity_t *severity);
+
+/**
+ * Perform auxiliary firmware update(s).
+ *
+ * This is called after the EC has been updated and is intended to
+ * update additional firmware blobs such as TCPCs.
+ *
+ * @return VBERROR_... error, VBERROR_SUCCESS on success.
+ */
+
+VbError_t VbExUpdateAuxFw(void);
+
/*****************************************************************************/
/* Misc */
diff --git a/firmware/stub/vboot_api_stub.c b/firmware/stub/vboot_api_stub.c
index 6dd257d9..834bff1c 100644
--- a/firmware/stub/vboot_api_stub.c
+++ b/firmware/stub/vboot_api_stub.c
@@ -187,6 +187,17 @@ VbError_t VbExEcBatteryCutOff(void)
return VBERROR_SUCCESS;
}
+VbError_t VbExCheckAuxFw(VbAuxFwUpdateSeverity_t *severity)
+{
+ *severity = VB_AUX_FW_NO_UPDATE;
+ return VBERROR_SUCCESS;
+}
+
+VbError_t VbExUpdateAuxFw(void)
+{
+ return VBERROR_SUCCESS;
+}
+
enum VbEcBootMode_t VbGetMode(void)
{
return vboot_mode;