aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--target-mips/helper.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/target-mips/helper.c b/target-mips/helper.c
index 6cdcd7f1dc..e7d7887524 100644
--- a/target-mips/helper.c
+++ b/target-mips/helper.c
@@ -133,7 +133,7 @@ static int get_physical_address (CPUState *env, target_ulong *physical,
#if defined(TARGET_MIPS64)
} else if (address < 0x4000000000000000ULL) {
/* xuseg */
- if (UX && address < (0x3FFFFFFFFFFFFFFFULL & env->SEGMask)) {
+ if (UX && address <= (0x3FFFFFFFFFFFFFFFULL & env->SEGMask)) {
ret = env->tlb->map_address(env, physical, prot, address, rw, access_type);
} else {
ret = TLBRET_BADADDR;
@@ -141,7 +141,7 @@ static int get_physical_address (CPUState *env, target_ulong *physical,
} else if (address < 0x8000000000000000ULL) {
/* xsseg */
if ((supervisor_mode || kernel_mode) &&
- SX && address < (0x7FFFFFFFFFFFFFFFULL & env->SEGMask)) {
+ SX && address <= (0x7FFFFFFFFFFFFFFFULL & env->SEGMask)) {
ret = env->tlb->map_address(env, physical, prot, address, rw, access_type);
} else {
ret = TLBRET_BADADDR;
@@ -150,7 +150,7 @@ static int get_physical_address (CPUState *env, target_ulong *physical,
/* xkphys */
/* XXX: Assumes PABITS = 36 (correct for MIPS64R1) */
if (kernel_mode && KX &&
- (address & 0x07FFFFFFFFFFFFFFULL) < 0x0000000FFFFFFFFFULL) {
+ (address & 0x07FFFFFFFFFFFFFFULL) <= 0x0000000FFFFFFFFFULL) {
*physical = address & 0x0000000FFFFFFFFFULL;
*prot = PAGE_READ | PAGE_WRITE;
} else {
@@ -159,7 +159,7 @@ static int get_physical_address (CPUState *env, target_ulong *physical,
} else if (address < 0xFFFFFFFF80000000ULL) {
/* xkseg */
if (kernel_mode && KX &&
- address < (0xFFFFFFFF7FFFFFFFULL & env->SEGMask)) {
+ address <= (0xFFFFFFFF7FFFFFFFULL & env->SEGMask)) {
ret = env->tlb->map_address(env, physical, prot, address, rw, access_type);
} else {
ret = TLBRET_BADADDR;