summaryrefslogtreecommitdiff
path: root/include/system.h
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2021-07-01 10:38:06 -0700
committerCommit Bot <commit-bot@chromium.org>2021-07-05 18:14:31 +0000
commit23a542566b89d5f00dbd3f5442e63f6d0cbf7477 (patch)
treed7208941f38d7553cd9fcd9070056fe70b28dee9 /include/system.h
parent3c8257a31ea4ab522e65721ad20f133e86d0c955 (diff)
downloadchrome-ec-23a542566b89d5f00dbd3f5442e63f6d0cbf7477.tar.gz
System: Add SYSTEM_IN_MANUAL_RECOVERY flag
This patch adds SYSTEM_IN_MANUAL_RECOVERY, which indicates the system is in recovery mode. It's set when EC_HOST_EVENT_KEYBOARD_RECOVERY is set and cleared when the system shuts down (not when the host event flag is cleared). BUG=b:188242794 BRANCH=None TEST=Verify sysinfo command prints 'Recovery: yes' in recovery screen. TEST=Verify sysinfo command prints 'Recovery: no' after shutting down from recovery screen. Change-Id: I357e25fa4072cb4549dbe2c6bd476b0a93ccbb38 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3001190
Diffstat (limited to 'include/system.h')
-rw-r--r--include/system.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/system.h b/include/system.h
index deb97b5023..230141fffe 100644
--- a/include/system.h
+++ b/include/system.h
@@ -64,6 +64,19 @@ void system_common_pre_init(void);
int system_is_manual_recovery(void);
/**
+ * Set a flag indicating system is in recovery mode.
+ */
+void system_enter_manual_recovery(void);
+
+/**
+ * Set a flag indicating system left recovery mode.
+ *
+ * WARNING: This flag should be cleared right after a shutdown from recovery
+ * boot. You most likely shouldn't call this elsewhere.
+ */
+void system_exit_manual_recovery(void);
+
+/**
* Make sure AP shutdown completely, before call system_hibernate
*/
void system_enter_hibernate(uint32_t seconds, uint32_t microseconds);