summaryrefslogtreecommitdiff
path: root/target-sparc/helper.c
diff options
context:
space:
mode:
authorIgor V. Kovalenko <igor.v.kovalenko@gmail.com>2010-05-22 14:52:24 +0400
committerBlue Swirl <blauwirbel@gmail.com>2010-05-22 12:48:52 +0000
commit2aae2b8e0abd58e76d616bcbe93c6966d06d0188 (patch)
tree8ecbfbb50171c80373d2aad69bd939cc0897ac3c /target-sparc/helper.c
parentb8e9fc0625c49404d63b4391f6dc5cf27be8b45b (diff)
downloadqemu-2aae2b8e0abd58e76d616bcbe93c6966d06d0188.tar.gz
sparc64: fix pstate privilege bits
- refactor code to handle hpstate only if available for current cpu - conditionally set hypervisor bit in hpstate register - reorder softmmu indices so user accessable ones go first, translation context macros supervisor() and hypervisor() adjusted as well - disable sparcv8 registers for TARGET_SPARC64 - fix cpu_mmu_index to use sparcv9 bits only Signed-off-by: Igor V. Kovalenko <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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/target-sparc/helper.c b/target-sparc/helper.c
index 4a494de357..538795f4f1 100644
--- a/target-sparc/helper.c
+++ b/target-sparc/helper.c
@@ -746,12 +746,12 @@ void cpu_reset(CPUSPARCState *env)
#else
#if !defined(TARGET_SPARC64)
env->psret = 0;
-#endif
env->psrs = 1;
env->psrps = 1;
+#endif
#ifdef TARGET_SPARC64
env->pstate = PS_PRIV|PS_RED|PS_PEF|PS_AG;
- env->hpstate = HS_PRIV;
+ env->hpstate = cpu_has_hypervisor(env) ? HS_PRIV : 0;
env->tl = env->maxtl;
cpu_tsptr(env)->tt = TT_POWER_ON_RESET;
env->lsu = 0;