Retire obsolete and superfluous implementations of virt2phys in each target. This...
[fw/openocd] / src / target / armv4_5.h
index 8e9710a87633a9d83e78a32f7bad090e7c133aab..7ea3826ab092a347b64ef10aa03edf9f36e37709 100644 (file)
@@ -74,8 +74,9 @@ typedef struct armv4_5_common_s
 {
        int common_magic;
        reg_cache_t *core_cache;
-       enum armv4_5_mode core_mode;
+       int /* armv4_5_mode */ core_mode;
        enum armv4_5_state core_state;
+       bool is_armv4;
        int (*full_context)(struct target_s *target);
        int (*read_core_reg)(struct target_s *target, int num, enum armv4_5_mode mode);
        int (*write_core_reg)(struct target_s *target, int num, enum armv4_5_mode mode, uint32_t value);
@@ -114,7 +115,7 @@ static __inline int armv4_5_mode_to_number(enum armv4_5_mode mode)
                case ARMV4_5_MODE_SYS: return 6; break;
                case ARMV4_5_MODE_ANY: return 0; break; /* map MODE_ANY to user mode */
                default:
-                       LOG_ERROR("invalid mode value encountered");
+                       LOG_ERROR("invalid mode value encountered %d", mode);
                        return -1;
        }
 }
@@ -132,7 +133,7 @@ static __inline enum armv4_5_mode armv4_5_number_to_mode(int number)
                case 5: return ARMV4_5_MODE_UND; break;
                case 6: return ARMV4_5_MODE_SYS; break;
                default:
-                       LOG_ERROR("mode index out of bounds");
+                       LOG_ERROR("mode index out of bounds %d", number);
                        return ARMV4_5_MODE_ANY;
        }
 };