summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2019-09-06 15:14:00 -0700
committerGabe Black <gabeblack@google.com>2019-09-20 17:55:13 +0000
commit679ed0eec5e563a889b981231864e272c8e22c00 (patch)
treef591d3bc87e0e2daf2ad42d14495224d86b338bc /src
parentab376064bdfa9796eebad5ee8d84c766e7a30bd6 (diff)
downloadgem5-679ed0eec5e563a889b981231864e272c8e22c00.tar.xz
dev, x86: Delete the now unused X86 specific interrupt pins/lines.
Change-Id: I3915f0ad673119b551dcc4c5cedec180a9b88735 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20702 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/dev/x86/SConscript1
-rw-r--r--src/dev/x86/X86IntPin.py54
-rw-r--r--src/dev/x86/cmos.hh4
-rw-r--r--src/dev/x86/i8042.cc4
-rw-r--r--src/dev/x86/i8042.hh4
-rw-r--r--src/dev/x86/i82094aa.cc2
-rw-r--r--src/dev/x86/i82094aa.hh2
-rw-r--r--src/dev/x86/i8254.hh4
-rw-r--r--src/dev/x86/i8259.cc4
-rw-r--r--src/dev/x86/i8259.hh4
-rw-r--r--src/dev/x86/intdev.cc18
-rw-r--r--src/dev/x86/intdev.hh105
12 files changed, 14 insertions, 192 deletions
diff --git a/src/dev/x86/SConscript b/src/dev/x86/SConscript
index 331f0a229..4071cc8bd 100644
--- a/src/dev/x86/SConscript
+++ b/src/dev/x86/SConscript
@@ -65,6 +65,5 @@ if env['TARGET_ISA'] == 'x86':
Source('i82094aa.cc')
DebugFlag('I82094AA')
- SimObject('X86IntPin.py')
Source('intdev.cc')
DebugFlag('IntDevice')
diff --git a/src/dev/x86/X86IntPin.py b/src/dev/x86/X86IntPin.py
deleted file mode 100644
index 53760b496..000000000
--- a/src/dev/x86/X86IntPin.py
+++ /dev/null
@@ -1,54 +0,0 @@
-# Copyright (c) 2008 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: Gabe Black
-
-from m5.params import *
-from m5.SimObject import SimObject
-
-# A generic pin to drive an interrupt signal generated by a device.
-class X86IntSourcePin(SimObject):
- type = 'X86IntSourcePin'
- cxx_class = 'X86ISA::IntSourcePin'
- cxx_header = "dev/x86/intdev.hh"
-
-# A generic pin to receive an interrupt signal generated by another device.
-class X86IntSinkPin(SimObject):
- type = 'X86IntSinkPin'
- cxx_class = 'X86ISA::IntSinkPin'
- cxx_header = "dev/x86/intdev.hh"
-
- device = Param.SimObject("Device this pin belongs to")
- number = Param.Int("The pin number on the device")
-
-# An interrupt line which is driven by a source pin and drives a sink pin.
-class X86IntLine(SimObject):
- type = 'X86IntLine'
- cxx_class = 'X86ISA::IntLine'
- cxx_header = "dev/x86/intdev.hh"
-
- source = Param.X86IntSourcePin("Pin driving this line")
- sink = Param.X86IntSinkPin("Pin driven by this line")
diff --git a/src/dev/x86/cmos.hh b/src/dev/x86/cmos.hh
index 2f662070d..b4ab8e796 100644
--- a/src/dev/x86/cmos.hh
+++ b/src/dev/x86/cmos.hh
@@ -56,14 +56,14 @@ class Cmos : public BasicPioDevice
class X86RTC : public MC146818
{
public:
- std::vector<::IntSourcePin<X86RTC> *> intPin;
+ std::vector<IntSourcePin<X86RTC> *> intPin;
X86RTC(EventManager *em, const std::string &n, const struct tm time,
bool bcd, Tick frequency, int int_pin_count) :
MC146818(em, n, time, bcd, frequency)
{
for (int i = 0; i < int_pin_count; i++) {
- intPin.push_back(new ::IntSourcePin<X86RTC>(
+ intPin.push_back(new IntSourcePin<X86RTC>(
csprintf("%s.int_pin[%d]", n, i), i, this));
}
}
diff --git a/src/dev/x86/i8042.cc b/src/dev/x86/i8042.cc
index 2211df85b..3c3cceb2d 100644
--- a/src/dev/x86/i8042.cc
+++ b/src/dev/x86/i8042.cc
@@ -64,11 +64,11 @@ X86ISA::I8042::I8042(Params *p)
commandByte.keyboardFullInt = 1;
for (int i = 0; i < p->port_keyboard_int_pin_connection_count; i++) {
- keyboardIntPin.push_back(new ::IntSourcePin<I8042>(
+ keyboardIntPin.push_back(new IntSourcePin<I8042>(
csprintf("%s.keyboard_int_pin[%d]", name(), i), i, this));
}
for (int i = 0; i < p->port_mouse_int_pin_connection_count; i++) {
- mouseIntPin.push_back(new ::IntSourcePin<I8042>(
+ mouseIntPin.push_back(new IntSourcePin<I8042>(
csprintf("%s.mouse_int_pin[%d]", name(), i), i, this));
}
}
diff --git a/src/dev/x86/i8042.hh b/src/dev/x86/i8042.hh
index 5f62395dd..7faa760b6 100644
--- a/src/dev/x86/i8042.hh
+++ b/src/dev/x86/i8042.hh
@@ -108,8 +108,8 @@ class I8042 : public BasicPioDevice
static const uint16_t NoCommand = (uint16_t)(-1);
uint16_t lastCommand;
- std::vector<::IntSourcePin<I8042> *> mouseIntPin;
- std::vector<::IntSourcePin<I8042> *> keyboardIntPin;
+ std::vector<IntSourcePin<I8042> *> mouseIntPin;
+ std::vector<IntSourcePin<I8042> *> keyboardIntPin;
PS2Device *mouse;
PS2Device *keyboard;
diff --git a/src/dev/x86/i82094aa.cc b/src/dev/x86/i82094aa.cc
index 81f1c77ee..1fae67b09 100644
--- a/src/dev/x86/i82094aa.cc
+++ b/src/dev/x86/i82094aa.cc
@@ -59,7 +59,7 @@ X86ISA::I82094AA::I82094AA(Params *p)
}
for (int i = 0; i < p->port_inputs_connection_count; i++)
- inputs.push_back(new ::IntSinkPin<I82094AA>(
+ inputs.push_back(new IntSinkPin<I82094AA>(
csprintf("%s.inputs[%d]", name(), i), i, this));
}
diff --git a/src/dev/x86/i82094aa.hh b/src/dev/x86/i82094aa.hh
index 1c65fb310..b0764758a 100644
--- a/src/dev/x86/i82094aa.hh
+++ b/src/dev/x86/i82094aa.hh
@@ -82,7 +82,7 @@ class I82094AA : public BasicPioDevice, public IntDevice
RedirTableEntry redirTable[TableSize];
bool pinStates[TableSize];
- std::vector<::IntSinkPin<I82094AA> *> inputs;
+ std::vector<IntSinkPin<I82094AA> *> inputs;
public:
typedef I82094AAParams Params;
diff --git a/src/dev/x86/i8254.hh b/src/dev/x86/i8254.hh
index 70a18b47c..084da8ed7 100644
--- a/src/dev/x86/i8254.hh
+++ b/src/dev/x86/i8254.hh
@@ -63,7 +63,7 @@ class I8254 : public BasicPioDevice
X86Intel8254Timer pit;
- std::vector<::IntSourcePin<I8254> *> intPin;
+ std::vector<IntSourcePin<I8254> *> intPin;
void counterInterrupt(unsigned int num);
@@ -89,7 +89,7 @@ class I8254 : public BasicPioDevice
pit(p->name, this)
{
for (int i = 0; i < p->port_int_pin_connection_count; i++) {
- intPin.push_back(new ::IntSourcePin<I8254>(csprintf(
+ intPin.push_back(new IntSourcePin<I8254>(csprintf(
"%s.int_pin[%d]", name(), i), i, this));
}
}
diff --git a/src/dev/x86/i8259.cc b/src/dev/x86/i8259.cc
index 06e3bf659..a2141e5c6 100644
--- a/src/dev/x86/i8259.cc
+++ b/src/dev/x86/i8259.cc
@@ -44,7 +44,7 @@ X86ISA::I8259::I8259(Params * p)
readIRR(true), initControlWord(0), autoEOI(false)
{
for (int i = 0; i < p->port_output_connection_count; i++) {
- output.push_back(new ::IntSourcePin<I8259>(
+ output.push_back(new IntSourcePin<I8259>(
csprintf("%s.output[%d]", name(), i), i, this));
}
@@ -52,7 +52,7 @@ X86ISA::I8259::I8259(Params * p)
panic_if(in_count >= NumLines,
"I8259 only supports 8 inputs, but there are %d.", in_count);
for (int i = 0; i < in_count; i++) {
- inputs.push_back(new ::IntSinkPin<I8259>(
+ inputs.push_back(new IntSinkPin<I8259>(
csprintf("%s.inputs[%d]", name(), i), i, this));
}
diff --git a/src/dev/x86/i8259.hh b/src/dev/x86/i8259.hh
index 8cc12f0be..f9f0afff8 100644
--- a/src/dev/x86/i8259.hh
+++ b/src/dev/x86/i8259.hh
@@ -48,8 +48,8 @@ class I8259 : public BasicPioDevice
void init() override;
Tick latency;
- std::vector<::IntSourcePin<I8259> *> output;
- std::vector<::IntSinkPin<I8259> *> inputs;
+ std::vector<IntSourcePin<I8259> *> output;
+ std::vector<IntSinkPin<I8259> *> inputs;
Enums::X86I8259CascadeMode mode;
I8259 * slave;
diff --git a/src/dev/x86/intdev.cc b/src/dev/x86/intdev.cc
index a35f76b5f..e6c068a27 100644
--- a/src/dev/x86/intdev.cc
+++ b/src/dev/x86/intdev.cc
@@ -70,21 +70,3 @@ X86ISA::IntDevice::init()
panic("Int port not connected to anything!");
}
}
-
-X86ISA::IntSourcePin *
-X86IntSourcePinParams::create()
-{
- return new X86ISA::IntSourcePin(this);
-}
-
-X86ISA::IntSinkPin *
-X86IntSinkPinParams::create()
-{
- return new X86ISA::IntSinkPin(this);
-}
-
-X86ISA::IntLine *
-X86IntLineParams::create()
-{
- return new X86ISA::IntLine(this);
-}
diff --git a/src/dev/x86/intdev.hh b/src/dev/x86/intdev.hh
index 2e3e99df0..0cc2be032 100644
--- a/src/dev/x86/intdev.hh
+++ b/src/dev/x86/intdev.hh
@@ -50,9 +50,6 @@
#include "arch/x86/intmessage.hh"
#include "arch/x86/x86_traits.hh"
#include "mem/mport.hh"
-#include "params/X86IntLine.hh"
-#include "params/X86IntSinkPin.hh"
-#include "params/X86IntSourcePin.hh"
#include "sim/sim_object.hh"
namespace X86ISA {
@@ -121,24 +118,6 @@ class IntDevice
virtual void init();
- virtual void
- signalInterrupt(int line)
- {
- panic("signalInterrupt not implemented.\n");
- }
-
- virtual void
- raiseInterruptPin(int number)
- {
- panic("raiseInterruptPin not implemented.\n");
- }
-
- virtual void
- lowerInterruptPin(int number)
- {
- panic("lowerInterruptPin not implemented.\n");
- }
-
virtual Tick
recvMessage(PacketPtr pkt)
{
@@ -160,90 +139,6 @@ class IntDevice
}
};
-class IntSinkPin : public SimObject
-{
- public:
- IntDevice * device;
- int number;
-
- typedef X86IntSinkPinParams Params;
-
- const Params *
- params() const
- {
- return dynamic_cast<const Params *>(_params);
- }
-
- IntSinkPin(Params *p) : SimObject(p),
- device(dynamic_cast<IntDevice *>(p->device)), number(p->number)
- {
- assert(device);
- }
-};
-
-class IntSourcePin : public SimObject
-{
- protected:
- std::vector<IntSinkPin *> sinks;
-
- public:
- typedef X86IntSourcePinParams Params;
-
- const Params *
- params() const
- {
- return dynamic_cast<const Params *>(_params);
- }
-
- void
- addSink(IntSinkPin *sink)
- {
- sinks.push_back(sink);
- }
-
- void
- raise()
- {
- for (int i = 0; i < sinks.size(); i++) {
- const IntSinkPin &pin = *sinks[i];
- pin.device->raiseInterruptPin(pin.number);
- }
- }
-
- void
- lower()
- {
- for (int i = 0; i < sinks.size(); i++) {
- const IntSinkPin &pin = *sinks[i];
- pin.device->lowerInterruptPin(pin.number);
- }
- }
-
- IntSourcePin(Params *p) : SimObject(p)
- {}
-};
-
-class IntLine : public SimObject
-{
- protected:
- IntSourcePin *source;
- IntSinkPin *sink;
-
- public:
- typedef X86IntLineParams Params;
-
- const Params *
- params() const
- {
- return dynamic_cast<const Params *>(_params);
- }
-
- IntLine(Params *p) : SimObject(p), source(p->source), sink(p->sink)
- {
- source->addSink(sink);
- }
-};
-
} // namespace X86ISA
#endif //__DEV_X86_INTDEV_HH__