summaryrefslogtreecommitdiff
path: root/src/dev/alpha
diff options
context:
space:
mode:
Diffstat (limited to 'src/dev/alpha')
-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
5 files changed, 19 insertions, 16 deletions
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();