@@ -2987,11 +2987,8 @@ static int riscv_address_translate(struct target *target,
2987
2987
LOG_TARGET_DEBUG (target , "i=%d; PTE @0x%" TARGET_PRIxADDR " = 0x%" PRIx64 , i ,
2988
2988
pte_address , pte );
2989
2989
2990
- if (!(pte & PTE_V ) || (!(pte & PTE_R ) && (pte & PTE_W ))) {
2991
- LOG_TARGET_ERROR (target , "invalid PTE @0x%" TARGET_PRIxADDR ": 0x%" PRIx64
2992
- "; mode=%s; i=%d" , pte_address , pte , info -> name , i );
2990
+ if (!(pte & PTE_V ) || (!(pte & PTE_R ) && (pte & PTE_W )))
2993
2991
return ERROR_FAIL ;
2994
- }
2995
2992
2996
2993
if ((pte & PTE_R ) || (pte & PTE_W ) || (pte & PTE_X )) /* Found leaf PTE. */
2997
2994
break ;
@@ -3301,11 +3298,8 @@ static int riscv_rw_memory(struct target *target, const riscv_mem_access_args_t
3301
3298
while (current_count < args .count ) {
3302
3299
target_addr_t physical_addr ;
3303
3300
result = target -> type -> virt2phys (target , current_address , & physical_addr );
3304
- if (result != ERROR_OK ) {
3305
- LOG_TARGET_ERROR (target , "Address translation failed." );
3301
+ if (result != ERROR_OK )
3306
3302
physical_addr = current_address ;
3307
- //return result;
3308
- }
3309
3303
3310
3304
/* TODO: For simplicity, this algorithm assumes the worst case - the smallest possible page size,
3311
3305
* which is 4 KiB. The algorithm can be improved to detect the real page size, and allow to use larger
0 commit comments