summaryrefslogtreecommitdiff
path: root/common/vboot/vboot.c
diff options
context:
space:
mode:
authorSam McNally <sammc@chromium.org>2020-02-27 21:29:25 +1100
committerCommit Bot <commit-bot@chromium.org>2020-03-03 07:47:32 +0000
commit6020472e12860d58ec3cf2d6336e4eecc2017b63 (patch)
tree351a3fc55a5e78c838147d7143c42998adcc2dd4 /common/vboot/vboot.c
parent9d3f321689ddcdc0989842055292aeb4e8d6f811 (diff)
downloadchrome-ec-6020472e12860d58ec3cf2d6336e4eecc2017b63.tar.gz
vboot: Add a reboot option to keep EFS in RO with the AP off.
With EFS, the EC will typically switch to RW shortly after boot. cros_ec_softrec_power triggers recovery mode using the hostevent console command after rebooting the EC with ap-off and then simulates a power button press. This requires the EC to remain in RO after rebooting so doesn't currently work with EFS. Add a reboot option "ap-off-in-ro" to request the EC remain in RO with the AP off after rebooting. BUG=b:149657030 TEST=make buildall; firmware_RecoveryCacheBootKeys on puff BRANCH=none Change-Id: I65d291106accebf18bb46d951351def122627e61 Signed-off-by: Sam McNally <sammc@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2077699 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'common/vboot/vboot.c')
-rw-r--r--common/vboot/vboot.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/common/vboot/vboot.c b/common/vboot/vboot.c
index 38924f4b3e..9819c9c316 100644
--- a/common/vboot/vboot.c
+++ b/common/vboot/vboot.c
@@ -204,8 +204,11 @@ void vboot_main(void)
return;
}
- if (is_manual_recovery()) {
- CPRINTS("Manual recovery");
+ if (is_manual_recovery() ||
+ (system_get_reset_flags() & EC_RESET_FLAG_STAY_IN_RO)) {
+ if (is_manual_recovery())
+ CPRINTS("Manual recovery");
+
if (battery_is_present() || has_matrix_keyboard()) {
show_power_shortage();
return;