riscv: Remove redundant command for virtual address access.
This commit is contained in:
parent
9ee2cc061c
commit
990d09eac3
|
@ -251,9 +251,8 @@ int riscv_command_timeout_sec = DEFAULT_COMMAND_TIMEOUT_SEC;
|
||||||
int riscv_reset_timeout_sec = DEFAULT_RESET_TIMEOUT_SEC;
|
int riscv_reset_timeout_sec = DEFAULT_RESET_TIMEOUT_SEC;
|
||||||
|
|
||||||
bool riscv_prefer_sba;
|
bool riscv_prefer_sba;
|
||||||
bool riscv_no_virt2phys;
|
|
||||||
|
|
||||||
bool riscv_enable_virtual;
|
bool riscv_enable_virtual = true;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint16_t low, high;
|
uint16_t low, high;
|
||||||
|
@ -1483,7 +1482,7 @@ static int riscv_address_translate(struct target *target,
|
||||||
|
|
||||||
static int riscv_virt2phys(struct target *target, target_addr_t virtual, target_addr_t *physical)
|
static int riscv_virt2phys(struct target *target, target_addr_t virtual, target_addr_t *physical)
|
||||||
{
|
{
|
||||||
if (riscv_no_virt2phys)
|
if (!riscv_enable_virtual)
|
||||||
return ERROR_FAIL;
|
return ERROR_FAIL;
|
||||||
|
|
||||||
int enabled;
|
int enabled;
|
||||||
|
@ -2449,16 +2448,6 @@ COMMAND_HANDLER(riscv_use_bscan_tunnel)
|
||||||
return ERROR_OK;
|
return ERROR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
COMMAND_HANDLER(riscv_disable_virt2phys)
|
|
||||||
{
|
|
||||||
if (CMD_ARGC != 1) {
|
|
||||||
LOG_ERROR("Command takes exactly 1 parameter");
|
|
||||||
return ERROR_COMMAND_SYNTAX_ERROR;
|
|
||||||
}
|
|
||||||
COMMAND_PARSE_ON_OFF(CMD_ARGV[0], riscv_no_virt2phys);
|
|
||||||
return ERROR_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
static const struct command_registration riscv_exec_command_handlers[] = {
|
static const struct command_registration riscv_exec_command_handlers[] = {
|
||||||
{
|
{
|
||||||
.name = "test_compliance",
|
.name = "test_compliance",
|
||||||
|
@ -2594,13 +2583,6 @@ static const struct command_registration riscv_exec_command_handlers[] = {
|
||||||
"(optional) to indicate Bscan Tunnel Type {0:(default) NESTED_TAP , "
|
"(optional) to indicate Bscan Tunnel Type {0:(default) NESTED_TAP , "
|
||||||
"1: DATA_REGISTER}"
|
"1: DATA_REGISTER}"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
.name = "disable_virt2phys",
|
|
||||||
.handler = riscv_disable_virt2phys,
|
|
||||||
.mode = COMMAND_ANY,
|
|
||||||
.usage = "riscv disable_virt2phys on|off",
|
|
||||||
.help = "Disable translation from virtual address to physical address."
|
|
||||||
},
|
|
||||||
COMMAND_REGISTRATION_DONE
|
COMMAND_REGISTRATION_DONE
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue