/[gxemul]/trunk/src/cpus/memory_sh.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/src/cpus/memory_sh.c

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

revision 37 by dpavlin, Mon Oct 8 16:21:34 2007 UTC revision 38 by dpavlin, Mon Oct 8 16:21:53 2007 UTC
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *   *
27   *   *
28   *  $Id: memory_sh.c,v 1.16 2007/03/08 10:02:32 debug Exp $   *  $Id: memory_sh.c,v 1.18 2007/04/13 07:06:31 debug Exp $
29   */   */
30    
31  #include <stdio.h>  #include <stdio.h>
# Line 113  static int translate_via_mmu(struct cpu Line 113  static int translate_via_mmu(struct cpu
113                  mask = 0xfff00000;                  mask = 0xfff00000;
114    
115                  v = lo & SH4_PTEL_V;                  v = lo & SH4_PTEL_V;
116                    if (!v)
117                            continue;
118    
119                  switch (lo & SH4_PTEL_SZ_MASK) {                  switch (lo & SH4_PTEL_SZ_MASK) {
120                  case SH4_PTEL_SZ_1K:  mask = 0xfffffc00; break;                  case SH4_PTEL_SZ_1K:  mask = 0xfffffc00; break;
# Line 121  static int translate_via_mmu(struct cpu Line 123  static int translate_via_mmu(struct cpu
123                  /*  case SH4_PTEL_SZ_1M:  mask = 0xfff00000; break;  */                  /*  case SH4_PTEL_SZ_1M:  mask = 0xfff00000; break;  */
124                  }                  }
125    
126                  if (!v || (hi & mask) != (vaddr & mask))                  if ((hi & mask) != (vaddr & mask))
127                          continue;                          continue;
128    
129                  sh = lo & SH4_PTEL_SH;                  sh = lo & SH4_PTEL_SH;
# Line 306  int sh_translate_v2p(struct cpu *cpu, ui Line 308  int sh_translate_v2p(struct cpu *cpu, ui
308          /*  TODO  */          /*  TODO  */
309          fatal("Unimplemented SH vaddr 0x%08"PRIx32"\n", (uint32_t)vaddr);          fatal("Unimplemented SH vaddr 0x%08"PRIx32"\n", (uint32_t)vaddr);
310          exit(1);          exit(1);
311    
312            return 0;
313  }  }
314    

Legend:
Removed from v.37  
changed lines
  Added in v.38

  ViewVC Help
Powered by ViewVC 1.1.26