@@ -3145,7 +3145,7 @@ static int riscv_address_translate(struct target *target,
3145
3145
.increment = 4 ,
3146
3146
.count = (1 << info -> pte_shift ) / 4 ,
3147
3147
};
3148
- int retval = r -> access_memory (target , args );
3148
+ int retval = r -> access_memory (target , args , /* is_virtual */ false );
3149
3149
if (retval != ERROR_OK )
3150
3150
return ERROR_FAIL ;
3151
3151
@@ -3389,7 +3389,7 @@ static int riscv_read_phys_memory(struct target *target, target_addr_t phys_addr
3389
3389
.increment = size ,
3390
3390
};
3391
3391
RISCV_INFO (r );
3392
- return r -> access_memory (target , args );
3392
+ return r -> access_memory (target , args , /* is_virtual */ false );
3393
3393
}
3394
3394
3395
3395
static 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
3404
3404
};
3405
3405
3406
3406
RISCV_INFO (r );
3407
- return r -> access_memory (target , args );
3407
+ return r -> access_memory (target , args , /* is_virtual */ false );
3408
3408
}
3409
3409
3410
3410
static 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
3425
3425
3426
3426
RISCV_INFO (r );
3427
3427
if (!mmu_enabled )
3428
- return r -> access_memory (target , args );
3428
+ return r -> access_memory (target , args , /* is_virtual */ true );
3429
3429
3430
3430
result = check_virt_memory_access (target , args .address ,
3431
3431
args .size , args .count , is_write );
@@ -3457,7 +3457,8 @@ static int riscv_rw_memory(struct target *target, const riscv_mem_access_args_t
3457
3457
else
3458
3458
current_access .read_buffer += current_count * args .size ;
3459
3459
3460
- result = r -> access_memory (target , current_access );
3460
+ result = r -> access_memory (target ,
3461
+ current_access , /* is_virtual */ false);
3461
3462
if (result != ERROR_OK )
3462
3463
return result ;
3463
3464
@@ -5228,7 +5229,9 @@ COMMAND_HANDLER(handle_repeat_read)
5228
5229
.count = count ,
5229
5230
.increment = 0 ,
5230
5231
};
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);
5232
5235
if (result == ERROR_OK ) {
5233
5236
target_handle_md_output (cmd , target , address , size , count , buffer ,
5234
5237
false);
@@ -5611,7 +5614,7 @@ static const struct command_registration riscv_exec_command_handlers[] = {
5611
5614
.handler = handle_repeat_read ,
5612
5615
.mode = COMMAND_ANY ,
5613
5616
.usage = "count address [size=4]" ,
5614
- .help = "Repeatedly read the value at address."
5617
+ .help = "Repeatedly read the value at physical address."
5615
5618
},
5616
5619
{
5617
5620
.name = "set_command_timeout_sec" ,
0 commit comments