summaryrefslogtreecommitdiff
path: root/src/dev
diff options
context:
space:
mode:
Diffstat (limited to 'src/dev')
-rw-r--r--src/dev/alpha/backdoor.cc7
-rw-r--r--src/dev/alpha/tsunami.cc22
-rw-r--r--src/dev/alpha/tsunami.hh8
-rw-r--r--src/dev/arm/realview.cc14
-rw-r--r--src/dev/arm/realview.hh6
-rwxr-xr-xsrc/dev/mips/malta.cc11
-rwxr-xr-xsrc/dev/mips/malta.hh6
-rw-r--r--src/dev/platform.hh1
-rw-r--r--src/dev/sparc/t1000.cc14
-rw-r--r--src/dev/sparc/t1000.hh6
-rw-r--r--src/dev/x86/pc.cc11
-rw-r--r--src/dev/x86/pc.hh6
12 files changed, 23 insertions, 89 deletions
diff --git a/src/dev/alpha/backdoor.cc b/src/dev/alpha/backdoor.cc
index 4d9d046de..1c5bb5f54 100644
--- a/src/dev/alpha/backdoor.cc
+++ b/src/dev/alpha/backdoor.cc
@@ -50,6 +50,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"
@@ -99,7 +102,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();
#endif
}
diff --git a/src/dev/alpha/tsunami.cc b/src/dev/alpha/tsunami.cc
index 16e2bfb28..65154c7d8 100644
--- a/src/dev/alpha/tsunami.cc
+++ b/src/dev/alpha/tsunami.cc
@@ -36,6 +36,12 @@
#include <string>
#include <vector>
+#include "config/full_system.hh"
+
+#if FULL_SYSTEM //XXX AlphaSystem doesn't build in SE mode yet.
+#include "arch/alpha/system.hh"
+#endif
+
#include "config/the_isa.hh"
#include "cpu/intr_control.hh"
#include "dev/alpha/tsunami.hh"
@@ -43,7 +49,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,19 +57,18 @@ using namespace TheISA;
Tsunami::Tsunami(const Params *p)
: Platform(p), system(p->system)
{
-#if FULL_SYSTEM //XXX No platform pointer in SE mode.
- // set the back pointer from the system to myself
- system->platform = this;
-#endif
-
for (int i = 0; i < Tsunami::Max_CPUs; i++)
intr_sum_type[i] = 0;
}
-Tick
-Tsunami::intrFrequency()
+void
+Tsunami::init()
{
- return io->frequency();
+#if FULL_SYSTEM //XXX AlphaSystem doesn't build in SE mode yet.
+ AlphaSystem *alphaSystem = dynamic_cast<AlphaSystem *>(system);
+ assert(alphaSystem);
+ alphaSystem->setIntrFreq(io->frequency());
+#endif
}
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.cc b/src/dev/arm/realview.cc
index ed6365efc..b33624cc6 100644
--- a/src/dev/arm/realview.cc
+++ b/src/dev/arm/realview.cc
@@ -60,19 +60,7 @@ using namespace TheISA;
RealView::RealView(const Params *p)
: Platform(p), system(p->system)
-{
-#if FULL_SYSTEM //XXX No platform pointer on the system object in SE mode.
- // set the back pointer from the system to myself
- system->platform = this;
-#endif
-}
-
-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/mips/malta.cc b/src/dev/mips/malta.cc
index df949c2cf..277633c6b 100755
--- a/src/dev/mips/malta.cc
+++ b/src/dev/mips/malta.cc
@@ -54,21 +54,10 @@ using namespace TheISA;
Malta::Malta(const Params *p)
: Platform(p), system(p->system)
{
-#if FULL_SYSTEM //XXX No platform pointer on the system object in SE mode.
- // set the back pointer from the system to myself
- system->platform = this;
-#endif
-
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/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/t1000.cc b/src/dev/sparc/t1000.cc
index 2c3d3c071..12f43ab23 100644
--- a/src/dev/sparc/t1000.cc
+++ b/src/dev/sparc/t1000.cc
@@ -48,19 +48,7 @@ using namespace TheISA;
T1000::T1000(const Params *p)
: Platform(p), system(p->system)
-{
-#if FULL_SYSTEM //XXX No platform pointer on system objects in SE mode.
- // set the back pointer from the system to myself
- system->platform = this;
-#endif
-}
-
-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/pc.cc b/src/dev/x86/pc.cc
index ec2bb209c..dd8e34d9e 100644
--- a/src/dev/x86/pc.cc
+++ b/src/dev/x86/pc.cc
@@ -55,10 +55,6 @@ Pc::Pc(const Params *p)
: Platform(p), system(p->system)
{
southBridge = NULL;
- // set the back pointer from the system to myself
-#if FULL_SYSTEM //XXX No platform pointer in SE mode.
- system->platform = this;
-#endif
}
void
@@ -119,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();