summaryrefslogtreecommitdiff
path: root/src/arch/alpha
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/alpha')
-rw-r--r--src/arch/alpha/ev5.cc20
-rw-r--r--src/arch/alpha/system.cc16
-rw-r--r--src/arch/alpha/utility.hh1
3 files changed, 16 insertions, 21 deletions
diff --git a/src/arch/alpha/ev5.cc b/src/arch/alpha/ev5.cc
index 4e2420dc9..3613d305c 100644
--- a/src/arch/alpha/ev5.cc
+++ b/src/arch/alpha/ev5.cc
@@ -63,26 +63,6 @@ getDTBPtr(T *tc)
////////////////////////////////////////////////////////////////////////
//
-// Machine dependent functions
-//
-void
-initCPU(ThreadContext *tc, int cpuId)
-{
- initIPRs(tc, cpuId);
-
- tc->setIntReg(16, cpuId);
- tc->setIntReg(0, cpuId);
-
- Addr base = tc->readMiscRegNoEffect(IPR_PAL_BASE);
- Addr offset = ResetFault().vect();
-
- tc->pcState(base + offset);
-
- tc->activate();
-}
-
-////////////////////////////////////////////////////////////////////////
-//
//
//
void
diff --git a/src/arch/alpha/system.cc b/src/arch/alpha/system.cc
index ca4551f60..f491b1159 100644
--- a/src/arch/alpha/system.cc
+++ b/src/arch/alpha/system.cc
@@ -34,6 +34,7 @@
#include <sys/signal.h>
#include "arch/alpha/ev5.hh"
+#include "arch/alpha/faults.hh"
#include "arch/vtophys.hh"
#include "base/loader/object_file.hh"
#include "base/loader/symtab.hh"
@@ -108,6 +109,21 @@ AlphaSystem::initState()
// Call the initialisation of the super class
System::initState();
+ for (auto *tc: threadContexts) {
+ int cpuId = tc->contextId();
+ initIPRs(tc, cpuId);
+
+ tc->setIntReg(16, cpuId);
+ tc->setIntReg(0, cpuId);
+
+ Addr base = tc->readMiscRegNoEffect(IPR_PAL_BASE);
+ Addr offset = ResetFault().vect();
+
+ tc->pcState(base + offset);
+
+ tc->activate();
+ }
+
// Load program sections into memory
pal->buildImage().mask(loadAddrMask).write(physProxy);
console->buildImage().mask(loadAddrMask).write(physProxy);
diff --git a/src/arch/alpha/utility.hh b/src/arch/alpha/utility.hh
index a0f70a331..ae63f1b38 100644
--- a/src/arch/alpha/utility.hh
+++ b/src/arch/alpha/utility.hh
@@ -87,7 +87,6 @@ RoundPage(Addr addr)
{ return (addr + PageBytes - 1) & ~(PageBytes - 1); }
void initIPRs(ThreadContext *tc, int cpuId);
-void initCPU(ThreadContext *tc, int cpuId);
void copyRegs(ThreadContext *src, ThreadContext *dest);