summaryrefslogtreecommitdiff
path: root/src/dev/x86/I8042.py
diff options
context:
space:
mode:
authorAndreas Sandberg <andreas.sandberg@arm.com>2017-07-11 16:26:24 +0100
committerAndreas Sandberg <andreas.sandberg@arm.com>2018-04-17 08:46:33 +0000
commit18f62ac208a3fc8d385e66c3b5ff22473229d1d7 (patch)
treed4a2cb0daa1d3735e59696bc5484162acbd62cb9 /src/dev/x86/I8042.py
parent7c21795304e6ec79ed8c35873c4419a6342eb1e3 (diff)
downloadgem5-18f62ac208a3fc8d385e66c3b5ff22473229d1d7.tar.xz
ps2: Factor out PS/2 devices into their own subsystem
PS/2 devices are currently emulated both in the i8042 model and the Arm KMI model. This is undesirable since it leads to code duplication. This change introduces a common PS/2 device interface and factor out the x86 keyboard and mouse model. A subsequent commit will implement support for this interface in the Arm KMI model. Change-Id: I440e83517fd9dce362fdc1676db477cc6eee5211 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-on: https://gem5-review.googlesource.com/9762 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/dev/x86/I8042.py')
-rw-r--r--src/dev/x86/I8042.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/dev/x86/I8042.py b/src/dev/x86/I8042.py
index d13a13341..9203f40f5 100644
--- a/src/dev/x86/I8042.py
+++ b/src/dev/x86/I8042.py
@@ -30,6 +30,7 @@ from m5.params import *
from m5.proxy import *
from Device import BasicPioDevice
from X86IntPin import X86IntSourcePin
+from PS2 import *
class I8042(BasicPioDevice):
type = 'I8042'
@@ -43,3 +44,6 @@ class I8042(BasicPioDevice):
'Pin to signal the mouse has data')
keyboard_int_pin = Param.X86IntSourcePin(X86IntSourcePin(),
'Pin to signal the keyboard has data')
+
+ keyboard = Param.PS2Device(PS2Keyboard(), "PS/2 keyboard device")
+ mouse = Param.PS2Device(PS2Mouse(), "PS/2 mouse device")