summaryrefslogtreecommitdiff
path: root/src/dev/serial/Uart.py
diff options
context:
space:
mode:
authorAndreas Sandberg <andreas.sandberg@arm.com>2018-02-26 17:27:04 +0000
committerAndreas Sandberg <andreas.sandberg@arm.com>2018-05-08 15:04:12 +0000
commit05ee4c5b53cd0eaee5725abf039285156dab2734 (patch)
tree6a003e868d24fc3aca53fe32bd2b48ff0febca1c /src/dev/serial/Uart.py
parent6d2e71156c00482447f2f33f65de072477ef64bd (diff)
downloadgem5-05ee4c5b53cd0eaee5725abf039285156dab2734.tar.xz
dev: Add support for a simple debug UART
Add a simple memory-mapped device that forwards writes to a serial devices and treats reads as reads from the device. Unlike real UART models, this one doesn't support interrupts. This is useful to implement various debug devices that exist in many systems. Change-Id: I1e4300e4d3b70825a15d03f47d4e026941f9066c Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Jack Travaglini <giacomo.travaglini@arm.com> Reviewed-on: https://gem5-review.googlesource.com/10025 Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Diffstat (limited to 'src/dev/serial/Uart.py')
-rw-r--r--src/dev/serial/Uart.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/dev/serial/Uart.py b/src/dev/serial/Uart.py
index 53337059b..029d46c4f 100644
--- a/src/dev/serial/Uart.py
+++ b/src/dev/serial/Uart.py
@@ -1,3 +1,15 @@
+# Copyright (c) 2018 ARM Limited
+# All rights reserved.
+#
+# The license below extends only to copyright in the software and shall
+# not be construed as granting a license to any other intellectual
+# property including but not limited to intellectual property relating
+# to a hardware implementation of the functionality of the software
+# licensed hereunder. You may use the software subject to the license
+# terms below provided that you ensure that this notice is replicated
+# unmodified and in its entirety in all distributions of the software,
+# modified or unmodified, in source code or in binary form.
+#
# Copyright (c) 2005-2007 The Regents of The University of Michigan
# All rights reserved.
#
@@ -38,6 +50,14 @@ class Uart(BasicPioDevice):
platform = Param.Platform(Parent.any, "Platform this device is part of.")
device = Param.SerialDevice(Parent.any, "The terminal")
+class SimpleUart(Uart):
+ type = 'SimpleUart'
+ cxx_header = "dev/serial/simple.hh"
+ big_endian = Param.Bool(False, "Is the device Big Endian?")
+ pio_size = Param.Addr(0x4, "Size of address range")
+ end_on_eot = Param.Bool(False, "End the simulation when a EOT is "\
+ "received on the UART")
+
class Uart8250(Uart):
type = 'Uart8250'
cxx_header = "dev/serial/uart8250.hh"