summaryrefslogtreecommitdiff
path: root/host
diff options
context:
space:
mode:
authorJoel Kitching <kitching@google.com>2018-10-02 20:54:07 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-11-19 16:28:25 -0800
commit0f7779862ca4b4973f52c7b851c65ccb8d9cd147 (patch)
tree36e2c16888c1f4c8f50c95c0a5dce732390879b1 /host
parent9071205452595027cc8d52588f0c6fdf7581f905 (diff)
downloadvboot-0f7779862ca4b4973f52c7b851c65ccb8d9cd147.tar.gz
CHERRY-PICK: vboot: create NVRAM flag to pause after EC software sync
Previously, it is impossible to programmatically enable/disable Alt OS mode in eve. This is because only EC-RW supports the kbatboot keyboard matrix functionality. But, as part of the campfire boot flow, the keyboard matrix is retrieved *immediately* after jumping into EC-RW. We need to insert a small pause in order to allow for some entity (autotest/servo) to send a kbatboot command, simulating the Alt OS keyboard press hotkey. BUG=b:117140648,b:118786884 TEST=Manually use crossystem to set post_ec_sync_delay=1 Reboot, and wait for the delay to begin Run `kbatboot 1 4 1` in EC console Check that AP console contains: "vb2_post_ec_sync_hooks: post_ec_sync_delay 5000 ms..." TEST=make clean && make runtests Note that we are only cherry-picking the changes which affect crossystem in this CL. Firmware changes will still live in campfire-eve branch only. Change-Id: I1305357199d87b80b4edc4e311015106ab07de65 Reviewed-on: https://chromium-review.googlesource.com/c/1256644 Commit-Queue: Joel Kitching <kitching@chromium.org> Tested-by: Joel Kitching <kitching@chromium.org> Trybot-Ready: Joel Kitching <kitching@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> (cherry picked from commit 64d7369976b88b21d8d8a860252023776a2f119e) Reviewed-on: https://chromium-review.googlesource.com/1328389 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'host')
-rw-r--r--host/lib/crossystem.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/host/lib/crossystem.c b/host/lib/crossystem.c
index d87c3f26..0ed88e65 100644
--- a/host/lib/crossystem.c
+++ b/host/lib/crossystem.c
@@ -577,6 +577,8 @@ int VbGetSystemPropertyInt(const char *name)
value = vb2_get_nv_storage(VB2_NV_ENABLE_ALT_OS_REQUEST);
} else if (!strcasecmp(name, "disable_alt_os_request")) {
value = vb2_get_nv_storage(VB2_NV_DISABLE_ALT_OS_REQUEST);
+ } else if (!strcasecmp(name, "post_ec_sync_delay")) {
+ value = vb2_get_nv_storage(VB2_NV_POST_EC_SYNC_DELAY);
}
return value;
@@ -737,6 +739,8 @@ int VbSetSystemPropertyInt(const char *name, int value)
return vb2_set_nv_storage(VB2_NV_ENABLE_ALT_OS_REQUEST, value);
} else if (!strcasecmp(name, "disable_alt_os_request")) {
return vb2_set_nv_storage(VB2_NV_DISABLE_ALT_OS_REQUEST, value);
+ } else if (!strcasecmp(name, "post_ec_sync_delay")) {
+ return vb2_set_nv_storage(VB2_NV_POST_EC_SYNC_DELAY, value);
}
return -1;