diff options
-rw-r--r-- | firmware/include/vboot_api.h | 38 | ||||
-rw-r--r-- | firmware/stub/vboot_api_stub.c | 11 |
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; |