cortex_a8_wrp_t -> struct cortex_a8_wrp
[openocd.git] / src / target / cortex_a8.h
1 /***************************************************************************
2 * Copyright (C) 2005 by Dominic Rath *
3 * Dominic.Rath@gmx.de *
4 * *
5 * Copyright (C) 2006 by Magnus Lundin *
6 * lundin@mlu.mine.nu *
7 * *
8 * Copyright (C) 2008 by Spencer Oliver *
9 * spen@spen-soft.co.uk *
10 * *
11 * Copyright (C) 2009 by Dirk Behme *
12 * dirk.behme@gmail.com - copy from cortex_m3 *
13 * *
14 * This program is free software; you can redistribute it and/or modify *
15 * it under the terms of the GNU General Public License as published by *
16 * the Free Software Foundation; either version 2 of the License, or *
17 * (at your option) any later version. *
18 * *
19 * This program is distributed in the hope that it will be useful, *
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
22 * GNU General Public License for more details. *
23 * *
24 * You should have received a copy of the GNU General Public License *
25 * along with this program; if not, write to the *
26 * Free Software Foundation, Inc., *
27 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
28 ***************************************************************************/
29 #ifndef CORTEX_A8_H
30 #define CORTEX_A8_H
31
32 #include "register.h"
33 #include "target.h"
34 #include "armv7a.h"
35 #include "arm7_9_common.h"
36
37 extern char* cortex_a8_state_strings[];
38
39 #define CORTEX_A8_COMMON_MAGIC 0x411fc082
40
41 #define CPUID 0x54011D00
42 /* Debug Control Block */
43 #define CPUDBG_DIDR 0x000
44 #define CPUDBG_WFAR 0x018
45 #define CPUDBG_VCR 0x01C
46 #define CPUDBG_ECR 0x024
47 #define CPUDBG_DSCCR 0x028
48 #define CPUDBG_DTRRX 0x080
49 #define CPUDBG_ITR 0x084
50 #define CPUDBG_DSCR 0x088
51 #define CPUDBG_DTRTX 0x08c
52 #define CPUDBG_DRCR 0x090
53 #define CPUDBG_BVR_BASE 0x100
54 #define CPUDBG_BCR_BASE 0x140
55 #define CPUDBG_WVR_BASE 0x180
56 #define CPUDBG_WCR_BASE 0x1C0
57
58 #define CPUDBG_OSLAR 0x300
59 #define CPUDBG_OSLSR 0x304
60 #define CPUDBG_OSSRR 0x308
61
62 #define CPUDBG_PRCR 0x310
63 #define CPUDBG_PRSR 0x314
64
65 #define CPUDBG_CPUID 0xD00
66 #define CPUDBG_CTYPR 0xD04
67 #define CPUDBG_TTYPR 0xD0C
68 #define CPUDBG_LOCKACCESS 0xFB0
69 #define CPUDBG_LOCKSTATUS 0xFB4
70 #define CPUDBG_AUTHSTATUS 0xFB8
71
72 #define BRP_NORMAL 0
73 #define BRP_CONTEXT 1
74
75 /* DSCR Bit offset */
76 #define DSCR_CORE_HALTED 0
77 #define DSCR_CORE_RESTARTED 1
78 #define DSCR_EXT_INT_EN 13
79 #define DSCR_HALT_DBG_MODE 14
80 #define DSCR_MON_DBG_MODE 15
81 #define DSCR_INSTR_COMP 24
82 #define DSCR_DTR_TX_FULL 29
83 #define DSCR_DTR_RX_FULL 30
84
85 struct cortex_a8_brp
86 {
87 int used;
88 int type;
89 uint32_t value;
90 uint32_t control;
91 uint8_t BRPn;
92 };
93
94 struct cortex_a8_wrp
95 {
96 int used;
97 int type;
98 uint32_t value;
99 uint32_t control;
100 uint8_t WRPn;
101 };
102
103 struct cortex_a8_common
104 {
105 int common_magic;
106 struct arm_jtag jtag_info;
107
108 /* Context information */
109 uint32_t cpudbg_dscr;
110 uint32_t nvic_dfsr; /* Debug Fault Status Register - shows reason for debug halt */
111 uint32_t nvic_icsr; /* Interrupt Control State Register - shows active and pending IRQ */
112
113 /* Saved cp15 registers */
114 uint32_t cp15_control_reg;
115 uint32_t cp15_aux_control_reg;
116
117 /* Breakpoint register pairs */
118 int brp_num_context;
119 int brp_num;
120 int brp_num_available;
121 // int brp_enabled;
122 struct cortex_a8_brp *brp_list;
123
124 /* Watchpoint register pairs */
125 int wrp_num;
126 int wrp_num_available;
127 struct cortex_a8_wrp *wrp_list;
128
129 /* Interrupts */
130 int intlinesnum;
131 uint32_t *intsetenable;
132
133 /* Use cortex_a8_read_regs_through_mem for fast register reads */
134 int fast_reg_read;
135
136 struct armv7a_common armv7a_common;
137 };
138
139 static inline struct cortex_a8_common *
140 target_to_cortex_a8(struct target_s *target)
141 {
142 return container_of(target->arch_info, struct cortex_a8_common,
143 armv7a_common.armv4_5_common);
144 }
145
146 int cortex_a8_init_arch_info(target_t *target,
147 struct cortex_a8_common *cortex_a8, struct jtag_tap *tap);
148
149 #endif /* CORTEX_A8_H */

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)