diff options
author | Sameer Nanda <snanda@chromium.org> | 2012-09-24 12:43:38 -0700 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-09-24 16:29:08 -0700 |
commit | 9332d769e9e68be06fc85a9b0170ed3a2d549ee9 (patch) | |
tree | e6fdeeb4596a5fdef53e04247a459712e4392eeb | |
parent | 8b592052cea122105996f13a8cb2e44ea22449fc (diff) | |
download | chrome-ec-9332d769e9e68be06fc85a9b0170ed3a2d549ee9.tar.gz |
Don't forward keys in case of warm reboot sequence match
If the key combination matches the warm reboot sequence
(alt-volume_up-r), do not forward these keys to the AP. If the keys do
get forwarded, the AP's key handler can race with the EC's GAIAPOWER
task and unpredicatable things may happen.
BUG=chrome-os-partner:14496
TEST=hit alt-volume_up-r keys together. This should cause the system to
reboot. If in dev mode, check the contents of /dev/pstore/console_ramoops
file -- the contents should be from the previous boot.
BRANCH=snow
Change-Id: Ida08bf10c593c75186f472721992a52015e4bf24
Signed-off-by: Sameer Nanda <snanda@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/33916
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
-rw-r--r-- | chip/stm32/keyboard_scan.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/chip/stm32/keyboard_scan.c b/chip/stm32/keyboard_scan.c index 153c976c10..47e3dac039 100644 --- a/chip/stm32/keyboard_scan.c +++ b/chip/stm32/keyboard_scan.c @@ -316,8 +316,11 @@ static int check_keys_changed(void) CPUTS("]\n"); if (num_press == 3) { - if (check_warm_reboot_keys()) + if (check_warm_reboot_keys()) { + keyboard_clear_state(); system_warm_reboot(); + return 0; + } } if (kb_fifo_add(raw_state) == EC_SUCCESS) |