OpenOCD
arm11.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 /***************************************************************************
4  * Copyright (C) 2008 digenius technology GmbH. *
5  * Michael Bruck *
6  * *
7  * Copyright (C) 2008 Georg Acher <acher@in.tum.de> *
8  ***************************************************************************/
9 
10 #ifndef OPENOCD_TARGET_ARM11_H
11 #define OPENOCD_TARGET_ARM11_H
12 
13 #include "arm.h"
14 #include "arm_dpm.h"
15 
16 #define ARM11_TAP_DEFAULT TAP_INVALID
17 
18 #define CHECK_RETVAL(action) \
19  do { \
20  int __retval = (action); \
21  if (__retval != ERROR_OK) { \
22  LOG_DEBUG("error while calling \"%s\"", \
23  # action); \
24  return __retval; \
25  } \
26  } while (0)
27 
28 /* bits from ARMv7 DIDR */
34 };
35 
36 struct arm11_common {
37  struct arm arm;
38 
40  struct arm_dpm dpm;
42  unsigned bpwp_n;
43 
44  size_t brp;
45  size_t free_brps;
47  uint32_t dscr;
49  uint32_t saved_rdtr;
50  uint32_t saved_wdtr;
51 
54 
57  /* Per-core configurable options.
58  * NOTE that several of these boolean options should not exist
59  * once the relevant code is known to work correctly.
60  */
65 
67  uint32_t vcr;
68 
69  struct arm_jtag jtag_info;
70 };
71 
72 static inline struct arm11_common *target_to_arm11(struct target *target)
73 {
74  return container_of(target->arch_info, struct arm11_common, arm);
75 }
76 
83  ARM11_EXTEST = 0x00,
84  ARM11_SCAN_N = 0x02,
85  ARM11_RESTART = 0x04,
86  ARM11_HALT = 0x08,
87  ARM11_INTEST = 0x0C,
88  ARM11_ITRSEL = 0x1D,
89  ARM11_IDCODE = 0x1E,
90  ARM11_BYPASS = 0x1F,
91 };
92 
93 enum arm11_sc7 {
101 };
102 
103 #endif /* OPENOCD_TARGET_ARM11_H */
static struct arm11_common * target_to_arm11(struct target *target)
Definition: arm11.h:72
arm11_debug_version
Definition: arm11.h:29
@ ARM11_DEBUG_V61
Definition: arm11.h:31
@ ARM11_DEBUG_V7_CP14
Definition: arm11.h:33
@ ARM11_DEBUG_V6
Definition: arm11.h:30
@ ARM11_DEBUG_V7
Definition: arm11.h:32
arm11_sc7
Definition: arm11.h:93
@ ARM11_SC7_PC
Definition: arm11.h:96
@ ARM11_SC7_WCR0
Definition: arm11.h:100
@ ARM11_SC7_BVR0
Definition: arm11.h:97
@ ARM11_SC7_WVR0
Definition: arm11.h:99
@ ARM11_SC7_BCR0
Definition: arm11.h:98
@ ARM11_SC7_NULL
Definition: arm11.h:94
@ ARM11_SC7_VCR
Definition: arm11.h:95
arm11_instructions
ARM11 DBGTAP instructions.
Definition: arm11.h:82
@ ARM11_RESTART
Definition: arm11.h:85
@ ARM11_SCAN_N
Definition: arm11.h:84
@ ARM11_INTEST
Definition: arm11.h:87
@ ARM11_ITRSEL
Definition: arm11.h:88
@ ARM11_BYPASS
Definition: arm11.h:90
@ ARM11_IDCODE
Definition: arm11.h:89
@ ARM11_EXTEST
Definition: arm11.h:83
@ ARM11_HALT
Definition: arm11.h:86
Holds the interface to ARM cores.
This is the interface to the Debug Programmers Model for ARMv6 and ARMv7 processors.
bool memwrite_burst
Definition: arm11.h:61
unsigned bpwp_n
Definition: arm11.h:42
struct arm11_sc7_action * bpwp_actions
Definition: arm11.h:41
uint32_t vcr
Configured Vector Catch Register settings.
Definition: arm11.h:67
bool simulate_reset_on_next_halt
Perform cleanups of the ARM state on next halt.
Definition: arm11.h:55
size_t brp
Number of Breakpoint Register Pairs from DIDR
Definition: arm11.h:44
bool is_wdtr_saved
Definition: arm11.h:53
size_t free_brps
Number of breakpoints allocated.
Definition: arm11.h:45
struct arm_dpm dpm
Debug module state.
Definition: arm11.h:40
bool step_irq_enable
Definition: arm11.h:63
uint32_t dscr
Last retrieved DSCR value.
Definition: arm11.h:47
bool hardware_step
Definition: arm11.h:64
bool memwrite_error_fatal
Definition: arm11.h:62
struct arm_jtag jtag_info
Definition: arm11.h:69
uint32_t saved_wdtr
Definition: arm11.h:50
bool is_rdtr_saved
Definition: arm11.h:52
uint32_t saved_rdtr
Definition: arm11.h:49
Used with arm11_sc7_run to make a list of read/write commands for scan chain 7.
Definition: arm11_dbgtap.h:49
This wraps an implementation of DPM primitives.
Definition: arm_dpm.h:47
Represents a generic ARM core, with standard application registers.
Definition: arm.h:174
Definition: target.h:116
void * arch_info
Definition: target.h:164
#define container_of(ptr, type, member)
Cast a member of a structure out to the containing structure.
Definition: types.h:68