diff options
author | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-12-25 03:13:56 +0000 |
---|---|---|
committer | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-12-25 03:13:56 +0000 |
commit | 6d35524c40a7c884462b852ae697f16f7c90ee9e (patch) | |
tree | abed8cba63ecd2c560705afbb1c65579eb86d0d4 /target-mips/helper.c | |
parent | cbd669dae9b41b1ebb92fbdf1f914fc039528005 (diff) | |
download | hqemu-6d35524c40a7c884462b852ae697f16f7c90ee9e.zip hqemu-6d35524c40a7c884462b852ae697f16f7c90ee9e.tar.gz |
Improved PABITS handling, and config register fixes.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3855 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-mips/helper.c')
-rw-r--r-- | target-mips/helper.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/target-mips/helper.c b/target-mips/helper.c index e7d7887..3151e0a 100644 --- a/target-mips/helper.c +++ b/target-mips/helper.c @@ -148,10 +148,9 @@ static int get_physical_address (CPUState *env, target_ulong *physical, } } else if (address < 0xC000000000000000ULL) { /* xkphys */ - /* XXX: Assumes PABITS = 36 (correct for MIPS64R1) */ if (kernel_mode && KX && - (address & 0x07FFFFFFFFFFFFFFULL) <= 0x0000000FFFFFFFFFULL) { - *physical = address & 0x0000000FFFFFFFFFULL; + (address & 0x07FFFFFFFFFFFFFFULL) <= env->PAMask) { + *physical = address & env->PAMask; *prot = PAGE_READ | PAGE_WRITE; } else { ret = TLBRET_BADADDR; |