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>
This commit is contained in:
Sameer Nanda
2012-09-24 12:43:38 -07:00
committed by Gerrit
parent 8b592052ce
commit 9332d769e9

View File

@@ -316,8 +316,11 @@ static int check_keys_changed(void)
CPUTS("]\n"); CPUTS("]\n");
if (num_press == 3) { if (num_press == 3) {
if (check_warm_reboot_keys()) if (check_warm_reboot_keys()) {
keyboard_clear_state();
system_warm_reboot(); system_warm_reboot();
return 0;
}
} }
if (kb_fifo_add(raw_state) == EC_SUCCESS) if (kb_fifo_add(raw_state) == EC_SUCCESS)