Commit 4ad06a29b2460d4f2474f82dad3cb53467f14eb3
1 parent
e58143b3
soft mmu fix (aka debian random seg fault fix)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@443 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
2 additions
and
2 deletions
softmmu_template.h
@@ -187,7 +187,7 @@ void REGPARM(2) glue(glue(__st, SUFFIX), MMUSUFFIX)(unsigned long addr, | @@ -187,7 +187,7 @@ void REGPARM(2) glue(glue(__st, SUFFIX), MMUSUFFIX)(unsigned long addr, | ||
187 | redo: | 187 | redo: |
188 | tlb_addr = env->tlb_write[is_user][index].address; | 188 | tlb_addr = env->tlb_write[is_user][index].address; |
189 | if ((addr & TARGET_PAGE_MASK) == (tlb_addr & (TARGET_PAGE_MASK | TLB_INVALID_MASK))) { | 189 | if ((addr & TARGET_PAGE_MASK) == (tlb_addr & (TARGET_PAGE_MASK | TLB_INVALID_MASK))) { |
190 | - physaddr = addr + env->tlb_read[is_user][index].addend; | 190 | + physaddr = addr + env->tlb_write[is_user][index].addend; |
191 | if (tlb_addr & ~TARGET_PAGE_MASK) { | 191 | if (tlb_addr & ~TARGET_PAGE_MASK) { |
192 | /* IO access */ | 192 | /* IO access */ |
193 | if ((addr & (DATA_SIZE - 1)) != 0) | 193 | if ((addr & (DATA_SIZE - 1)) != 0) |
@@ -223,7 +223,7 @@ static void glue(glue(slow_st, SUFFIX), MMUSUFFIX)(unsigned long addr, | @@ -223,7 +223,7 @@ static void glue(glue(slow_st, SUFFIX), MMUSUFFIX)(unsigned long addr, | ||
223 | redo: | 223 | redo: |
224 | tlb_addr = env->tlb_write[is_user][index].address; | 224 | tlb_addr = env->tlb_write[is_user][index].address; |
225 | if ((addr & TARGET_PAGE_MASK) == (tlb_addr & (TARGET_PAGE_MASK | TLB_INVALID_MASK))) { | 225 | if ((addr & TARGET_PAGE_MASK) == (tlb_addr & (TARGET_PAGE_MASK | TLB_INVALID_MASK))) { |
226 | - physaddr = addr + env->tlb_read[is_user][index].addend; | 226 | + physaddr = addr + env->tlb_write[is_user][index].addend; |
227 | if (tlb_addr & ~TARGET_PAGE_MASK) { | 227 | if (tlb_addr & ~TARGET_PAGE_MASK) { |
228 | /* IO access */ | 228 | /* IO access */ |
229 | if ((addr & (DATA_SIZE - 1)) != 0) | 229 | if ((addr & (DATA_SIZE - 1)) != 0) |