/[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 22 by dpavlin, Mon Oct 8 16:19:37 2007 UTC revision 24 by dpavlin, Mon Oct 8 16:19:56 2007 UTC
# Line 2  Line 2 
2  #define MEMORY_H  #define MEMORY_H
3    
4  /*  /*
5   *  Copyright (C) 2004-2005  Anders Gavare.  All rights reserved.   *  Copyright (C) 2004-2006  Anders Gavare.  All rights reserved.
6   *   *
7   *  Redistribution and use in source and binary forms, with or without   *  Redistribution and use in source and binary forms, with or without
8   *  modification, are permitted provided that the following conditions are met:   *  modification, are permitted provided that the following conditions are met:
# Line 28  Line 28 
28   *  SUCH DAMAGE.   *  SUCH DAMAGE.
29   *   *
30   *   *
31   *  $Id: memory.h,v 1.47 2006/01/01 13:17:18 debug Exp $   *  $Id: memory.h,v 1.49 2006/06/16 18:31:26 debug Exp $
32   *   *
33   *  Memory controller related functions.   *  Memory controller related functions.
34   */   */
# Line 45  Line 45 
45  struct cpu;  struct cpu;
46  struct translation_page_entry;  struct translation_page_entry;
47    
 /*  For bintrans:  */  
 #define MAX_QUICK_JUMPS                 8  
   
48  struct memory {  struct memory {
49          uint64_t        physical_max;          uint64_t        physical_max;
50          void            *pagetable;          void            *pagetable;
# Line 73  struct memory { Line 70  struct memory {
70          uint64_t        dev_dyntrans_write_high[MAX_DEVICES];          uint64_t        dev_dyntrans_write_high[MAX_DEVICES];
71    
72          int             dev_dyntrans_alignment;          int             dev_dyntrans_alignment;
   
   
         /*  
          *  NOTE/TODO: This bintrans was for MIPS only. Ugly. :-/  
          */  
   
         /*  
          *  translation_code_chunk_space is a large chunk of (linear) memory  
          *  where translated code chunks and translation_entrys are stored.  
          *  When this is filled, translation is restart from scratch (by  
          *  resetting translation_code_chunk_space_head to 0, and removing all  
          *  translation entries).  
          *  
          *  (Using a static memory region like this is somewhat inspired by  
          *  the QEMU web pages,  
          *  http://fabrice.bellard.free.fr/qemu/qemu-tech.html#SEC13)  
          */  
   
         unsigned char   *translation_code_chunk_space;  
         size_t          translation_code_chunk_space_head;  
   
         int             bintrans_32bit_only;  
   
         struct translation_page_entry **translation_page_entry_array;  
   
         unsigned char   *quick_jump_host_address[MAX_QUICK_JUMPS];  
         size_t          quick_jump_page_offset[MAX_QUICK_JUMPS];  
         int             n_quick_jumps;  
         int             quick_jumps_index;  
73  };  };
74    
75  #define BITS_PER_PAGETABLE      20  #define BITS_PER_PAGETABLE      20
# Line 190  void memory_device_register(struct memor Line 158  void memory_device_register(struct memor
158          void *extra, int flags, unsigned char *dyntrans_data);          void *extra, int flags, unsigned char *dyntrans_data);
159  void memory_device_remove(struct memory *mem, int i);  void memory_device_remove(struct memory *mem, int i);
160    
161    uint64_t memory_checksum(struct memory *mem);
162    
163    
164  #endif  /*  MEMORY_H  */  #endif  /*  MEMORY_H  */

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

  ViewVC Help
Powered by ViewVC 1.1.26