28 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
29 |
* |
* |
30 |
* |
* |
31 |
* $Id: memory.h,v 1.37 2005/09/22 09:07:00 debug Exp $ |
* $Id: memory.h,v 1.40 2005/10/23 14:24:15 debug Exp $ |
32 |
* |
* |
33 |
* Memory controller related functions. |
* Memory controller related functions. |
34 |
*/ |
*/ |
64 |
|
|
65 |
const char *dev_name[MAX_DEVICES]; |
const char *dev_name[MAX_DEVICES]; |
66 |
uint64_t dev_baseaddr[MAX_DEVICES]; |
uint64_t dev_baseaddr[MAX_DEVICES]; |
67 |
|
uint64_t dev_endaddr[MAX_DEVICES]; /* after the end! */ |
68 |
uint64_t dev_length[MAX_DEVICES]; |
uint64_t dev_length[MAX_DEVICES]; |
69 |
int dev_flags[MAX_DEVICES]; |
int dev_flags[MAX_DEVICES]; |
70 |
void *dev_extra[MAX_DEVICES]; |
void *dev_extra[MAX_DEVICES]; |
170 |
|
|
171 |
int userland_memory_rw(struct cpu *cpu, struct memory *mem, uint64_t vaddr, |
int userland_memory_rw(struct cpu *cpu, struct memory *mem, uint64_t vaddr, |
172 |
unsigned char *data, size_t len, int writeflag, int cache); |
unsigned char *data, size_t len, int writeflag, int cache); |
173 |
#define MEMORY_ACCESS_FAILED 0 |
#define MEMORY_ACCESS_FAILED 0 |
174 |
#define MEMORY_ACCESS_OK 1 |
#define MEMORY_ACCESS_OK 1 |
175 |
|
#define MEMORY_ACCESS_OK_WRITE 2 |
176 |
|
#define MEMORY_NOT_FULL_PAGE 256 |
177 |
|
|
178 |
void memory_device_dyntrans_access(struct cpu *, struct memory *mem, |
void memory_device_dyntrans_access(struct cpu *, struct memory *mem, |
179 |
void *extra, uint64_t *low, uint64_t *high); |
void *extra, uint64_t *low, uint64_t *high); |
195 |
#define MEM_DYNTRANS_OK 1 |
#define MEM_DYNTRANS_OK 1 |
196 |
#define MEM_DYNTRANS_WRITE_OK 2 |
#define MEM_DYNTRANS_WRITE_OK 2 |
197 |
#define MEM_READING_HAS_NO_SIDE_EFFECTS 4 |
#define MEM_READING_HAS_NO_SIDE_EFFECTS 4 |
198 |
|
#define MEM_EMULATED_RAM 8 |
199 |
|
|
200 |
|
|
201 |
#endif /* MEMORY_H */ |
#endif /* MEMORY_H */ |