@@ -64,7 +64,8 @@ static int register_read_direct(struct target *target, riscv_reg_t *value,
64
64
enum gdb_regno number );
65
65
static int register_write_direct (struct target * target , enum gdb_regno number ,
66
66
riscv_reg_t value );
67
- static int riscv013_access_memory (struct target * target , const riscv_mem_access_args_t args );
67
+ static int riscv013_access_memory (struct target * target ,
68
+ const riscv_mem_access_args_t args , const bool is_virtual );
68
69
static bool riscv013_get_impebreak (const struct target * target );
69
70
static unsigned int riscv013_get_progbufsize (const struct target * target );
70
71
@@ -1213,7 +1214,8 @@ static int scratch_read64(struct target *target, scratch_mem_t *scratch,
1213
1214
.count = 2 ,
1214
1215
.increment = 4 ,
1215
1216
};
1216
- if (riscv013_access_memory (target , args ) != ERROR_OK )
1217
+ if (riscv013_access_memory (target , args ,
1218
+ /* is_virtual */ false) != ERROR_OK )
1217
1219
return ERROR_FAIL ;
1218
1220
* value = buf_get_u64 (buffer ,
1219
1221
/* first = */ 0 , /* bit_num = */ 64 );
@@ -1255,7 +1257,8 @@ static int scratch_write64(struct target *target, scratch_mem_t *scratch,
1255
1257
.count = 2 ,
1256
1258
.increment = 4 ,
1257
1259
};
1258
- if (riscv013_access_memory (target , args ) != ERROR_OK )
1260
+ if (riscv013_access_memory (target , args ,
1261
+ /* is_virtual */ false) != ERROR_OK )
1259
1262
return ERROR_FAIL ;
1260
1263
}
1261
1264
break ;
@@ -4518,8 +4521,8 @@ access_memory_abstract(struct target *target, const riscv_mem_access_args_t args
4518
4521
write_memory_abstract (target , args );
4519
4522
}
4520
4523
4521
- static int
4522
- riscv013_access_memory ( struct target * target , const riscv_mem_access_args_t args )
4524
+ static int riscv013_access_memory ( struct target * target ,
4525
+ const riscv_mem_access_args_t args , const bool is_virtual )
4523
4526
{
4524
4527
assert (riscv_mem_access_is_valid (args ));
4525
4528
@@ -4547,12 +4550,15 @@ riscv013_access_memory(struct target *target, const riscv_mem_access_args_t args
4547
4550
riscv_mem_access_method_t method = r -> mem_access_methods [i ];
4548
4551
switch (method ) {
4549
4552
case RISCV_MEM_ACCESS_PROGBUF :
4553
+ // TODO: pass is_virtual here in future commits
4550
4554
skip_reason [method ] = access_memory_progbuf (target , args );
4551
4555
break ;
4552
4556
case RISCV_MEM_ACCESS_SYSBUS :
4557
+ // TODO: pass is_virtual here in future commits
4553
4558
skip_reason [method ] = access_memory_sysbus (target , args );
4554
4559
break ;
4555
4560
case RISCV_MEM_ACCESS_ABSTRACT :
4561
+ // TODO: pass is_virtual here in future commits
4556
4562
skip_reason [method ] = access_memory_abstract (target , args );
4557
4563
break ;
4558
4564
default :
0 commit comments