target: clarify usage of `coreid`
[openocd.git] / src / target / arc.h
index aeb326cb5102aeb54e68ef6ea0a0d6f7ed17cfba..a351802ac6ffe251dfd73147d256bb91b3bdbfd4 100644 (file)
@@ -1,11 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
 /***************************************************************************
  *   Copyright (C) 2013-2015,2019-2020 Synopsys, Inc.                      *
  *   Frank Dols <frank.dols@synopsys.com>                                  *
  *   Mischa Jonker <mischa.jonker@synopsys.com>                            *
  *   Anton Kolesov <anton.kolesov@synopsys.com>                            *
  *   Evgeniy Didin <didin@synopsys.com>                                    *
- *                                                                         *
- *   SPDX-License-Identifier: GPL-2.0-or-later                             *
  ***************************************************************************/
 
 #ifndef OPENOCD_TARGET_ARC_H
@@ -27,7 +27,7 @@
 #include "arc_cmd.h"
 #include "arc_mem.h"
 
-#define ARC_COMMON_MAGIC       0xB32EB324  /* just a unique number */
+#define ARC_COMMON_MAGIC       0xB32EB324U  /* just a unique number */
 
 #define AUX_DEBUG_REG                   0x5
 #define AUX_PC_REG                      0x6
 #define AUX_STATUS32_REG_HALT_BIT       BIT(0)
 #define AUX_STATUS32_REG_IE_BIT         BIT(31)    /* STATUS32[31] = IE field */
 
-/* Reserved core registers */
-#define CORE_R61_NUM                   (61)
-#define CORE_R62_NUM                   (62)
+/* ARC register numbers */
+enum {
+       ARC_R0,
+       ARC_R1,
+       ARC_R2,
+       ARC_R3,
+       ARC_R4,
+       ARC_R5,
+       ARC_R6,
+       ARC_R7,
+       ARC_R8,
+       ARC_R9,
+       ARC_R10,
+       ARC_R11,
+       ARC_R12,
+       ARC_R13,
+       ARC_R14,
+       ARC_R15,
+       ARC_R16,
+       ARC_R17,
+       ARC_R18,
+       ARC_R19,
+       ARC_R20,
+       ARC_R21,
+       ARC_R22,
+       ARC_R23,
+       ARC_R24,
+       ARC_R25,
+       ARC_GP          = 26,
+       ARC_FP          = 27,
+       ARC_SP          = 28,
+       ARC_ILINK       = 29,
+       ARC_R30,
+       ARC_BLINK       = 31,
+       ARC_LP_COUNT    = 60,
+
+       /* Reserved registers */
+       ARC_R61         = 61,
+       ARC_R62         = 62,
+
+       ARC_PCL         = 63,
+       ARC_PC          = 64,
+       ARC_LP_START    = 65,
+       ARC_LP_END      = 66,
+       ARC_STATUS32    = 67,
+};
 
 #define CORE_REG_MAX_NUMBER            (63)
 
@@ -140,7 +183,7 @@ struct arc_actionpoint {
 };
 
 struct arc_common {
-       uint32_t common_magic;
+       unsigned int common_magic;
 
        struct arc_jtag jtag_info;
 
@@ -163,7 +206,7 @@ struct arc_common {
        bool dcache_invalidated;
        bool l2cache_invalidated;
 
-       /* Indicate if cach was built (for deinit function) */
+       /* Indicate if cache was built (for deinit function) */
        bool core_aux_cache_built;
        bool bcr_cache_built;
        /* Closely Coupled memory(CCM) regions for performance-critical
@@ -210,16 +253,6 @@ struct arc_common {
                }                               \
        } while (0)
 
-#define JIM_CHECK_RETVAL(action)               \
-       do {                                    \
-               int __retval = (action);        \
-               if (__retval != JIM_OK) {       \
-                       LOG_DEBUG("error while calling \"%s\"", \
-                               # action);     \
-                       return __retval;        \
-               }                               \
-       } while (0)
-
 static inline struct arc_common *target_to_arc(struct target *target)
 {
        return target->arch_info;

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)