Commit b3180cdc0195c14d8f01971010b920ef98b35bc3

Authored by bellard
1 parent 41625033

MMU fix (Blue Swirl)


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1390 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 3 additions and 3 deletions
target-sparc/helper.c
... ... @@ -142,7 +142,7 @@ int get_physical_address (CPUState *env, target_phys_addr_t *physical, int *prot
142 142  
143 143 /* SPARC reference MMU table walk: Context table->L1->L2->PTE */
144 144 /* Context base + context number */
145   - pde_ptr = (env->mmuregs[1] << 4) + (env->mmuregs[2] << 4);
  145 + pde_ptr = (env->mmuregs[1] << 4) + (env->mmuregs[2] << 2);
146 146 pde = ldl_phys(pde_ptr);
147 147  
148 148 /* Ctx pde */
... ... @@ -356,7 +356,7 @@ target_ulong mmu_probe(target_ulong address, int mmulev)
356 356 uint32_t pde;
357 357  
358 358 /* Context base + context number */
359   - pde_ptr = (env->mmuregs[1] << 4) + (env->mmuregs[2] << 4);
  359 + pde_ptr = (env->mmuregs[1] << 4) + (env->mmuregs[2] << 2);
360 360 pde = ldl_phys(pde_ptr);
361 361  
362 362 switch (pde & PTE_ENTRYTYPE_MASK) {
... ... @@ -421,7 +421,7 @@ void dump_mmu(void)
421 421 uint32_t pde;
422 422  
423 423 printf("MMU dump:\n");
424   - pde_ptr = (env->mmuregs[1] << 4) + (env->mmuregs[2] << 4);
  424 + pde_ptr = (env->mmuregs[1] << 4) + (env->mmuregs[2] << 2);
425 425 pde = ldl_phys(pde_ptr);
426 426 printf("Root ptr: " TARGET_FMT_lx ", ctx: %d\n", env->mmuregs[1] << 4, env->mmuregs[2]);
427 427 for (n = 0, va = 0; n < 256; n++, va += 16 * 1024 * 1024) {
... ...