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

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

revision 20 by dpavlin, Mon Oct 8 16:19:23 2007 UTC revision 22 by dpavlin, Mon Oct 8 16:19:37 2007 UTC
# Line 28  Line 28 
28   *  SUCH DAMAGE.   *  SUCH DAMAGE.
29   *   *
30   *   *
31   *  $Id: memory.h,v 1.44 2005/11/22 16:26:38 debug Exp $   *  $Id: memory.h,v 1.47 2006/01/01 13:17:18 debug Exp $
32   *   *
33   *  Memory controller related functions.   *  Memory controller related functions.
34   */   */
# Line 42  Line 42 
42  #define DEFAULT_RAM_IN_MB               32  #define DEFAULT_RAM_IN_MB               32
43  #define MAX_DEVICES                     26  #define MAX_DEVICES                     26
44    
 #define DEVICE_STATE_TYPE_INT           1  
 #define DEVICE_STATE_TYPE_UINT64_T      2  
   
45  struct cpu;  struct cpu;
46  struct translation_page_entry;  struct translation_page_entry;
47    
# Line 70  struct memory { Line 67  struct memory {
67          void            *dev_extra[MAX_DEVICES];          void            *dev_extra[MAX_DEVICES];
68          int             (*dev_f[MAX_DEVICES])(struct cpu *,struct memory *,          int             (*dev_f[MAX_DEVICES])(struct cpu *,struct memory *,
69                              uint64_t,unsigned char *,size_t,int,void *);                              uint64_t,unsigned char *,size_t,int,void *);
         int             (*dev_f_state[MAX_DEVICES])(struct cpu *,  
                             struct memory *, void *extra, int wf, int nr,  
                             int *type, char **namep, void **data, size_t *len);  
70          unsigned char   *dev_dyntrans_data[MAX_DEVICES];          unsigned char   *dev_dyntrans_data[MAX_DEVICES];
71    
72          uint64_t        dev_dyntrans_write_low[MAX_DEVICES];          uint64_t        dev_dyntrans_write_low[MAX_DEVICES];
# Line 105  struct memory { Line 99  struct memory {
99          struct translation_page_entry **translation_page_entry_array;          struct translation_page_entry **translation_page_entry_array;
100    
101          unsigned char   *quick_jump_host_address[MAX_QUICK_JUMPS];          unsigned char   *quick_jump_host_address[MAX_QUICK_JUMPS];
102          int             quick_jump_page_offset[MAX_QUICK_JUMPS];          size_t          quick_jump_page_offset[MAX_QUICK_JUMPS];
103          int             n_quick_jumps;          int             n_quick_jumps;
104          int             quick_jumps_index;          int             quick_jumps_index;
105  };  };
# Line 186  int userland_memory_rw(struct cpu *cpu, Line 180  int userland_memory_rw(struct cpu *cpu,
180  void memory_device_dyntrans_access(struct cpu *, struct memory *mem,  void memory_device_dyntrans_access(struct cpu *, struct memory *mem,
181          void *extra, uint64_t *low, uint64_t *high);          void *extra, uint64_t *low, uint64_t *high);
182    
183  void memory_device_register_statefunction(  #define DEVICE_ACCESS(x)        int dev_ ## x ## _access(struct cpu *cpu, \
184          struct memory *mem, void *extra,          struct memory *mem, uint64_t relative_addr, unsigned char *data,  \
185          int (*dev_f_state)(struct cpu *,          size_t len, int writeflag, void *extra)
             struct memory *, void *extra, int wf, int nr,  
             int *type, char **namep, void **data, size_t *len));  
186    
187  void memory_device_register(struct memory *mem, const char *,  void memory_device_register(struct memory *mem, const char *,
188          uint64_t baseaddr, uint64_t len, int (*f)(struct cpu *,          uint64_t baseaddr, uint64_t len, int (*f)(struct cpu *,

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

  ViewVC Help
Powered by ViewVC 1.1.26