]> www.infradead.org Git - users/borneoa/openocd-next.git/commitdiff
target/arc: allow reading memory while target runs
authorDaniel DeGrasse <ddegrasse@tenstorrent.com>
Fri, 17 Jan 2025 03:33:48 +0000 (22:33 -0500)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sun, 16 Feb 2025 16:26:42 +0000 (16:26 +0000)
There is no reason that ARC can't support reading from memory over JTAG
while the target is executing, and this is in fact required for RTT
support. Remove this check from arc_mem_read and arc_mem_write

Change-Id: I2accfb4b99bf77c5473d133623e0eb0632cb45f6
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8721
Tested-by: jenkins
Reviewed-by: Evgeniy Didin <didin@synopsys.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
src/target/arc_mem.c

index 3daed1cbbfa6aa86f59344c8b4b97ad83bea4f1a..5132aca3d904f57478f822a86a0bc18eb5d3c078 100644 (file)
@@ -161,11 +161,6 @@ int arc_mem_write(struct target *target, target_addr_t address, uint32_t size,
        LOG_TARGET_DEBUG(target, "address: 0x%08" TARGET_PRIxADDR ", size: %" PRIu32 ", count: %" PRIu32,
                address, size, count);
 
-       if (target->state != TARGET_HALTED) {
-               LOG_TARGET_ERROR(target, "not halted");
-               return ERROR_TARGET_NOT_HALTED;
-       }
-
        /* sanitize arguments */
        if (((size != 4) && (size != 2) && (size != 1)) || !(count) || !(buffer))
                return ERROR_COMMAND_SYNTAX_ERROR;
@@ -246,11 +241,6 @@ int arc_mem_read(struct target *target, target_addr_t address, uint32_t size,
        LOG_TARGET_DEBUG(target, "Read memory: addr=0x%08" TARGET_PRIxADDR ", size=%" PRIu32
                        ", count=%" PRIu32, address, size, count);
 
-       if (target->state != TARGET_HALTED) {
-               LOG_TARGET_WARNING(target, "target not halted");
-               return ERROR_TARGET_NOT_HALTED;
-       }
-
        /* Sanitize arguments */
        if (((size != 4) && (size != 2) && (size != 1)) || !(count) || !(buffer))
                return ERROR_COMMAND_SYNTAX_ERROR;