Commit 7727994d21eea75859df8f2fcfa7163a1d6f64e4

Authored by bellard
1 parent 8a8696a3

support for opaque data on memory I/Os


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@877 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 4 additions and 3 deletions
cpu-all.h
@@ -681,15 +681,16 @@ extern uint8_t *phys_ram_dirty; @@ -681,15 +681,16 @@ extern uint8_t *phys_ram_dirty;
681 #define IO_MEM_CODE (3 << IO_MEM_SHIFT) /* used internally, never use directly */ 681 #define IO_MEM_CODE (3 << IO_MEM_SHIFT) /* used internally, never use directly */
682 #define IO_MEM_NOTDIRTY (4 << IO_MEM_SHIFT) /* used internally, never use directly */ 682 #define IO_MEM_NOTDIRTY (4 << IO_MEM_SHIFT) /* used internally, never use directly */
683 683
684 -typedef void CPUWriteMemoryFunc(target_phys_addr_t addr, uint32_t value);  
685 -typedef uint32_t CPUReadMemoryFunc(target_phys_addr_t addr); 684 +typedef void CPUWriteMemoryFunc(void *opaque, target_phys_addr_t addr, uint32_t value);
  685 +typedef uint32_t CPUReadMemoryFunc(void *opaque, target_phys_addr_t addr);
686 686
687 void cpu_register_physical_memory(target_phys_addr_t start_addr, 687 void cpu_register_physical_memory(target_phys_addr_t start_addr,
688 unsigned long size, 688 unsigned long size,
689 unsigned long phys_offset); 689 unsigned long phys_offset);
690 int cpu_register_io_memory(int io_index, 690 int cpu_register_io_memory(int io_index,
691 CPUReadMemoryFunc **mem_read, 691 CPUReadMemoryFunc **mem_read,
692 - CPUWriteMemoryFunc **mem_write); 692 + CPUWriteMemoryFunc **mem_write,
  693 + void *opaque);
693 694
694 void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf, 695 void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf,
695 int len, int is_write); 696 int len, int is_write);