diff options
Diffstat (limited to 'src/arch/alpha/process.cc')
-rw-r--r-- | src/arch/alpha/process.cc | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/src/arch/alpha/process.cc b/src/arch/alpha/process.cc index 1c83f64b2..431ef86c0 100644 --- a/src/arch/alpha/process.cc +++ b/src/arch/alpha/process.cc @@ -173,19 +173,35 @@ AlphaLiveProcess::argsInit(int intSize, int pageSize) } void -AlphaLiveProcess::startup() +AlphaLiveProcess::setupASNReg() { ThreadContext *tc = system->getThreadContext(contextIds[0]); tc->setMiscRegNoEffect(IPR_DTB_ASN, M5_pid << 57); +} - if (checkpointRestored) { - return; - } - Process::startup(); +void +AlphaLiveProcess::loadState(Checkpoint *cp) +{ + LiveProcess::loadState(cp); + // need to set up ASN after unserialization since M5_pid value may + // come from checkpoint + setupASNReg(); +} + + +void +AlphaLiveProcess::initState() +{ + // need to set up ASN before further initialization since init + // will involve writing to virtual memory addresses + setupASNReg(); + + LiveProcess::initState(); argsInit(MachineBytes, VMPageSize); + ThreadContext *tc = system->getThreadContext(contextIds[0]); tc->setIntReg(GlobalPointerReg, objFile->globalPointer()); //Operate in user mode tc->setMiscRegNoEffect(IPR_ICM, 0x18); |