summaryrefslogtreecommitdiff
path: root/src/dev
diff options
context:
space:
mode:
authorAndreas Sandberg <andreas.sandberg@arm.com>2017-07-20 11:58:06 +0100
committerAndreas Sandberg <andreas.sandberg@arm.com>2017-11-08 20:04:53 +0000
commit20de3bb759a36dbffed10adae2159e376b7cb68c (patch)
tree8984162e7204528cd5297e5514a4e6deda4536a3 /src/dev
parent74d3f8a1765869765b542fd91114628a62947ba9 (diff)
downloadgem5-20de3bb759a36dbffed10adae2159e376b7cb68c.tar.xz
dev: Move generic serial devices to src/dev/serial
Change-Id: I104227fc460f8b561e7375b329a541c1fce881b2 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Curtis Dunham <curtis.dunham@arm.com> Reviewed-on: https://gem5-review.googlesource.com/4291 Reviewed-by: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/dev')
-rw-r--r--src/dev/SConscript10
-rw-r--r--src/dev/alpha/backdoor.cc2
-rw-r--r--src/dev/alpha/tsunami.cc1
-rw-r--r--src/dev/arm/gic_pl390.cc1
-rw-r--r--src/dev/arm/pl011.hh2
-rw-r--r--src/dev/arm/realview.cc1
-rw-r--r--src/dev/arm/vgic.cc1
-rwxr-xr-xsrc/dev/mips/malta.cc1
-rw-r--r--src/dev/serial/SConscript59
-rw-r--r--src/dev/serial/Serial.py (renamed from src/dev/Serial.py)4
-rw-r--r--src/dev/serial/Terminal.py (renamed from src/dev/Terminal.py)2
-rw-r--r--src/dev/serial/Uart.py (renamed from src/dev/Uart.py)4
-rw-r--r--src/dev/serial/serial.cc (renamed from src/dev/serial.cc)2
-rw-r--r--src/dev/serial/serial.hh (renamed from src/dev/serial.hh)0
-rw-r--r--src/dev/serial/terminal.cc (renamed from src/dev/terminal.cc)4
-rw-r--r--src/dev/serial/terminal.hh (renamed from src/dev/terminal.hh)2
-rw-r--r--src/dev/serial/uart.cc (renamed from src/dev/uart.cc)6
-rw-r--r--src/dev/serial/uart.hh (renamed from src/dev/uart.hh)2
-rw-r--r--src/dev/serial/uart8250.cc (renamed from src/dev/uart8250.cc)2
-rw-r--r--src/dev/serial/uart8250.hh (renamed from src/dev/uart8250.hh)2
-rw-r--r--src/dev/sparc/t1000.cc1
-rw-r--r--src/dev/virtio/block.hh1
-rw-r--r--src/dev/virtio/console.hh2
-rw-r--r--src/dev/x86/pc.cc1
24 files changed, 75 insertions, 38 deletions
diff --git a/src/dev/SConscript b/src/dev/SConscript
index b95d3606c..6939e03d1 100644
--- a/src/dev/SConscript
+++ b/src/dev/SConscript
@@ -44,9 +44,6 @@ if env['TARGET_ISA'] == 'null':
SimObject('BadDevice.py')
SimObject('Platform.py')
-SimObject('Serial.py')
-SimObject('Terminal.py')
-SimObject('Uart.py')
Source('baddev.cc')
Source('intel_8254_timer.cc')
@@ -54,13 +51,6 @@ Source('mc146818.cc')
Source('pixelpump.cc')
Source('platform.cc')
Source('ps2.cc')
-Source('serial.cc')
-Source('terminal.cc')
-Source('uart.cc')
-Source('uart8250.cc')
DebugFlag('Intel8254Timer')
DebugFlag('MC146818')
-DebugFlag('Terminal')
-DebugFlag('TerminalVerbose')
-DebugFlag('Uart')
diff --git a/src/dev/alpha/backdoor.cc b/src/dev/alpha/backdoor.cc
index 5187e5bae..e2de19773 100644
--- a/src/dev/alpha/backdoor.cc
+++ b/src/dev/alpha/backdoor.cc
@@ -52,7 +52,7 @@
#include "dev/alpha/tsunami_io.hh"
#include "dev/platform.hh"
#include "dev/storage/simple_disk.hh"
-#include "dev/terminal.hh"
+#include "dev/serial/terminal.hh"
#include "mem/packet.hh"
#include "mem/packet_access.hh"
#include "mem/physical.hh"
diff --git a/src/dev/alpha/tsunami.cc b/src/dev/alpha/tsunami.cc
index 82a38129b..30df89d0c 100644
--- a/src/dev/alpha/tsunami.cc
+++ b/src/dev/alpha/tsunami.cc
@@ -44,7 +44,6 @@
#include "dev/alpha/tsunami_cchip.hh"
#include "dev/alpha/tsunami_io.hh"
#include "dev/alpha/tsunami_pchip.hh"
-#include "dev/terminal.hh"
using namespace std;
//Should this be AlphaISA?
diff --git a/src/dev/arm/gic_pl390.cc b/src/dev/arm/gic_pl390.cc
index d2ec1d79b..4818be6c9 100644
--- a/src/dev/arm/gic_pl390.cc
+++ b/src/dev/arm/gic_pl390.cc
@@ -48,7 +48,6 @@
#include "debug/GIC.hh"
#include "debug/IPI.hh"
#include "debug/Interrupt.hh"
-#include "dev/terminal.hh"
#include "mem/packet.hh"
#include "mem/packet_access.hh"
diff --git a/src/dev/arm/pl011.hh b/src/dev/arm/pl011.hh
index d6c839c4d..2317b3114 100644
--- a/src/dev/arm/pl011.hh
+++ b/src/dev/arm/pl011.hh
@@ -50,7 +50,7 @@
#define __DEV_ARM_PL011_H__
#include "dev/arm/amba_device.hh"
-#include "dev/uart.hh"
+#include "dev/serial/uart.hh"
class BaseGic;
struct Pl011Params;
diff --git a/src/dev/arm/realview.cc b/src/dev/arm/realview.cc
index e5e7afdc0..8524b23c0 100644
--- a/src/dev/arm/realview.cc
+++ b/src/dev/arm/realview.cc
@@ -53,7 +53,6 @@
#include "config/the_isa.hh"
#include "cpu/intr_control.hh"
#include "dev/arm/base_gic.hh"
-#include "dev/terminal.hh"
#include "sim/system.hh"
using namespace std;
diff --git a/src/dev/arm/vgic.cc b/src/dev/arm/vgic.cc
index cc8ad7788..529520403 100644
--- a/src/dev/arm/vgic.cc
+++ b/src/dev/arm/vgic.cc
@@ -43,7 +43,6 @@
#include "debug/Checkpoint.hh"
#include "debug/VGIC.hh"
#include "dev/arm/base_gic.hh"
-#include "dev/terminal.hh"
#include "mem/packet.hh"
#include "mem/packet_access.hh"
diff --git a/src/dev/mips/malta.cc b/src/dev/mips/malta.cc
index 8843d4bf2..a25904780 100755
--- a/src/dev/mips/malta.cc
+++ b/src/dev/mips/malta.cc
@@ -44,7 +44,6 @@
#include "debug/Malta.hh"
#include "dev/mips/malta_cchip.hh"
#include "dev/mips/malta_io.hh"
-#include "dev/terminal.hh"
#include "params/Malta.hh"
#include "sim/system.hh"
diff --git a/src/dev/serial/SConscript b/src/dev/serial/SConscript
new file mode 100644
index 000000000..b9f13f54b
--- /dev/null
+++ b/src/dev/serial/SConscript
@@ -0,0 +1,59 @@
+# -*- mode:python -*-
+
+# Copyright (c) 2017 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) 2006 The Regents of The University of Michigan
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met: redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer;
+# redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution;
+# neither the name of the copyright holders nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Authors: Andreas Sandberg
+
+Import('*')
+
+if env['TARGET_ISA'] == 'null':
+ Return()
+
+SimObject('Serial.py')
+SimObject('Terminal.py')
+SimObject('Uart.py')
+
+Source('serial.cc')
+Source('terminal.cc')
+Source('uart.cc')
+Source('uart8250.cc')
+
+DebugFlag('Terminal')
+DebugFlag('TerminalVerbose')
+DebugFlag('Uart')
diff --git a/src/dev/Serial.py b/src/dev/serial/Serial.py
index 7871b487b..3f62ef37f 100644
--- a/src/dev/Serial.py
+++ b/src/dev/serial/Serial.py
@@ -41,8 +41,8 @@ from m5.SimObject import SimObject
class SerialDevice(SimObject):
type = 'SerialDevice'
abstract = True
- cxx_header = "dev/serial.hh"
+ cxx_header = "dev/serial/serial.hh"
class SerialNullDevice(SerialDevice):
type = 'SerialNullDevice'
- cxx_header = "dev/serial.hh"
+ cxx_header = "dev/serial/serial.hh"
diff --git a/src/dev/Terminal.py b/src/dev/serial/Terminal.py
index 9b50111cd..863c4871c 100644
--- a/src/dev/Terminal.py
+++ b/src/dev/serial/Terminal.py
@@ -33,7 +33,7 @@ from Serial import SerialDevice
class Terminal(SerialDevice):
type = 'Terminal'
- cxx_header = "dev/terminal.hh"
+ cxx_header = "dev/serial/terminal.hh"
intr_control = Param.IntrControl(Parent.any, "interrupt controller")
port = Param.TcpPort(3456, "listen port")
number = Param.Int(0, "terminal number")
diff --git a/src/dev/Uart.py b/src/dev/serial/Uart.py
index c3bfd1bc2..53337059b 100644
--- a/src/dev/Uart.py
+++ b/src/dev/serial/Uart.py
@@ -34,10 +34,10 @@ from Serial import SerialDevice
class Uart(BasicPioDevice):
type = 'Uart'
abstract = True
- cxx_header = "dev/uart.hh"
+ cxx_header = "dev/serial/uart.hh"
platform = Param.Platform(Parent.any, "Platform this device is part of.")
device = Param.SerialDevice(Parent.any, "The terminal")
class Uart8250(Uart):
type = 'Uart8250'
- cxx_header = "dev/uart8250.hh"
+ cxx_header = "dev/serial/uart8250.hh"
diff --git a/src/dev/serial.cc b/src/dev/serial/serial.cc
index 68fc94c57..873366860 100644
--- a/src/dev/serial.cc
+++ b/src/dev/serial/serial.cc
@@ -37,7 +37,7 @@
* Authors: Andreas Sandberg
*/
-#include "dev/serial.hh"
+#include "dev/serial/serial.hh"
#include "base/misc.hh"
#include "params/SerialDevice.hh"
diff --git a/src/dev/serial.hh b/src/dev/serial/serial.hh
index 230ecaa74..230ecaa74 100644
--- a/src/dev/serial.hh
+++ b/src/dev/serial/serial.hh
diff --git a/src/dev/terminal.cc b/src/dev/serial/terminal.cc
index 4f9881ddd..7230698d3 100644
--- a/src/dev/terminal.cc
+++ b/src/dev/serial/terminal.cc
@@ -42,7 +42,7 @@
#include <sys/termios.h>
#endif
-#include "dev/terminal.hh"
+#include "dev/serial/terminal.hh"
#include <poll.h>
#include <unistd.h>
@@ -62,7 +62,7 @@
#include "debug/Terminal.hh"
#include "debug/TerminalVerbose.hh"
#include "dev/platform.hh"
-#include "dev/uart.hh"
+#include "dev/serial/uart.hh"
using namespace std;
diff --git a/src/dev/terminal.hh b/src/dev/serial/terminal.hh
index 8b6ec0b7f..48bfc0771 100644
--- a/src/dev/terminal.hh
+++ b/src/dev/serial/terminal.hh
@@ -43,7 +43,7 @@
#include "base/pollevent.hh"
#include "base/socket.hh"
#include "cpu/intr_control.hh"
-#include "dev/serial.hh"
+#include "dev/serial/serial.hh"
#include "params/Terminal.hh"
#include "sim/sim_object.hh"
diff --git a/src/dev/uart.cc b/src/dev/serial/uart.cc
index ff952cc7f..3a4c13c43 100644
--- a/src/dev/uart.cc
+++ b/src/dev/serial/uart.cc
@@ -32,11 +32,7 @@
* Implements a base class for UARTs
*/
-#include "dev/uart.hh"
-
-#include "dev/serial.hh"
-
-using namespace std;
+#include "dev/serial/uart.hh"
Uart::Uart(const Params *p, Addr pio_size)
: BasicPioDevice(p, pio_size),
diff --git a/src/dev/uart.hh b/src/dev/serial/uart.hh
index bf3dcf7c3..04e9ec2e0 100644
--- a/src/dev/uart.hh
+++ b/src/dev/serial/uart.hh
@@ -37,7 +37,7 @@
#include "base/callback.hh"
#include "dev/io_device.hh"
-#include "dev/serial.hh"
+#include "dev/serial/serial.hh"
#include "params/Uart.hh"
class Platform;
diff --git a/src/dev/uart8250.cc b/src/dev/serial/uart8250.cc
index f99b2472b..43300f5e8 100644
--- a/src/dev/uart8250.cc
+++ b/src/dev/serial/uart8250.cc
@@ -32,7 +32,7 @@
* Implements a 8250 UART
*/
-#include "dev/uart8250.hh"
+#include "dev/serial/uart8250.hh"
#include <string>
#include <vector>
diff --git a/src/dev/uart8250.hh b/src/dev/serial/uart8250.hh
index b7fefc534..585fbb21e 100644
--- a/src/dev/uart8250.hh
+++ b/src/dev/serial/uart8250.hh
@@ -36,7 +36,7 @@
#define __DEV_UART8250_HH__
#include "dev/io_device.hh"
-#include "dev/uart.hh"
+#include "dev/serial/uart.hh"
#include "params/Uart8250.hh"
/* UART8250 Interrupt ID Register
diff --git a/src/dev/sparc/t1000.cc b/src/dev/sparc/t1000.cc
index f65846297..0bc7ad87d 100644
--- a/src/dev/sparc/t1000.cc
+++ b/src/dev/sparc/t1000.cc
@@ -40,7 +40,6 @@
#include "config/the_isa.hh"
#include "cpu/intr_control.hh"
-#include "dev/terminal.hh"
#include "sim/system.hh"
using namespace std;
diff --git a/src/dev/virtio/block.hh b/src/dev/virtio/block.hh
index fbbb51854..be88bd035 100644
--- a/src/dev/virtio/block.hh
+++ b/src/dev/virtio/block.hh
@@ -42,7 +42,6 @@
#include "dev/virtio/base.hh"
#include "dev/storage/disk_image.hh"
-#include "dev/terminal.hh"
struct VirtIOBlockParams;
diff --git a/src/dev/virtio/console.hh b/src/dev/virtio/console.hh
index 720b60044..cd044b12e 100644
--- a/src/dev/virtio/console.hh
+++ b/src/dev/virtio/console.hh
@@ -40,7 +40,7 @@
#ifndef __DEV_VIRTIO_CONSOLE_HH__
#define __DEV_VIRTIO_CONSOLE_HH__
-#include "dev/serial.hh"
+#include "dev/serial/serial.hh"
#include "dev/virtio/base.hh"
struct VirtIOConsoleParams;
diff --git a/src/dev/x86/pc.cc b/src/dev/x86/pc.cc
index 6d182c078..6746b5026 100644
--- a/src/dev/x86/pc.cc
+++ b/src/dev/x86/pc.cc
@@ -42,7 +42,6 @@
#include "arch/x86/x86_traits.hh"
#include "config/the_isa.hh"
#include "cpu/intr_control.hh"
-#include "dev/terminal.hh"
#include "dev/x86/i82094aa.hh"
#include "dev/x86/i8254.hh"
#include "dev/x86/i8259.hh"