/[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 33 by dpavlin, Mon Oct 8 16:20:58 2007 UTC revision 34 by dpavlin, Mon Oct 8 16:21:17 2007 UTC
# Line 1  Line 1 
1  /*  /*
2   *  Copyright (C) 2006  Anders Gavare.  All rights reserved.   *  Copyright (C) 2006-2007  Anders Gavare.  All rights reserved.
3   *   *
4   *  Redistribution and use in source and binary forms, with or without   *  Redistribution and use in source and binary forms, with or without
5   *  modification, are permitted provided that the following conditions are met:   *  modification, are permitted provided that the following conditions are met:
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *   *
27   *   *
28   *  $Id: memory_sh.c,v 1.12 2006/10/28 04:00:32 debug Exp $   *  $Id: memory_sh.c,v 1.15 2007/01/29 18:06:37 debug Exp $
29   */   */
30    
31  #include <stdio.h>  #include <stdio.h>
# Line 156  static int translate_via_mmu(struct cpu Line 156  static int translate_via_mmu(struct cpu
156                   */                   */
157                  if (i >= 0) {                  if (i >= 0) {
158                          int r = random() % SH_N_ITLB_ENTRIES;                          int r = random() % SH_N_ITLB_ENTRIES;
159    
160                            /*  NOTE: Make sure that the old mapping for
161                                that itlb entry is invalidated:  */
162                            cpu->invalidate_translation_caches(cpu,
163                                cpu->cd.sh.itlb_hi[r] & ~0xfff, INVALIDATE_VADDR);
164    
165                            cpu->invalidate_code_translation(cpu,
166                                cpu->cd.sh.utlb_lo[i] & ~0xfff, INVALIDATE_PADDR);
167    
168                          cpu->cd.sh.itlb_hi[r] = cpu->cd.sh.utlb_hi[i];                          cpu->cd.sh.itlb_hi[r] = cpu->cd.sh.utlb_hi[i];
169                          cpu->cd.sh.itlb_lo[r] = cpu->cd.sh.utlb_lo[i];                          cpu->cd.sh.itlb_lo[r] = cpu->cd.sh.utlb_lo[i];
170                  }                  }

Legend:
Removed from v.33  
changed lines
  Added in v.34

  ViewVC Help
Powered by ViewVC 1.1.26