From 74e63a607af58c2df49cd2decbebd71a6d061915 Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Mon, 9 Apr 2018 18:42:28 +0100 Subject: dev, arm: Use the PS/2 framework in the Pl050 model The Pl050 KMI model currently has its own keyboard and mouse models. Use the generic PS/2 interface instead. Change-Id: I6523d26f8e38bcc8ba399d4d1a131723645d36c7 Signed-off-by: Andreas Sandberg Reviewed-by: Giacomo Travaglini Reviewed-on: https://gem5-review.googlesource.com/9767 Reviewed-by: Gabe Black --- src/dev/arm/RealView.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'src/dev/arm/RealView.py') diff --git a/src/dev/arm/RealView.py b/src/dev/arm/RealView.py index a59e1713f..7661db15a 100644 --- a/src/dev/arm/RealView.py +++ b/src/dev/arm/RealView.py @@ -62,6 +62,7 @@ from ClockDomain import SrcClockDomain from SubSystem import SubSystem from Graphics import ImageFormat from ClockedObject import ClockedObject +from PS2 import * # Platforms with KVM support should generally use in-kernel GIC # emulation. Use a GIC model that automatically switches between @@ -465,11 +466,11 @@ class PL031(AmbaIntDevice): class Pl050(AmbaIntDevice): type = 'Pl050' cxx_header = "dev/arm/kmi.hh" - vnc = Param.VncInput(Parent.any, "Vnc server for remote frame buffer display") - is_mouse = Param.Bool(False, "Is this interface a mouse, if not a keyboard") int_delay = '1us' amba_id = 0x00141050 + ps2 = Param.PS2Device("PS/2 device") + def generateDeviceTree(self, state): node = self.generateBasicPioDeviceNode(state, 'kmi', self.pio_addr, 0x1000, [int(self.int_num)]) @@ -624,8 +625,8 @@ class RealViewPBX(RealView): local_cpu_timer = CpuLocalTimer(int_num_timer=29, int_num_watchdog=30, pio_addr=0x1f000600) clcd = Pl111(pio_addr=0x10020000, int_num=55) - kmi0 = Pl050(pio_addr=0x10006000, int_num=52) - kmi1 = Pl050(pio_addr=0x10007000, int_num=53, is_mouse=True) + kmi0 = Pl050(pio_addr=0x10006000, int_num=52, ps2=PS2Keyboard()) + kmi1 = Pl050(pio_addr=0x10007000, int_num=53, ps2=PS2TouchKit()) a9scu = A9SCU(pio_addr=0x1f000000) cf_ctrl = IdeController(disks=[], pci_func=0, pci_dev=7, pci_bus=2, io_shift = 1, ctrl_offset = 2, Command = 0x1, @@ -753,8 +754,8 @@ class RealViewEB(RealView): timer0 = Sp804(int_num0=36, int_num1=36, pio_addr=0x10011000) timer1 = Sp804(int_num0=37, int_num1=37, pio_addr=0x10012000) clcd = Pl111(pio_addr=0x10020000, int_num=23) - kmi0 = Pl050(pio_addr=0x10006000, int_num=20) - kmi1 = Pl050(pio_addr=0x10007000, int_num=21, is_mouse=True) + kmi0 = Pl050(pio_addr=0x10006000, int_num=20, ps2=PS2Keyboard()) + kmi1 = Pl050(pio_addr=0x10007000, int_num=21, ps2=PS2TouchKit()) l2x0_fake = IsaFake(pio_addr=0x1f002000, pio_size=0xfff, warn_access="1") flash_fake = IsaFake(pio_addr=0x40000000, pio_size=0x20000000-1, @@ -904,8 +905,8 @@ class VExpress_EMM(RealView): timer0 = Sp804(int_num0=34, int_num1=34, pio_addr=0x1C110000, clock0='1MHz', clock1='1MHz') timer1 = Sp804(int_num0=35, int_num1=35, pio_addr=0x1C120000, clock0='1MHz', clock1='1MHz') clcd = Pl111(pio_addr=0x1c1f0000, int_num=46) - kmi0 = Pl050(pio_addr=0x1c060000, int_num=44) - kmi1 = Pl050(pio_addr=0x1c070000, int_num=45, is_mouse=True) + kmi0 = Pl050(pio_addr=0x1c060000, int_num=44, ps2=PS2Keyboard()) + kmi1 = Pl050(pio_addr=0x1c070000, int_num=45, ps2=PS2TouchKit()) cf_ctrl = IdeController(disks=[], pci_func=0, pci_dev=0, pci_bus=2, io_shift = 2, ctrl_offset = 2, Command = 0x1, BAR0 = 0x1C1A0000, BAR0Size = '256B', @@ -1136,8 +1137,8 @@ Interrupts: uart0 = Pl011(pio_addr=0x1c090000, int_num=37) - kmi0 = Pl050(pio_addr=0x1c060000, int_num=44) - kmi1 = Pl050(pio_addr=0x1c070000, int_num=45, is_mouse=True) + kmi0 = Pl050(pio_addr=0x1c060000, int_num=44, ps2=PS2Keyboard()) + kmi1 = Pl050(pio_addr=0x1c070000, int_num=45, ps2=PS2TouchKit()) rtc = PL031(pio_addr=0x1c170000, int_num=36) -- cgit v1.2.3