[coreboot-gerrit] Change in coreboot[master]: payloads/libpayload/drivers/i8042: Disable scanning on disconnect

Furquan Shaikh (Code Review) gerrit at coreboot.org
Fri Jun 29 20:53:33 CEST 2018


Furquan Shaikh has uploaded this change for review. ( https://review.coreboot.org/27290


Change subject: payloads/libpayload/drivers/i8042: Disable scanning on disconnect
......................................................................

payloads/libpayload/drivers/i8042: Disable scanning on disconnect

This change ensures that keyboard scanning is disabled and keyboard is
set to default state while disconnecting the keyboard. This is
required to ensure that the controller doesn't keep scanning and
buffering keystrokes which could lead to OS drivers reading stale
data.

BUG=b:110024487
TEST=Verified that kernel driver is able to probe correctly even if
multiple keys are pressed during handoff from payload to OS.

Change-Id: I1ffb8904d545284454c1825ee2e7c0087fc13762
Signed-off-by: Furquan Shaikh <furquan at google.com>
---
M payloads/libpayload/drivers/i8042/keyboard.c
1 file changed, 3 insertions(+), 0 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/90/27290/1

diff --git a/payloads/libpayload/drivers/i8042/keyboard.c b/payloads/libpayload/drivers/i8042/keyboard.c
index d5606a3..062aec2 100644
--- a/payloads/libpayload/drivers/i8042/keyboard.c
+++ b/payloads/libpayload/drivers/i8042/keyboard.c
@@ -338,6 +338,9 @@
 	while (keyboard_havechar())
 		keyboard_getchar();
 
+	/* Disable scanning */
+	keyboard_cmd(I8042_KBCMD_DEFAULT_DIS);
+
 	/* Send keyboard disconnect command */
 	i8042_cmd(I8042_CMD_DIS_KB);
 

-- 
To view, visit https://review.coreboot.org/27290
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1ffb8904d545284454c1825ee2e7c0087fc13762
Gerrit-Change-Number: 27290
Gerrit-PatchSet: 1
Gerrit-Owner: Furquan Shaikh <furquan at google.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180629/ae46ca9d/attachment-0001.html>


More information about the coreboot-gerrit mailing list