From d6c204c67d42a3cea9d603888ec52a8d8dacf1a3 Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Thu, 20 Jul 2017 11:20:17 +0100 Subject: dev: Refactor UART->Terminal interface The UART models currently assume that they are always wired to a terminal. While true at the moment, this isn't necessarily a valid assumption. This change introduces the SerialDevice class that defines the interface for serial devices. Currently, Terminal is the only class that implements this interface. Change-Id: I74fefafbbaf5ac1ec0d4ec0b5a0f4b246fdad305 Signed-off-by: Andreas Sandberg Reviewed-by: Curtis Dunham Reviewed-on: https://gem5-review.googlesource.com/4289 Reviewed-by: Gabe Black --- src/dev/virtio/VirtIOConsole.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/dev/virtio/VirtIOConsole.py') diff --git a/src/dev/virtio/VirtIOConsole.py b/src/dev/virtio/VirtIOConsole.py index cd73d6509..bce5e1de2 100644 --- a/src/dev/virtio/VirtIOConsole.py +++ b/src/dev/virtio/VirtIOConsole.py @@ -40,6 +40,7 @@ from m5.params import * from m5.proxy import * from VirtIO import VirtIODeviceBase +from Serial import SerialDevice class VirtIOConsole(VirtIODeviceBase): type = 'VirtIOConsole' @@ -48,4 +49,4 @@ class VirtIOConsole(VirtIODeviceBase): qRecvSize = Param.Unsigned(16, "Receive queue size (descriptors)") qTransSize = Param.Unsigned(16, "Transmit queue size (descriptors)") - terminal = Param.Terminal(Parent.any, "The terminal") + device = Param.SerialDevice("Serial device attached to this device") -- cgit v1.2.3