/[qemu]/qemu/target-sparc/helper.c
ViewVC logotype

Diff of /qemu/target-sparc/helper.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.19 by bellard, Sun Oct 30 21:23:38 2005 UTC revision 1.20 by bellard, Fri Nov 11 00:24:58 2005 UTC
# Line 195  int get_physical_address (CPUState *env, Line 195  int get_physical_address (CPUState *env,
195  int cpu_sparc_handle_mmu_fault (CPUState *env, target_ulong address, int rw,  int cpu_sparc_handle_mmu_fault (CPUState *env, target_ulong address, int rw,
196                                int is_user, int is_softmmu)                                int is_user, int is_softmmu)
197  {  {
     target_ulong virt_addr;  
198      target_phys_addr_t paddr;      target_phys_addr_t paddr;
199      unsigned long vaddr;      unsigned long vaddr;
200      int error_code = 0, prot, ret = 0, access_index;      int error_code = 0, prot, ret = 0, access_index;
201    
202      error_code = get_physical_address(env, &paddr, &prot, &access_index, address, rw, is_user);      error_code = get_physical_address(env, &paddr, &prot, &access_index, address, rw, is_user);
203      if (error_code == 0) {      if (error_code == 0) {
204          virt_addr = address & TARGET_PAGE_MASK;          vaddr = address & TARGET_PAGE_MASK;
205          vaddr = virt_addr + ((address & TARGET_PAGE_MASK) & (TARGET_PAGE_SIZE - 1));          paddr &= TARGET_PAGE_MASK;
206    #ifdef DEBUG_MMU
207            printf("Translate at 0x%lx -> 0x%lx, vaddr 0x%lx\n", (long)address, (long)paddr, (long)vaddr);
208    #endif
209          ret = tlb_set_page(env, vaddr, paddr, prot, is_user, is_softmmu);          ret = tlb_set_page(env, vaddr, paddr, prot, is_user, is_softmmu);
210          return ret;          return ret;
211      }      }

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26