diff options
author | Andreas Sandberg <andreas.sandberg@arm.com> | 2018-04-09 22:16:13 +0000 |
---|---|---|
committer | Andreas Sandberg <andreas.sandberg@arm.com> | 2018-04-17 11:16:26 +0000 |
commit | 7789e9aa75ba82a0bc52dc8b2b44fa9b16234173 (patch) | |
tree | 12fb91dcd3871fd755be2b3b5d089b5059ec14b3 | |
parent | 8f94eeac0c2cd35f883944e5d552a428027a0d70 (diff) | |
download | gem5-7789e9aa75ba82a0bc52dc8b2b44fa9b16234173.tar.xz |
ps2: Implement the keyboard reset command
Linux tries to reset the PS/2 keyboard at boot.
Change-Id: I727fbf6138b654885d82d85be9d964ee3d3365ef
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/9766
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
-rw-r--r-- | src/dev/ps2/keyboard.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/dev/ps2/keyboard.cc b/src/dev/ps2/keyboard.cc index 1f8b54411..c9bc21986 100644 --- a/src/dev/ps2/keyboard.cc +++ b/src/dev/ps2/keyboard.cc @@ -127,6 +127,12 @@ PS2Keyboard::recv(const std::vector<uint8_t> &data) enabled = false; sendAck(); return true; + case Reset: + DPRINTF(PS2, "Resetting keyboard.\n"); + sendAck(); + enabled = true; + send(Ps2::SelfTestPass); + return true; case AllKeysToTypematic: panic("Setting all keys to typemantic unimplemented.\n"); case AllKeysToMakeRelease: @@ -144,8 +150,6 @@ PS2Keyboard::recv(const std::vector<uint8_t> &data) panic("Setting key to make only unimplemented.\n"); case Resend: panic("Keyboard resend unimplemented.\n"); - case Reset: - panic("Keyboard reset unimplemented.\n"); default: panic("Unknown keyboard command %#02x.\n", data[0]); } |