summaryrefslogtreecommitdiff
path: root/firmware/lib/include/vboot_ui_common.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/lib/include/vboot_ui_common.h')
-rw-r--r--firmware/lib/include/vboot_ui_common.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/firmware/lib/include/vboot_ui_common.h b/firmware/lib/include/vboot_ui_common.h
index 2c8337f7..2587980b 100644
--- a/firmware/lib/include/vboot_ui_common.h
+++ b/firmware/lib/include/vboot_ui_common.h
@@ -16,6 +16,12 @@ enum vb2_beep_type {
};
/**
+ * Reinitialize global state. This should only need to be called
+ * by vboot_ui::vb2_init_ui() for init tests.
+ */
+void vb2_reset_power_button(void);
+
+/**
* Emit beeps to indicate an error
*/
void vb2_error_beep(enum vb2_beep_type beep);
@@ -55,4 +61,15 @@ void vb2_error_no_altfw(void);
void vb2_try_altfw(struct vb2_context *ctx, int allowed,
enum VbAltFwIndex_t altfw_num);
+/**
+ * Checks GBB flags against VbExIsShutdownRequested() shutdown request to
+ * determine if a shutdown is required.
+ *
+ * Returns zero or more of the following flags (if any are set then typically
+ * shutdown is required):
+ * VB_SHUTDOWN_REQUEST_LID_CLOSED
+ * VB_SHUTDOWN_REQUEST_POWER_BUTTON
+ */
+int vb2_want_shutdown(struct vb2_context *ctx, uint32_t key);
+
#endif /* VBOOT_REFERENCE_VBOOT_UI_COMMON_H_ */