/[gxemul]/trunk/src/include/cpu_m68k.h
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/include/cpu_m68k.h

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

revision 12 by dpavlin, Mon Oct 8 16:18:38 2007 UTC revision 20 by dpavlin, Mon Oct 8 16:19:23 2007 UTC
# Line 28  Line 28 
28   *  SUCH DAMAGE.   *  SUCH DAMAGE.
29   *   *
30   *   *
31   *  $Id: cpu_m68k.h,v 1.2 2005/08/14 23:44:23 debug Exp $   *  $Id: cpu_m68k.h,v 1.9 2005/11/16 21:15:19 debug Exp $
32   */   */
33    
34  #include "misc.h"  #include "misc.h"
# Line 50  struct cpu_family; Line 50  struct cpu_family;
50    
51  struct m68k_instr_call {  struct m68k_instr_call {
52          void    (*f)(struct cpu *, struct m68k_instr_call *);          void    (*f)(struct cpu *, struct m68k_instr_call *);
53            int     len;
54          size_t  arg[M68K_N_IC_ARGS];          size_t  arg[M68K_N_IC_ARGS];
55  };  };
56    
57  /*  Translation cache struct for each physical page:  */  /*  Translation cache struct for each physical page:  */
58  struct m68k_tc_physpage {  struct m68k_tc_physpage {
59            struct m68k_instr_call ics[M68K_IC_ENTRIES_PER_PAGE + 1];
60          uint32_t        next_ofs;       /*  or 0 for end of chain  */          uint32_t        next_ofs;       /*  or 0 for end of chain  */
61          uint32_t        physaddr;          uint32_t        physaddr;
62          int             flags;          int             flags;
         struct m68k_instr_call ics[M68K_IC_ENTRIES_PER_PAGE + 1];  
63  };  };
64    
65    
# Line 66  struct m68k_tc_physpage { Line 67  struct m68k_tc_physpage {
67    
68  #define M68K_MAX_VPH_TLB_ENTRIES                256  #define M68K_MAX_VPH_TLB_ENTRIES                256
69  struct m68k_vpg_tlb_entry {  struct m68k_vpg_tlb_entry {
70          int             valid;          uint8_t         valid;
71          int             writeflag;          uint8_t         writeflag;
         int64_t         timestamp;  
         unsigned char   *host_page;  
72          uint32_t        vaddr_page;          uint32_t        vaddr_page;
73          uint32_t        paddr_page;          uint32_t        paddr_page;
74            unsigned char   *host_page;
75  };  };
76    
77    
# Line 95  struct m68k_cpu { Line 95  struct m68k_cpu {
95          struct m68k_instr_call  *cur_ic_page;          struct m68k_instr_call  *cur_ic_page;
96          struct m68k_instr_call  *next_ic;          struct m68k_instr_call  *next_ic;
97    
98            void                    (*combination_check)(struct cpu *,
99                                        struct m68k_instr_call *, int low_addr);
100    
101          /*          /*
102           *  Virtual -> physical -> host address translation:           *  Virtual -> physical -> host address translation:
# Line 109  struct m68k_cpu { Line 111  struct m68k_cpu {
111          unsigned char                   *host_store[M68K_N_VPH_ENTRIES];          unsigned char                   *host_store[M68K_N_VPH_ENTRIES];
112          uint32_t                        phys_addr[M68K_N_VPH_ENTRIES];          uint32_t                        phys_addr[M68K_N_VPH_ENTRIES];
113          struct m68k_tc_physpage         *phys_page[M68K_N_VPH_ENTRIES];          struct m68k_tc_physpage         *phys_page[M68K_N_VPH_ENTRIES];
114    
115            uint32_t                        phystranslation[M68K_N_VPH_ENTRIES/32];
116            int16_t                         vaddr_to_tlbindex[M68K_N_VPH_ENTRIES];
117  };  };
118    
119    
120  /*  cpu_m68k.c:  */  /*  cpu_m68k.c:  */
121  void m68k_update_translation_table(struct cpu *cpu, uint64_t vaddr_page,  void m68k_update_translation_table(struct cpu *cpu, uint64_t vaddr_page,
122          unsigned char *host_page, int writeflag, uint64_t paddr_page);          unsigned char *host_page, int writeflag, uint64_t paddr_page);
123  void m68k_invalidate_translation_caches_paddr(struct cpu *cpu, uint64_t paddr);  void m68k_invalidate_translation_caches(struct cpu *cpu, uint64_t, int);
124  void m68k_invalidate_code_translation_caches(struct cpu *cpu);  void m68k_invalidate_code_translation(struct cpu *cpu, uint64_t, int);
125  int m68k_memory_rw(struct cpu *cpu, struct memory *mem, uint64_t vaddr,  int m68k_memory_rw(struct cpu *cpu, struct memory *mem, uint64_t vaddr,
126          unsigned char *data, size_t len, int writeflag, int cache_flags);          unsigned char *data, size_t len, int writeflag, int cache_flags);
127  int m68k_cpu_family_init(struct cpu_family *);  int m68k_cpu_family_init(struct cpu_family *);

Legend:
Removed from v.12  
changed lines
  Added in v.20

  ViewVC Help
Powered by ViewVC 1.1.26