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

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

revision 19 by dpavlin, Mon Oct 8 16:19:11 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_x86.h,v 1.35 2005/10/27 14:01:15 debug Exp $   *  $Id: cpu_x86.h,v 1.39 2005/11/16 21:15:19 debug Exp $
32   */   */
33    
34  #include "misc.h"  #include "misc.h"
# Line 103  struct x86_model { Line 103  struct x86_model {
103    
104  struct x86_instr_call {  struct x86_instr_call {
105          void    (*f)(struct cpu *, struct x86_instr_call *);          void    (*f)(struct cpu *, struct x86_instr_call *);
106            int     len;
107          size_t  arg[X86_N_IC_ARGS];          size_t  arg[X86_N_IC_ARGS];
108  };  };
109    
# Line 118  struct x86_tc_physpage { Line 119  struct x86_tc_physpage {
119    
120  #define X86_MAX_VPH_TLB_ENTRIES         256  #define X86_MAX_VPH_TLB_ENTRIES         256
121  struct x86_vpg_tlb_entry {  struct x86_vpg_tlb_entry {
122          int             valid;          uint8_t         valid;
123          int             writeflag;          uint8_t         writeflag;
         int64_t         timestamp;  
124          unsigned char   *host_page;          unsigned char   *host_page;
125            int64_t         timestamp;
126          uint64_t        vaddr_page;          uint64_t        vaddr_page;
127          uint64_t        paddr_page;          uint64_t        paddr_page;
128  };  };
# Line 190  struct x86_cpu { Line 191  struct x86_cpu {
191          struct x86_instr_call   *cur_ic_page;          struct x86_instr_call   *cur_ic_page;
192          struct x86_instr_call   *next_ic;          struct x86_instr_call   *next_ic;
193    
194            void                    (*combination_check)(struct cpu *,
195                                        struct x86_instr_call *, int low_addr);
196    
197          /*          /*
198           *  Virtual -> physical -> host address translation:           *  Virtual -> physical -> host address translation:
# Line 206  struct x86_cpu { Line 209  struct x86_cpu {
209          struct x86_tc_physpage          *phys_page[X86_N_VPH_ENTRIES];          struct x86_tc_physpage          *phys_page[X86_N_VPH_ENTRIES];
210    
211          uint32_t                        phystranslation[X86_N_VPH_ENTRIES/32];          uint32_t                        phystranslation[X86_N_VPH_ENTRIES/32];
212            uint8_t                         vaddr_to_tlbindex[X86_N_VPH_ENTRIES];
213  };  };
214    
215    
# Line 329  void reload_segment_descriptor(struct cp Line 333  void reload_segment_descriptor(struct cp
333  int x86_interrupt(struct cpu *cpu, int nr, int errcode);  int x86_interrupt(struct cpu *cpu, int nr, int errcode);
334  int x86_memory_rw(struct cpu *cpu, struct memory *mem, uint64_t vaddr,  int x86_memory_rw(struct cpu *cpu, struct memory *mem, uint64_t vaddr,
335          unsigned char *data, size_t len, int writeflag, int cache_flags);          unsigned char *data, size_t len, int writeflag, int cache_flags);
336    void x86_update_translation_table(struct cpu *cpu, uint64_t vaddr_page,
337            unsigned char *host_page, int writeflag, uint64_t paddr_page);
338    void x8632_update_translation_table(struct cpu *cpu, uint64_t vaddr_page,
339            unsigned char *host_page, int writeflag, uint64_t paddr_page);
340    void x86_invalidate_translation_caches(struct cpu *cpu, uint64_t, int);
341    void x8632_invalidate_translation_caches(struct cpu *cpu, uint64_t, int);
342    void x86_invalidate_code_translation(struct cpu *cpu, uint64_t, int);
343    void x8632_invalidate_code_translation(struct cpu *cpu, uint64_t, int);
344  int x86_cpu_family_init(struct cpu_family *);  int x86_cpu_family_init(struct cpu_family *);
345    
346    
347  /*  memory_x86.c:  */  /*  memory_x86.c:  */
348  int x86_translate_address(struct cpu *cpu, uint64_t vaddr,  int x86_translate_address(struct cpu *cpu, uint64_t vaddr,
349          uint64_t *return_addr, int flags);          uint64_t *return_addr, int flags);

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

  ViewVC Help
Powered by ViewVC 1.1.26