summaryrefslogtreecommitdiff
path: root/src/dev
diff options
context:
space:
mode:
Diffstat (limited to 'src/dev')
-rw-r--r--src/dev/Device.py1
-rw-r--r--src/dev/Pci.py2
-rw-r--r--src/dev/SConscript144
-rw-r--r--src/dev/Uart.py1
-rw-r--r--src/dev/alpha/AlphaBackdoor.py2
-rw-r--r--src/dev/alpha/SConscript2
-rw-r--r--src/dev/alpha/backdoor.cc10
-rw-r--r--src/dev/alpha/tsunami.cc13
-rw-r--r--src/dev/alpha/tsunami.hh8
-rw-r--r--src/dev/arm/RealView.py1
-rw-r--r--src/dev/arm/SConscript2
-rw-r--r--src/dev/arm/gic.cc8
-rw-r--r--src/dev/arm/gic.hh2
-rw-r--r--src/dev/arm/realview.cc12
-rw-r--r--src/dev/arm/realview.hh6
-rw-r--r--src/dev/baddev.cc1
-rw-r--r--src/dev/io_device.cc4
-rw-r--r--src/dev/io_device.hh6
-rwxr-xr-xsrc/dev/mips/SConscript2
-rwxr-xr-xsrc/dev/mips/malta.cc10
-rwxr-xr-xsrc/dev/mips/malta.hh6
-rwxr-xr-xsrc/dev/mips/malta_cchip.cc2
-rwxr-xr-xsrc/dev/mips/malta_io.cc1
-rwxr-xr-xsrc/dev/mips/malta_pchip.cc1
-rw-r--r--src/dev/pcidev.cc4
-rw-r--r--src/dev/pcidev.hh8
-rw-r--r--src/dev/platform.hh1
-rw-r--r--src/dev/sparc/SConscript2
-rw-r--r--src/dev/sparc/T1000.py1
-rw-r--r--src/dev/sparc/iob.cc4
-rw-r--r--src/dev/sparc/t1000.cc12
-rw-r--r--src/dev/sparc/t1000.hh6
-rw-r--r--src/dev/x86/SConscript2
-rw-r--r--src/dev/x86/i82094aa.cc16
-rw-r--r--src/dev/x86/i82094aa.hh3
-rw-r--r--src/dev/x86/pc.cc9
-rw-r--r--src/dev/x86/pc.hh6
37 files changed, 125 insertions, 196 deletions
diff --git a/src/dev/Device.py b/src/dev/Device.py
index bf43449b5..9cd41fe09 100644
--- a/src/dev/Device.py
+++ b/src/dev/Device.py
@@ -34,7 +34,6 @@ class PioDevice(MemObject):
type = 'PioDevice'
abstract = True
pio = Port("Programmed I/O port")
- platform = Param.Platform(Parent.any, "Platform this device is part of")
system = Param.System(Parent.any, "System this device is part of")
class BasicPioDevice(PioDevice):
diff --git a/src/dev/Pci.py b/src/dev/Pci.py
index bd67d82fb..2f9f93a59 100644
--- a/src/dev/Pci.py
+++ b/src/dev/Pci.py
@@ -33,6 +33,7 @@ from Device import BasicPioDevice, DmaDevice, PioDevice
class PciConfigAll(PioDevice):
type = 'PciConfigAll'
+ platform = Param.Platform(Parent.any, "Platform this device is part of.")
pio_latency = Param.Tick(1, "Programmed IO latency in simticks")
bus = Param.UInt8(0x00, "PCI bus to act as config space for")
size = Param.MemorySize32('16MB', "Size of config space")
@@ -41,6 +42,7 @@ class PciConfigAll(PioDevice):
class PciDevice(DmaDevice):
type = 'PciDevice'
abstract = True
+ platform = Param.Platform(Parent.any, "Platform this device is part of.")
config = Port(Self.pio.peerObj.port, "PCI configuration space port")
pci_bus = Param.Int("PCI bus")
pci_dev = Param.Int("PCI device number")
diff --git a/src/dev/SConscript b/src/dev/SConscript
index 744e7b3c1..c041081b5 100644
--- a/src/dev/SConscript
+++ b/src/dev/SConscript
@@ -34,79 +34,77 @@ Import('*')
if env['TARGET_ISA'] == 'no':
Return()
-if env['FULL_SYSTEM']:
- SimObject('BadDevice.py')
- SimObject('CopyEngine.py')
- SimObject('Device.py')
- SimObject('DiskImage.py')
- SimObject('Ethernet.py')
- SimObject('Ide.py')
- SimObject('Pci.py')
- SimObject('Platform.py')
- SimObject('SimpleDisk.py')
- SimObject('Terminal.py')
- SimObject('Uart.py')
+SimObject('BadDevice.py')
+SimObject('CopyEngine.py')
+SimObject('Device.py')
+SimObject('DiskImage.py')
+SimObject('Ethernet.py')
+SimObject('Ide.py')
+SimObject('Pci.py')
+SimObject('Platform.py')
+SimObject('SimpleDisk.py')
+SimObject('Terminal.py')
+SimObject('Uart.py')
- Source('baddev.cc')
- Source('copy_engine.cc')
- Source('disk_image.cc')
- Source('etherbus.cc')
- Source('etherdevice.cc')
- Source('etherdump.cc')
- Source('etherint.cc')
- Source('etherlink.cc')
- Source('etherpkt.cc')
- Source('ethertap.cc')
- Source('i8254xGBe.cc')
- Source('ide_ctrl.cc')
- Source('ide_disk.cc')
- Source('intel_8254_timer.cc')
- Source('io_device.cc')
- Source('isa_fake.cc')
- Source('mc146818.cc')
- Source('ns_gige.cc')
- Source('pciconfigall.cc')
- Source('pcidev.cc')
- Source('pktfifo.cc')
- Source('platform.cc')
- Source('ps2.cc')
- Source('simple_disk.cc')
- Source('sinic.cc')
- Source('terminal.cc')
- Source('uart.cc')
- Source('uart8250.cc')
+Source('baddev.cc')
+Source('copy_engine.cc')
+Source('disk_image.cc')
+Source('etherbus.cc')
+Source('etherdevice.cc')
+Source('etherdump.cc')
+Source('etherint.cc')
+Source('etherlink.cc')
+Source('etherpkt.cc')
+Source('ethertap.cc')
+Source('i8254xGBe.cc')
+Source('ide_ctrl.cc')
+Source('ide_disk.cc')
+Source('intel_8254_timer.cc')
+Source('io_device.cc')
+Source('isa_fake.cc')
+Source('mc146818.cc')
+Source('ns_gige.cc')
+Source('pciconfigall.cc')
+Source('pcidev.cc')
+Source('pktfifo.cc')
+Source('platform.cc')
+Source('ps2.cc')
+Source('simple_disk.cc')
+Source('sinic.cc')
+Source('terminal.cc')
+Source('uart.cc')
+Source('uart8250.cc')
- DebugFlag('DiskImageRead')
- DebugFlag('DiskImageWrite')
- DebugFlag('DMA')
- DebugFlag('DMACopyEngine')
- DebugFlag('Ethernet')
- DebugFlag('EthernetCksum')
- DebugFlag('EthernetDMA')
- DebugFlag('EthernetData')
- DebugFlag('EthernetDesc')
- DebugFlag('EthernetEEPROM')
- DebugFlag('EthernetIntr')
- DebugFlag('EthernetPIO')
- DebugFlag('EthernetSM')
- DebugFlag('IdeCtrl')
- DebugFlag('IdeDisk')
- DebugFlag('Intel8254Timer')
- DebugFlag('IsaFake')
- DebugFlag('MC146818')
- DebugFlag('PCIDEV')
- DebugFlag('PciConfigAll')
- DebugFlag('SimpleDisk')
- DebugFlag('SimpleDiskData')
- DebugFlag('Terminal')
- DebugFlag('TerminalVerbose')
- DebugFlag('Uart')
-
- CompoundFlag('DiskImageAll', [ 'DiskImageRead', 'DiskImageWrite' ])
- CompoundFlag('EthernetAll', [ 'Ethernet', 'EthernetPIO', 'EthernetDMA',
- 'EthernetData' , 'EthernetDesc', 'EthernetIntr', 'EthernetSM',
- 'EthernetCksum', 'EthernetEEPROM' ])
- CompoundFlag('EthernetNoData', [ 'Ethernet', 'EthernetPIO', 'EthernetDesc',
- 'EthernetIntr', 'EthernetSM', 'EthernetCksum' ])
- CompoundFlag('IdeAll', [ 'IdeCtrl', 'IdeDisk' ])
+DebugFlag('DiskImageRead')
+DebugFlag('DiskImageWrite')
+DebugFlag('DMA')
+DebugFlag('DMACopyEngine')
+DebugFlag('Ethernet')
+DebugFlag('EthernetCksum')
+DebugFlag('EthernetDMA')
+DebugFlag('EthernetData')
+DebugFlag('EthernetDesc')
+DebugFlag('EthernetEEPROM')
+DebugFlag('EthernetIntr')
+DebugFlag('EthernetPIO')
+DebugFlag('EthernetSM')
+DebugFlag('IdeCtrl')
+DebugFlag('IdeDisk')
+DebugFlag('Intel8254Timer')
+DebugFlag('IsaFake')
+DebugFlag('MC146818')
+DebugFlag('PCIDEV')
+DebugFlag('PciConfigAll')
+DebugFlag('SimpleDisk')
+DebugFlag('SimpleDiskData')
+DebugFlag('Terminal')
+DebugFlag('TerminalVerbose')
+DebugFlag('Uart')
+CompoundFlag('DiskImageAll', [ 'DiskImageRead', 'DiskImageWrite' ])
+CompoundFlag('EthernetAll', [ 'Ethernet', 'EthernetPIO', 'EthernetDMA',
+ 'EthernetData' , 'EthernetDesc', 'EthernetIntr', 'EthernetSM',
+ 'EthernetCksum', 'EthernetEEPROM' ])
+CompoundFlag('EthernetNoData', [ 'Ethernet', 'EthernetPIO', 'EthernetDesc',
+ 'EthernetIntr', 'EthernetSM', 'EthernetCksum' ])
+CompoundFlag('IdeAll', [ 'IdeCtrl', 'IdeDisk' ])
diff --git a/src/dev/Uart.py b/src/dev/Uart.py
index 9254dc695..3dfc885eb 100644
--- a/src/dev/Uart.py
+++ b/src/dev/Uart.py
@@ -33,6 +33,7 @@ from Device import BasicPioDevice
class Uart(BasicPioDevice):
type = 'Uart'
abstract = True
+ platform = Param.Platform(Parent.any, "Platform this device is part of.")
terminal = Param.Terminal(Parent.any, "The terminal")
class Uart8250(Uart):
diff --git a/src/dev/alpha/AlphaBackdoor.py b/src/dev/alpha/AlphaBackdoor.py
index fa9627164..14894b863 100644
--- a/src/dev/alpha/AlphaBackdoor.py
+++ b/src/dev/alpha/AlphaBackdoor.py
@@ -26,6 +26,7 @@
#
# Authors: Nathan Binkert
+from m5.defines import buildEnv
from m5.params import *
from m5.proxy import *
from Device import BasicPioDevice
@@ -35,4 +36,5 @@ class AlphaBackdoor(BasicPioDevice):
cpu = Param.BaseCPU(Parent.cpu[0], "Processor")
disk = Param.SimpleDisk("Simple Disk")
terminal = Param.Terminal(Parent.any, "The console terminal")
+ platform = Param.Platform(Parent.any, "Platform this device is part of.")
system = Param.AlphaSystem(Parent.any, "system object")
diff --git a/src/dev/alpha/SConscript b/src/dev/alpha/SConscript
index 32baa6f48..9c8a5b4ce 100644
--- a/src/dev/alpha/SConscript
+++ b/src/dev/alpha/SConscript
@@ -31,7 +31,7 @@
Import('*')
-if env['FULL_SYSTEM'] and env['TARGET_ISA'] == 'alpha':
+if env['TARGET_ISA'] == 'alpha':
SimObject('AlphaBackdoor.py')
SimObject('Tsunami.py')
diff --git a/src/dev/alpha/backdoor.cc b/src/dev/alpha/backdoor.cc
index 31ab62866..f8225b1d8 100644
--- a/src/dev/alpha/backdoor.cc
+++ b/src/dev/alpha/backdoor.cc
@@ -46,6 +46,9 @@
#include "cpu/thread_context.hh"
#include "debug/AlphaBackdoor.hh"
#include "dev/alpha/backdoor.hh"
+#include "dev/alpha/tsunami.hh"
+#include "dev/alpha/tsunami_cchip.hh"
+#include "dev/alpha/tsunami_io.hh"
#include "dev/platform.hh"
#include "dev/simple_disk.hh"
#include "dev/terminal.hh"
@@ -60,7 +63,8 @@ using namespace AlphaISA;
AlphaBackdoor::AlphaBackdoor(const Params *p)
: BasicPioDevice(p), disk(p->disk), terminal(p->terminal),
- system(p->system), cpu(p->cpu)
+ system(p->system),
+ cpu(p->cpu)
{
pioSize = sizeof(struct AlphaAccess);
@@ -91,7 +95,9 @@ AlphaBackdoor::startup()
alphaAccess->entryPoint = system->getKernelEntry();
alphaAccess->mem_size = system->physmem->size();
alphaAccess->cpuClock = cpu->frequency() / 1000000; // In MHz
- alphaAccess->intrClockFrequency = params()->platform->intrFrequency();
+ Tsunami *tsunami = dynamic_cast<Tsunami *>(params()->platform);
+ assert(tsunami);
+ alphaAccess->intrClockFrequency = tsunami->io->frequency();
}
Tick
diff --git a/src/dev/alpha/tsunami.cc b/src/dev/alpha/tsunami.cc
index 34aab6ed0..41a2fef0c 100644
--- a/src/dev/alpha/tsunami.cc
+++ b/src/dev/alpha/tsunami.cc
@@ -36,6 +36,7 @@
#include <string>
#include <vector>
+#include "arch/alpha/system.hh"
#include "config/the_isa.hh"
#include "cpu/intr_control.hh"
#include "dev/alpha/tsunami.hh"
@@ -43,7 +44,6 @@
#include "dev/alpha/tsunami_io.hh"
#include "dev/alpha/tsunami_pchip.hh"
#include "dev/terminal.hh"
-#include "sim/system.hh"
using namespace std;
//Should this be AlphaISA?
@@ -52,17 +52,16 @@ using namespace TheISA;
Tsunami::Tsunami(const Params *p)
: Platform(p), system(p->system)
{
- // set the back pointer from the system to myself
- system->platform = this;
-
for (int i = 0; i < Tsunami::Max_CPUs; i++)
intr_sum_type[i] = 0;
}
-Tick
-Tsunami::intrFrequency()
+void
+Tsunami::init()
{
- return io->frequency();
+ AlphaSystem *alphaSystem = dynamic_cast<AlphaSystem *>(system);
+ assert(alphaSystem);
+ alphaSystem->setIntrFreq(io->frequency());
}
void
diff --git a/src/dev/alpha/tsunami.hh b/src/dev/alpha/tsunami.hh
index 64aafe533..9380864b0 100644
--- a/src/dev/alpha/tsunami.hh
+++ b/src/dev/alpha/tsunami.hh
@@ -80,17 +80,13 @@ class Tsunami : public Platform
int intr_sum_type[Tsunami::Max_CPUs];
int ipi_pending[Tsunami::Max_CPUs];
+ void init();
+
public:
typedef TsunamiParams Params;
Tsunami(const Params *p);
/**
- * Return the interrupting frequency to AlphaAccess
- * @return frequency of RTC interrupts
- */
- virtual Tick intrFrequency();
-
- /**
* Cause the cpu to post a serial interrupt to the CPU.
*/
virtual void postConsoleInt();
diff --git a/src/dev/arm/RealView.py b/src/dev/arm/RealView.py
index 96f3c8a61..11905ae79 100644
--- a/src/dev/arm/RealView.py
+++ b/src/dev/arm/RealView.py
@@ -83,6 +83,7 @@ class RealViewCtrl(BasicPioDevice):
class Gic(PioDevice):
type = 'Gic'
+ platform = Param.Platform(Parent.any, "Platform this device is part of.")
dist_addr = Param.Addr(0x1f001000, "Address for distributor")
cpu_addr = Param.Addr(0x1f000100, "Address for cpu")
dist_pio_delay = Param.Latency('10ns', "Delay for PIO r/w to distributor")
diff --git a/src/dev/arm/SConscript b/src/dev/arm/SConscript
index 07a3e14ae..deedcb49f 100644
--- a/src/dev/arm/SConscript
+++ b/src/dev/arm/SConscript
@@ -39,7 +39,7 @@
Import('*')
-if env['FULL_SYSTEM'] and env['TARGET_ISA'] == 'arm':
+if env['TARGET_ISA'] == 'arm':
SimObject('RealView.py')
Source('a9scu.cc')
diff --git a/src/dev/arm/gic.cc b/src/dev/arm/gic.cc
index 2dac18c08..67520f865 100644
--- a/src/dev/arm/gic.cc
+++ b/src/dev/arm/gic.cc
@@ -45,6 +45,7 @@
#include "debug/Checkpoint.hh"
#include "debug/GIC.hh"
#include "debug/IPI.hh"
+#include "debug/Interrupt.hh"
#include "dev/arm/gic.hh"
#include "dev/arm/realview.hh"
#include "dev/terminal.hh"
@@ -52,9 +53,10 @@
#include "mem/packet_access.hh"
Gic::Gic(const Params *p)
- : PioDevice(p),distAddr(p->dist_addr), cpuAddr(p->cpu_addr),
- distPioDelay(p->dist_pio_delay), cpuPioDelay(p->cpu_pio_delay),
- intLatency(p->int_latency), enabled(false), itLines(p->it_lines)
+ : PioDevice(p), platform(p->platform), distAddr(p->dist_addr),
+ cpuAddr(p->cpu_addr), distPioDelay(p->dist_pio_delay),
+ cpuPioDelay(p->cpu_pio_delay), intLatency(p->int_latency),
+ enabled(false), itLines(p->it_lines)
{
itLinesLog2 = ceilLog2(itLines);
diff --git a/src/dev/arm/gic.hh b/src/dev/arm/gic.hh
index 4c43db660..6988d6ed1 100644
--- a/src/dev/arm/gic.hh
+++ b/src/dev/arm/gic.hh
@@ -124,6 +124,8 @@ class Gic : public PioDevice
Bitfield<12,10> cpu_id;
EndBitUnion(IAR)
+ Platform *platform;
+
/** Distributor address GIC listens at */
Addr distAddr;
diff --git a/src/dev/arm/realview.cc b/src/dev/arm/realview.cc
index 8cc318f89..b33624cc6 100644
--- a/src/dev/arm/realview.cc
+++ b/src/dev/arm/realview.cc
@@ -60,17 +60,7 @@ using namespace TheISA;
RealView::RealView(const Params *p)
: Platform(p), system(p->system)
-{
- // set the back pointer from the system to myself
- system->platform = this;
-}
-
-Tick
-RealView::intrFrequency()
-{
- panic("Need implementation\n");
- M5_DUMMY_RETURN
-}
+{}
void
RealView::postConsoleInt()
diff --git a/src/dev/arm/realview.hh b/src/dev/arm/realview.hh
index 8ec9db5fc..70647d47c 100644
--- a/src/dev/arm/realview.hh
+++ b/src/dev/arm/realview.hh
@@ -82,12 +82,6 @@ class RealView : public Platform
void setGic(Gic *_gic) { gic = _gic; }
/**
- * Return the interrupting frequency to AlphaAccess
- * @return frequency of RTC interrupts
- */
- virtual Tick intrFrequency();
-
- /**
* Cause the cpu to post a serial interrupt to the CPU.
*/
virtual void postConsoleInt();
diff --git a/src/dev/baddev.cc b/src/dev/baddev.cc
index 1b4d04afc..9fb88d876 100644
--- a/src/dev/baddev.cc
+++ b/src/dev/baddev.cc
@@ -39,7 +39,6 @@
#include "base/trace.hh"
#include "config/the_isa.hh"
#include "dev/baddev.hh"
-#include "dev/platform.hh"
#include "mem/port.hh"
#include "params/BadDevice.hh"
#include "sim/system.hh"
diff --git a/src/dev/io_device.cc b/src/dev/io_device.cc
index dab1f766e..f124767ca 100644
--- a/src/dev/io_device.cc
+++ b/src/dev/io_device.cc
@@ -58,7 +58,7 @@ PioPort::getDeviceAddressRanges(AddrRangeList &resp, bool &snoop)
PioDevice::PioDevice(const Params *p)
- : MemObject(p), platform(p->platform), sys(p->system), pioPort(NULL)
+ : MemObject(p), sys(p->system), pioPort(NULL)
{}
PioDevice::~PioDevice()
@@ -71,7 +71,7 @@ void
PioDevice::init()
{
if (!pioPort)
- panic("Pio port not connected to anything!");
+ panic("Pio port %s not connected to anything!", name());
pioPort->sendStatusChange(Port::RangeChange);
}
diff --git a/src/dev/io_device.hh b/src/dev/io_device.hh
index 36787c13e..083ab43cb 100644
--- a/src/dev/io_device.hh
+++ b/src/dev/io_device.hh
@@ -42,7 +42,6 @@
#include "sim/sim_object.hh"
class Event;
-class Platform;
class PioDevice;
class DmaDevice;
class System;
@@ -199,11 +198,6 @@ class DmaPort : public Port
class PioDevice : public MemObject
{
protected:
-
- /** The platform we are in. This is used to decide what type of memory
- * transaction we should perform. */
- Platform *platform;
-
System *sys;
/** The pioPort that handles the requests for us and provides us requests
diff --git a/src/dev/mips/SConscript b/src/dev/mips/SConscript
index 369dbfed2..801b1916d 100755
--- a/src/dev/mips/SConscript
+++ b/src/dev/mips/SConscript
@@ -31,7 +31,7 @@
Import('*')
-if env['FULL_SYSTEM'] and env['TARGET_ISA'] == 'mips':
+if env['TARGET_ISA'] == 'mips':
SimObject('Malta.py')
DebugFlag('Malta')
diff --git a/src/dev/mips/malta.cc b/src/dev/mips/malta.cc
index bcf970745..277633c6b 100755
--- a/src/dev/mips/malta.cc
+++ b/src/dev/mips/malta.cc
@@ -39,6 +39,7 @@
#include "config/the_isa.hh"
#include "cpu/intr_control.hh"
+#include "debug/Malta.hh"
#include "dev/mips/malta.hh"
#include "dev/mips/malta_cchip.hh"
#include "dev/mips/malta_io.hh"
@@ -53,19 +54,10 @@ using namespace TheISA;
Malta::Malta(const Params *p)
: Platform(p), system(p->system)
{
- // set the back pointer from the system to myself
- system->platform = this;
-
for (int i = 0; i < Malta::Max_CPUs; i++)
intr_sum_type[i] = 0;
}
-Tick
-Malta::intrFrequency()
-{
- return io->frequency();
-}
-
void
Malta::postConsoleInt()
{
diff --git a/src/dev/mips/malta.hh b/src/dev/mips/malta.hh
index 69ae004b3..e612fb295 100755
--- a/src/dev/mips/malta.hh
+++ b/src/dev/mips/malta.hh
@@ -92,12 +92,6 @@ class Malta : public Platform
Malta(const Params *p);
/**
- * Return the interrupting frequency to MipsAccess
- * @return frequency of RTC interrupts
- */
- virtual Tick intrFrequency();
-
- /**
* Cause the cpu to post a serial interrupt to the CPU.
*/
virtual void postConsoleInt();
diff --git a/src/dev/mips/malta_cchip.cc b/src/dev/mips/malta_cchip.cc
index b2d5069c5..25062e422 100755
--- a/src/dev/mips/malta_cchip.cc
+++ b/src/dev/mips/malta_cchip.cc
@@ -37,11 +37,11 @@
#include <string>
#include <vector>
-#include "arch/mips/mips_core_specific.hh"
#include "base/trace.hh"
#include "config/the_isa.hh"
#include "cpu/intr_control.hh"
#include "cpu/thread_context.hh"
+#include "debug/Malta.hh"
#include "dev/mips/malta.hh"
#include "dev/mips/malta_cchip.hh"
#include "dev/mips/maltareg.h"
diff --git a/src/dev/mips/malta_io.cc b/src/dev/mips/malta_io.cc
index bd9288487..1ae5442bf 100755
--- a/src/dev/mips/malta_io.cc
+++ b/src/dev/mips/malta_io.cc
@@ -43,6 +43,7 @@
#include "base/time.hh"
#include "base/trace.hh"
#include "config/the_isa.hh"
+#include "debug/Malta.hh"
#include "dev/mips/malta.hh"
#include "dev/mips/malta_cchip.hh"
#include "dev/mips/malta_io.hh"
diff --git a/src/dev/mips/malta_pchip.cc b/src/dev/mips/malta_pchip.cc
index 7832a31bd..dd1993cc6 100755
--- a/src/dev/mips/malta_pchip.cc
+++ b/src/dev/mips/malta_pchip.cc
@@ -39,6 +39,7 @@
#include "base/trace.hh"
#include "config/the_isa.hh"
+#include "debug/Malta.hh"
#include "dev/mips/malta.hh"
#include "dev/mips/malta_pchip.hh"
#include "dev/mips/maltareg.h"
diff --git a/src/dev/pcidev.cc b/src/dev/pcidev.cc
index 2c7d50e83..ac315341a 100644
--- a/src/dev/pcidev.cc
+++ b/src/dev/pcidev.cc
@@ -83,7 +83,7 @@ PciDev::PciConfigPort::getDeviceAddressRanges(AddrRangeList &resp,
PciDev::PciDev(const Params *p)
- : DmaDevice(p), plat(p->platform), pioDelay(p->pio_latency),
+ : DmaDevice(p), platform(p->platform), pioDelay(p->pio_latency),
configDelay(p->config_latency), configPort(NULL)
{
config.vendor = htole(p->VendorID);
@@ -143,7 +143,7 @@ PciDev::PciDev(const Params *p)
}
}
- plat->registerPciDevice(p->pci_bus, p->pci_dev, p->pci_func,
+ platform->registerPciDevice(p->pci_bus, p->pci_dev, p->pci_func,
letoh(config.interruptLine));
}
diff --git a/src/dev/pcidev.hh b/src/dev/pcidev.hh
index 5da8b2dfc..dae005a97 100644
--- a/src/dev/pcidev.hh
+++ b/src/dev/pcidev.hh
@@ -149,7 +149,7 @@ class PciDev : public DmaDevice
}
protected:
- Platform *plat;
+ Platform *platform;
Tick pioDelay;
Tick configDelay;
PciConfigPort *configPort;
@@ -173,15 +173,15 @@ class PciDev : public DmaDevice
public:
Addr pciToDma(Addr pciAddr) const
- { return plat->pciToDma(pciAddr); }
+ { return platform->pciToDma(pciAddr); }
void
intrPost()
- { plat->postPciInt(letoh(config.interruptLine)); }
+ { platform->postPciInt(letoh(config.interruptLine)); }
void
intrClear()
- { plat->clearPciInt(letoh(config.interruptLine)); }
+ { platform->clearPciInt(letoh(config.interruptLine)); }
uint8_t
interruptLine()
diff --git a/src/dev/platform.hh b/src/dev/platform.hh
index a3f239865..b3d1bec9f 100644
--- a/src/dev/platform.hh
+++ b/src/dev/platform.hh
@@ -64,7 +64,6 @@ class Platform : public SimObject
virtual ~Platform();
virtual void postConsoleInt() = 0;
virtual void clearConsoleInt() = 0;
- virtual Tick intrFrequency() = 0;
virtual void postPciInt(int line);
virtual void clearPciInt(int line);
virtual Addr pciToDma(Addr pciAddr) const;
diff --git a/src/dev/sparc/SConscript b/src/dev/sparc/SConscript
index 772aa4864..e82e5ee05 100644
--- a/src/dev/sparc/SConscript
+++ b/src/dev/sparc/SConscript
@@ -31,7 +31,7 @@
Import('*')
-if env['FULL_SYSTEM'] and env['TARGET_ISA'] == 'sparc':
+if env['TARGET_ISA'] == 'sparc':
SimObject('T1000.py')
Source('dtod.cc')
diff --git a/src/dev/sparc/T1000.py b/src/dev/sparc/T1000.py
index cbf390737..901304251 100644
--- a/src/dev/sparc/T1000.py
+++ b/src/dev/sparc/T1000.py
@@ -46,6 +46,7 @@ class DumbTOD(BasicPioDevice):
class Iob(PioDevice):
type = 'Iob'
+ platform = Param.Platform(Parent.any, "Platform this device is part of.")
pio_latency = Param.Latency('1ns', "Programed IO latency in simticks")
diff --git a/src/dev/sparc/iob.cc b/src/dev/sparc/iob.cc
index 748a08c81..008e063e0 100644
--- a/src/dev/sparc/iob.cc
+++ b/src/dev/sparc/iob.cc
@@ -42,6 +42,7 @@
#include "base/bitfield.hh"
#include "base/trace.hh"
#include "cpu/intr_control.hh"
+#include "cpu/thread_context.hh"
#include "debug/Iob.hh"
#include "dev/sparc/iob.hh"
#include "dev/platform.hh"
@@ -61,9 +62,6 @@ Iob::Iob(const Params *p)
pioDelay = p->pio_latency;
- // Get the interrupt controller from the platform
- ic = platform->intrctrl;
-
for (int x = 0; x < NumDeviceIds; ++x) {
intMan[x].cpu = 0;
intMan[x].vector = 0;
diff --git a/src/dev/sparc/t1000.cc b/src/dev/sparc/t1000.cc
index c00d942c9..12f43ab23 100644
--- a/src/dev/sparc/t1000.cc
+++ b/src/dev/sparc/t1000.cc
@@ -48,17 +48,7 @@ using namespace TheISA;
T1000::T1000(const Params *p)
: Platform(p), system(p->system)
-{
- // set the back pointer from the system to myself
- system->platform = this;
-}
-
-Tick
-T1000::intrFrequency()
-{
- panic("Need implementation\n");
- M5_DUMMY_RETURN
-}
+{}
void
T1000::postConsoleInt()
diff --git a/src/dev/sparc/t1000.hh b/src/dev/sparc/t1000.hh
index 01ff3d319..6440f317b 100644
--- a/src/dev/sparc/t1000.hh
+++ b/src/dev/sparc/t1000.hh
@@ -60,12 +60,6 @@ class T1000 : public Platform
T1000(const Params *p);
/**
- * Return the interrupting frequency to AlphaAccess
- * @return frequency of RTC interrupts
- */
- virtual Tick intrFrequency();
-
- /**
* Cause the cpu to post a serial interrupt to the CPU.
*/
virtual void postConsoleInt();
diff --git a/src/dev/x86/SConscript b/src/dev/x86/SConscript
index eeb68cf44..038e4824b 100644
--- a/src/dev/x86/SConscript
+++ b/src/dev/x86/SConscript
@@ -30,7 +30,7 @@
Import('*')
-if env['FULL_SYSTEM'] and env['TARGET_ISA'] == 'x86':
+if env['TARGET_ISA'] == 'x86':
SimObject('Pc.py')
Source('pc.cc')
diff --git a/src/dev/x86/i82094aa.cc b/src/dev/x86/i82094aa.cc
index 584090a9e..d9c07f5ae 100644
--- a/src/dev/x86/i82094aa.cc
+++ b/src/dev/x86/i82094aa.cc
@@ -30,6 +30,7 @@
#include "arch/x86/interrupts.hh"
#include "arch/x86/intmessage.hh"
+#include "cpu/base.hh"
#include "debug/I82094AA.hh"
#include "dev/x86/i82094aa.hh"
#include "dev/x86/i8259.hh"
@@ -196,13 +197,11 @@ X86ISA::I82094AA::signalInterrupt(int line)
}
} else {
for (int i = 0; i < numContexts; i++) {
- std::map<int, Interrupts *>::iterator localApicIt =
- localApics.find(i);
- assert(localApicIt != localApics.end());
- Interrupts *localApic = localApicIt->second;
+ Interrupts *localApic = sys->getThreadContext(i)->
+ getCpuPtr()->getInterruptController();
if ((localApic->readReg(APIC_LOGICAL_DESTINATION) >> 24) &
message.destination) {
- apics.push_back(localApicIt->first);
+ apics.push_back(localApic->getInitialApicId());
}
}
if (message.deliveryMode == DeliveryMode::LowestPriority &&
@@ -245,13 +244,6 @@ X86ISA::I82094AA::lowerInterruptPin(int number)
}
void
-X86ISA::I82094AA::registerLocalApic(int initialId, Interrupts *localApic)
-{
- assert(localApic);
- localApics[initialId] = localApic;
-}
-
-void
X86ISA::I82094AA::serialize(std::ostream &os)
{
uint64_t* redirTableArray = (uint64_t*)redirTable;
diff --git a/src/dev/x86/i82094aa.hh b/src/dev/x86/i82094aa.hh
index ae0322d94..00ba2800d 100644
--- a/src/dev/x86/i82094aa.hh
+++ b/src/dev/x86/i82094aa.hh
@@ -70,8 +70,6 @@ class I82094AA : public PioDevice, public IntDev
I8259 * extIntPic;
- std::map<int, Interrupts *> localApics;
-
uint8_t regSel;
uint8_t initialApicId;
uint8_t id;
@@ -131,7 +129,6 @@ class I82094AA : public PioDevice, public IntDev
void signalInterrupt(int line);
void raiseInterruptPin(int number);
void lowerInterruptPin(int number);
- void registerLocalApic(int id, Interrupts *localApic);
virtual void serialize(std::ostream &os);
virtual void unserialize(Checkpoint *cp, const std::string &section);
diff --git a/src/dev/x86/pc.cc b/src/dev/x86/pc.cc
index 7912a45e1..dd8e34d9e 100644
--- a/src/dev/x86/pc.cc
+++ b/src/dev/x86/pc.cc
@@ -55,8 +55,6 @@ Pc::Pc(const Params *p)
: Platform(p), system(p->system)
{
southBridge = NULL;
- // set the back pointer from the system to myself
- system->platform = this;
}
void
@@ -117,13 +115,6 @@ Pc::init()
southBridge->pic2->maskAll();
}
-Tick
-Pc::intrFrequency()
-{
- panic("Need implementation for intrFrequency\n");
- M5_DUMMY_RETURN
-}
-
void
Pc::postConsoleInt()
{
diff --git a/src/dev/x86/pc.hh b/src/dev/x86/pc.hh
index 427cc4165..c999440d2 100644
--- a/src/dev/x86/pc.hh
+++ b/src/dev/x86/pc.hh
@@ -62,12 +62,6 @@ class Pc : public Platform
Pc(const Params *p);
/**
- * Return the interrupting frequency to AlphaAccess
- * @return frequency of RTC interrupts
- */
- virtual Tick intrFrequency();
-
- /**
* Cause the cpu to post a serial interrupt to the CPU.
*/
virtual void postConsoleInt();