@@ -9,17 +9,17 @@
/* iommu.c */
void sparc_iommu_memory_rw(void *opaque, hwaddr addr,
- uint8_t *buf, int len, int is_write);
+ uint8_t *buf, size_t len, int is_write);
static inline void sparc_iommu_memory_read(void *opaque,
hwaddr addr,
- uint8_t *buf, int len)
+ uint8_t *buf, size_t len)
{
sparc_iommu_memory_rw(opaque, addr, buf, len, 0);
}
static inline void sparc_iommu_memory_write(void *opaque,
hwaddr addr,
- uint8_t *buf, int len)
+ uint8_t *buf, size_t len)
{
sparc_iommu_memory_rw(opaque, addr, buf, len, 1);
}
@@ -521,7 +521,7 @@ void dump_mmu(FILE *f, fprintf_function cpu_fprintf, CPUSPARCState *env);
#if !defined(TARGET_SPARC64) && !defined(CONFIG_USER_ONLY)
int sparc_cpu_memory_rw_debug(CPUState *cpu, vaddr addr,
- uint8_t *buf, int len, bool is_write);
+ uint8_t *buf, size_t len, bool is_write);
#endif
@@ -358,13 +358,13 @@ void dump_mmu(FILE *f, fprintf_function cpu_fprintf, CPUSPARCState *env)
* that the sparc ABI is followed.
*/
int sparc_cpu_memory_rw_debug(CPUState *cs, vaddr address,
- uint8_t *buf, int len, bool is_write)
+ uint8_t *buf, size_t len, bool is_write)
{
SPARCCPU *cpu = SPARC_CPU(cs);
CPUSPARCState *env = &cpu->env;
target_ulong addr = address;
- int i;
- int len1;
+ size_t i;
+ size_t len1;
int cwp = env->cwp;
if (!is_write) {