From: Gabe Black Date: Tue, 14 Nov 2006 06:29:11 +0000 (-0500) Subject: Make sure a POR doesn't clobber the value of the hpstate. X-Git-Tag: m5_2.0_beta3~319^2~1 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c2ceaa887e07a219b16423d8f9c20624785ee4a1;p=gem5.git Make sure a POR doesn't clobber the value of the hpstate. --HG-- extra : convert_revision : 4504f08fd94792819bd4419bbd2e0ebd1d7f29e9 --- diff --git a/src/arch/sparc/faults.cc b/src/arch/sparc/faults.cc index 4cf411d3b..3ec41ba61 100644 --- a/src/arch/sparc/faults.cc +++ b/src/arch/sparc/faults.cc @@ -593,7 +593,16 @@ void PowerOnReset::invoke(ThreadContext * tc) tc->setMiscReg(MISCREG_PSTATE, 1 << 4); //Turn on red and hpriv, set everything else to 0 - tc->setMiscReg(MISCREG_HPSTATE, (1 << 5) | (1 << 2)); + MiscReg HPSTATE = tc->readMiscReg(MISCREG_HPSTATE); + //HPSTATE.red = 1 + HPSTATE |= (1 << 5); + //HPSTATE.hpriv = 1 + HPSTATE |= (1 << 2); + //HPSTATE.ibe = 0 + HPSTATE &= ~(1 << 10); + //HPSTATE.tlz = 0 + HPSTATE &= ~(1 << 0); + tc->setMiscReg(MISCREG_HPSTATE, HPSTATE); //The tick register is unreadable by nonprivileged software tc->setMiscReg(MISCREG_TICK, 1ULL << 63);