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

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

revision 14 by dpavlin, Mon Oct 8 16:18:51 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_sparc.h,v 1.9 2005/08/28 20:16:24 debug Exp $   *  $Id: cpu_sparc.h,v 1.15 2005/11/16 21:15:19 debug Exp $
32   */   */
33    
34  #include "misc.h"  #include "misc.h"
# Line 53  struct sparc_instr_call { Line 53  struct sparc_instr_call {
53    
54  /*  Translation cache struct for each physical page:  */  /*  Translation cache struct for each physical page:  */
55  struct sparc_tc_physpage {  struct sparc_tc_physpage {
56            struct sparc_instr_call ics[SPARC_IC_ENTRIES_PER_PAGE + 1];
57          uint32_t        next_ofs;       /*  or 0 for end of chain  */          uint32_t        next_ofs;       /*  or 0 for end of chain  */
         uint64_t        physaddr;  
58          int             flags;          int             flags;
59          struct sparc_instr_call ics[SPARC_IC_ENTRIES_PER_PAGE + 1];          uint64_t        physaddr;
60  };  };
61    
62  #define SPARC_N_VPH_ENTRIES             1048576  #define SPARC_N_VPH_ENTRIES             1048576
63    
64  #define SPARC_MAX_VPH_TLB_ENTRIES               256  #define SPARC_MAX_VPH_TLB_ENTRIES               256
65  struct sparc_vpg_tlb_entry {  struct sparc_vpg_tlb_entry {
66          int             valid;          uint8_t         valid;
67          int             writeflag;          uint8_t         writeflag;
         int64_t         timestamp;  
68          unsigned char   *host_page;          unsigned char   *host_page;
69            int64_t         timestamp;
70          uint64_t        vaddr_page;          uint64_t        vaddr_page;
71          uint64_t        paddr_page;          uint64_t        paddr_page;
72  };  };
# Line 87  struct sparc_cpu { Line 87  struct sparc_cpu {
87          struct sparc_instr_call *cur_ic_page;          struct sparc_instr_call *cur_ic_page;
88          struct sparc_instr_call *next_ic;          struct sparc_instr_call *next_ic;
89    
90            void                    (*combination_check)(struct cpu *,
91                                        struct sparc_instr_call *, int low_addr);
92    
93          /*          /*
94           *  Virtual -> physical -> host address translation:           *  Virtual -> physical -> host address translation:
# Line 101  struct sparc_cpu { Line 103  struct sparc_cpu {
103          unsigned char               *host_store[SPARC_N_VPH_ENTRIES];          unsigned char               *host_store[SPARC_N_VPH_ENTRIES];
104          uint32_t                    phys_addr[SPARC_N_VPH_ENTRIES];          uint32_t                    phys_addr[SPARC_N_VPH_ENTRIES];
105          struct sparc_tc_physpage    *phys_page[SPARC_N_VPH_ENTRIES];          struct sparc_tc_physpage    *phys_page[SPARC_N_VPH_ENTRIES];
106    
107            uint32_t                    phystranslation[SPARC_N_VPH_ENTRIES/32];
108            uint8_t                     vaddr_to_tlbindex[SPARC_N_VPH_ENTRIES];
109  };  };
110    
111    
112  /*  cpu_sparc.c:  */  /*  cpu_sparc.c:  */
113  void sparc_update_translation_table(struct cpu *cpu, uint64_t vaddr_page,  void sparc_update_translation_table(struct cpu *cpu, uint64_t vaddr_page,
114          unsigned char *host_page, int writeflag, uint64_t paddr_page);          unsigned char *host_page, int writeflag, uint64_t paddr_page);
115  void sparc_invalidate_translation_caches_paddr(struct cpu *cpu, uint64_t, int);  void sparc_invalidate_translation_caches(struct cpu *cpu, uint64_t, int);
116  void sparc_invalidate_code_translation(struct cpu *cpu, uint64_t, int);  void sparc_invalidate_code_translation(struct cpu *cpu, uint64_t, int);
117  int sparc_memory_rw(struct cpu *cpu, struct memory *mem, uint64_t vaddr,  int sparc_memory_rw(struct cpu *cpu, struct memory *mem, uint64_t vaddr,
118          unsigned char *data, size_t len, int writeflag, int cache_flags);          unsigned char *data, size_t len, int writeflag, int cache_flags);

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

  ViewVC Help
Powered by ViewVC 1.1.26