/[gxemul]/trunk/src/cpus/memory_arm.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_arm.c

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

revision 27 by dpavlin, Mon Oct 8 16:20:10 2007 UTC revision 28 by dpavlin, Mon Oct 8 16:20:26 2007 UTC
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *   *
27   *   *
28   *  $Id: memory_arm.c,v 1.35 2006/06/24 21:47:23 debug Exp $   *  $Id: memory_arm.c,v 1.36 2006/07/14 16:33:28 debug Exp $
29   *   *
30   *   *
31   *  TODO/NOTE:  The B and/or C bits could also cause the return value to   *  TODO/NOTE:  The B and/or C bits could also cause the return value to
# Line 136  int arm_translate_v2p_mmu(struct cpu *cp Line 136  int arm_translate_v2p_mmu(struct cpu *cp
136    
137          if (cpu->cd.arm.translation_table == NULL ||          if (cpu->cd.arm.translation_table == NULL ||
138              cpu->cd.arm.ttb != cpu->cd.arm.last_ttb) {              cpu->cd.arm.ttb != cpu->cd.arm.last_ttb) {
                 uint32_t ofs;  
139                  cpu->cd.arm.translation_table = memory_paddr_to_hostaddr(                  cpu->cd.arm.translation_table = memory_paddr_to_hostaddr(
140                      cpu->mem, cpu->cd.arm.ttb & 0x0fffffff, 0);                      cpu->mem, cpu->cd.arm.ttb & 0x0fffffff, 0);
                 if (cpu->cd.arm.translation_table != NULL) {  
                         ofs = cpu->cd.arm.ttb & ((1 << BITS_PER_MEMBLOCK) - 1);  
                         cpu->cd.arm.translation_table += ofs;  
                 }  
141                  cpu->cd.arm.last_ttb = cpu->cd.arm.ttb;                  cpu->cd.arm.last_ttb = cpu->cd.arm.ttb;
142          }          }
143    
# Line 180  int arm_translate_v2p_mmu(struct cpu *cp Line 175  int arm_translate_v2p_mmu(struct cpu *cp
175                          printf("arm memory blah blah adfh asfg asdgasdg\n");                          printf("arm memory blah blah adfh asfg asdgasdg\n");
176                          exit(1);                          exit(1);
177                  }                  }
178                  d2 = *(uint32_t *)(q + (addr & ((1 << BITS_PER_MEMBLOCK) - 1)));                  d2 = *(uint32_t *)(q);
179  #ifdef HOST_LITTLE_ENDIAN  #ifdef HOST_LITTLE_ENDIAN
180                  if (cpu->byte_order == EMUL_BIG_ENDIAN)                  if (cpu->byte_order == EMUL_BIG_ENDIAN)
181  #else  #else

Legend:
Removed from v.27  
changed lines
  Added in v.28

  ViewVC Help
Powered by ViewVC 1.1.26