summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaveh Jalali <caveh@google.com>2017-05-12 16:31:16 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2017-07-15 00:51:04 +0000
commit221089b3084e87e881ac0654b57ea8266d0e2f0a (patch)
tree607a6dfc2fff1bcad32f530ed9a2c077200db2b7
parent1e9245dfff914107ec06aac84f3b70c2df1f4a41 (diff)
downloadvboot-221089b3084e87e881ac0654b57ea8266d0e2f0a.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. BRANCH=none BUG=b:35586896 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> (cherry picked from commit 2c8597214882cebdaf7d82297f9832c0dd11da1a) Change-Id: I9383243545b21896a02a68e2093472f64f013f65 Reviewed-on: https://chromium-review.googlesource.com/569458 Reviewed-by: Caveh Jalali <caveh@google.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Caveh Jalali <caveh@google.com> Tested-by: Caveh Jalali <caveh@google.com> Trybot-Ready: Caveh Jalali <caveh@google.com>
-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 950c1e22..9e5dc8f1 100644
--- a/firmware/include/vboot_api.h
+++ b/firmware/include/vboot_api.h
@@ -904,6 +904,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 717c0f8d..0cc9216b 100644
--- a/firmware/stub/vboot_api_stub.c
+++ b/firmware/stub/vboot_api_stub.c
@@ -169,6 +169,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;