@@ -64,7 +64,8 @@ static int register_read_direct(struct target *target, riscv_reg_t *value,
6464 enum gdb_regno number );
6565static int register_write_direct (struct target * target , enum gdb_regno number ,
6666 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 );
6869static bool riscv013_get_impebreak (const struct target * target );
6970static unsigned int riscv013_get_progbufsize (const struct target * target );
7071
@@ -1213,7 +1214,8 @@ static int scratch_read64(struct target *target, scratch_mem_t *scratch,
12131214 .count = 2 ,
12141215 .increment = 4 ,
12151216 };
1216- if (riscv013_access_memory (target , args ) != ERROR_OK )
1217+ if (riscv013_access_memory (target , args ,
1218+ /* is_virtual */ false) != ERROR_OK )
12171219 return ERROR_FAIL ;
12181220 * value = buf_get_u64 (buffer ,
12191221 /* first = */ 0 , /* bit_num = */ 64 );
@@ -1255,7 +1257,8 @@ static int scratch_write64(struct target *target, scratch_mem_t *scratch,
12551257 .count = 2 ,
12561258 .increment = 4 ,
12571259 };
1258- if (riscv013_access_memory (target , args ) != ERROR_OK )
1260+ if (riscv013_access_memory (target , args ,
1261+ /* is_virtual */ false) != ERROR_OK )
12591262 return ERROR_FAIL ;
12601263 }
12611264 break ;
@@ -4518,8 +4521,8 @@ access_memory_abstract(struct target *target, const riscv_mem_access_args_t args
45184521 write_memory_abstract (target , args );
45194522}
45204523
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 )
45234526{
45244527 assert (riscv_mem_access_is_valid (args ));
45254528
@@ -4547,12 +4550,15 @@ riscv013_access_memory(struct target *target, const riscv_mem_access_args_t args
45474550 riscv_mem_access_method_t method = r -> mem_access_methods [i ];
45484551 switch (method ) {
45494552 case RISCV_MEM_ACCESS_PROGBUF :
4553+ // TODO: pass is_virtual here in future commits
45504554 skip_reason [method ] = access_memory_progbuf (target , args );
45514555 break ;
45524556 case RISCV_MEM_ACCESS_SYSBUS :
4557+ // TODO: pass is_virtual here in future commits
45534558 skip_reason [method ] = access_memory_sysbus (target , args );
45544559 break ;
45554560 case RISCV_MEM_ACCESS_ABSTRACT :
4561+ // TODO: pass is_virtual here in future commits
45564562 skip_reason [method ] = access_memory_abstract (target , args );
45574563 break ;
45584564 default :
0 commit comments