@@ -3145,7 +3145,7 @@ static int riscv_address_translate(struct target *target,
31453145 .increment = 4 ,
31463146 .count = (1 << info -> pte_shift ) / 4 ,
31473147 };
3148- int retval = r -> access_memory (target , args );
3148+ int retval = r -> access_memory (target , args , /* is_virtual */ false );
31493149 if (retval != ERROR_OK )
31503150 return ERROR_FAIL ;
31513151
@@ -3389,7 +3389,7 @@ static int riscv_read_phys_memory(struct target *target, target_addr_t phys_addr
33893389 .increment = size ,
33903390 };
33913391 RISCV_INFO (r );
3392- return r -> access_memory (target , args );
3392+ return r -> access_memory (target , args , /* is_virtual */ false );
33933393}
33943394
33953395static int riscv_write_phys_memory (struct target * target , target_addr_t phys_address ,
@@ -3404,7 +3404,7 @@ static int riscv_write_phys_memory(struct target *target, target_addr_t phys_add
34043404 };
34053405
34063406 RISCV_INFO (r );
3407- return r -> access_memory (target , args );
3407+ return r -> access_memory (target , args , /* is_virtual */ false );
34083408}
34093409
34103410static int riscv_rw_memory (struct target * target , const riscv_mem_access_args_t args )
@@ -3425,7 +3425,7 @@ static int riscv_rw_memory(struct target *target, const riscv_mem_access_args_t
34253425
34263426 RISCV_INFO (r );
34273427 if (!mmu_enabled )
3428- return r -> access_memory (target , args );
3428+ return r -> access_memory (target , args , /* is_virtual */ true );
34293429
34303430 result = check_virt_memory_access (target , args .address ,
34313431 args .size , args .count , is_write );
@@ -3457,7 +3457,8 @@ static int riscv_rw_memory(struct target *target, const riscv_mem_access_args_t
34573457 else
34583458 current_access .read_buffer += current_count * args .size ;
34593459
3460- result = r -> access_memory (target , current_access );
3460+ result = r -> access_memory (target ,
3461+ current_access , /* is_virtual */ false);
34613462 if (result != ERROR_OK )
34623463 return result ;
34633464
@@ -5228,7 +5229,9 @@ COMMAND_HANDLER(handle_repeat_read)
52285229 .count = count ,
52295230 .increment = 0 ,
52305231 };
5231- int result = r -> access_memory (target , args );
5232+ /* TODO: Add a command parameter that enables
5233+ choosing between virtual and physical access */
5234+ int result = r -> access_memory (target , args , /* is_virtual */ false);
52325235 if (result == ERROR_OK ) {
52335236 target_handle_md_output (cmd , target , address , size , count , buffer ,
52345237 false);
@@ -5611,7 +5614,7 @@ static const struct command_registration riscv_exec_command_handlers[] = {
56115614 .handler = handle_repeat_read ,
56125615 .mode = COMMAND_ANY ,
56135616 .usage = "count address [size=4]" ,
5614- .help = "Repeatedly read the value at address."
5617+ .help = "Repeatedly read the value at physical address."
56155618 },
56165619 {
56175620 .name = "set_command_timeout_sec" ,
0 commit comments