]> git.gag.com Git - fw/openocd/blobdiff - src/target/armv8.c
target/register: Minor code cleanup
[fw/openocd] / src / target / armv8.c
index 95efdc90bbd71e2220c3090feb800175019b1bbd..6d60a1ce84c3f730fed37f849ca460a0c9206174 100644 (file)
@@ -1025,7 +1025,7 @@ COMMAND_HANDLER(armv8_handle_exception_catch_command)
        unsigned int argp = 0;
        int retval;
 
-       static const Jim_Nvp nvp_ecatch_modes[] = {
+       static const struct jim_nvp nvp_ecatch_modes[] = {
                { .name = "off",       .value = 0 },
                { .name = "nsec_el1",  .value = (1 << 5) },
                { .name = "nsec_el2",  .value = (2 << 5) },
@@ -1035,7 +1035,7 @@ COMMAND_HANDLER(armv8_handle_exception_catch_command)
                { .name = "sec_el13",  .value = (5 << 1) },
                { .name = NULL, .value = -1 },
        };
-       const Jim_Nvp *n;
+       const struct jim_nvp *n;
 
        if (CMD_ARGC == 0) {
                const char *sec = NULL, *nsec = NULL;
@@ -1045,11 +1045,11 @@ COMMAND_HANDLER(armv8_handle_exception_catch_command)
                if (retval != ERROR_OK)
                        return retval;
 
-               n = Jim_Nvp_value2name_simple(nvp_ecatch_modes, edeccr & 0x0f);
+               n = jim_nvp_value2name_simple(nvp_ecatch_modes, edeccr & 0x0f);
                if (n->name != NULL)
                        sec = n->name;
 
-               n = Jim_Nvp_value2name_simple(nvp_ecatch_modes, edeccr & 0xf0);
+               n = jim_nvp_value2name_simple(nvp_ecatch_modes, edeccr & 0xf0);
                if (n->name != NULL)
                        nsec = n->name;
 
@@ -1063,7 +1063,7 @@ COMMAND_HANDLER(armv8_handle_exception_catch_command)
        }
 
        while (CMD_ARGC > argp) {
-               n = Jim_Nvp_name2value_simple(nvp_ecatch_modes, CMD_ARGV[argp]);
+               n = jim_nvp_name2value_simple(nvp_ecatch_modes, CMD_ARGV[argp]);
                if (n->name == NULL) {
                        LOG_ERROR("Unknown option: %s", CMD_ARGV[argp]);
                        return ERROR_FAIL;
@@ -1098,13 +1098,6 @@ int armv8_handle_cache_info_command(struct command_invocation *cmd,
 
 static int armv8_setup_semihosting(struct target *target, int enable)
 {
-       struct arm *arm = target_to_arm(target);
-
-       if (arm->core_state != ARM_STATE_AARCH64) {
-               LOG_ERROR("semihosting only supported in AArch64 state\n");
-               return ERROR_FAIL;
-       }
-
        return ERROR_OK;
 }
 
@@ -1176,8 +1169,7 @@ int armv8_arch_state(struct target *target)
                armv8_show_fault_registers(target);
 
        if (target->debug_reason == DBG_REASON_WATCHPOINT)
-               LOG_USER("Watchpoint triggered at PC %#08x",
-                       (unsigned) armv8->dpm.wp_pc);
+               LOG_USER("Watchpoint triggered at " TARGET_ADDR_FMT, armv8->dpm.wp_addr);
 
        return ERROR_OK;
 }