diff options
author | Igor Kovalenko <igor.v.kovalenko@gmail.com> | 2009-08-03 23:15:02 +0400 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2009-08-04 20:22:10 +0000 |
commit | 8194f35a0c71a3bf169459bf715bea53b7bbc904 (patch) | |
tree | 46db943bff1e3129cbf61e3065dd27530f34022d /target-sparc/helper.c | |
parent | a16aae0ca427f117c51d80e5d72e18b141595496 (diff) | |
download | qemu-8194f35a0c71a3bf169459bf715bea53b7bbc904.tar.gz qemu-8194f35a0c71a3bf169459bf715bea53b7bbc904.tar.bz2 qemu-8194f35a0c71a3bf169459bf715bea53b7bbc904.zip |
Sparc64: replace tsptr with helper routine
tl and tsptr of members sparc64 cpu state must be changed
simultaneously to keep trap state window in sync with current
trap level. Currently translation of store to tl does not change
tsptr, which leads to corrupt trap state on corresponding
trap level.
This patch removes tsptr from sparc64 cpu state and replaces
all uses with call to helper routine.
Changes v0->v1:
- reimplemented helper routine with tcg generator
- on cpu reset trap type and pstate are populated with power-on reset
values, including tl=maxtl
Signed-off-by: igor.v.kovalenko@gmail.com
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'target-sparc/helper.c')
-rw-r--r-- | target-sparc/helper.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/target-sparc/helper.c b/target-sparc/helper.c index 70343e3052..31b61bc42f 100644 --- a/target-sparc/helper.c +++ b/target-sparc/helper.c @@ -699,9 +699,10 @@ void cpu_reset(CPUSPARCState *env) env->psrps = 1; CC_OP = CC_OP_FLAGS; #ifdef TARGET_SPARC64 - env->pstate = PS_PRIV; + env->pstate = PS_PRIV|PS_RED|PS_PEF|PS_AG; env->hpstate = HS_PRIV; - env->tsptr = &env->ts[env->tl & MAXTL_MASK]; + env->tl = env->maxtl; + cpu_tsptr(env)->tt = TT_POWER_ON_RESET; env->lsu = 0; #else env->mmuregs[0] &= ~(MMU_E | MMU_NF); |