summaryrefslogtreecommitdiff
path: root/src/arch/alpha/system.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/alpha/system.cc')
-rw-r--r--src/arch/alpha/system.cc16
1 files changed, 16 insertions, 0 deletions
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);