677aa4587719ea0759106c6519a807f58fdbaf4e
[openocd.git] / src / target / arm720t.c
1 /***************************************************************************
2 * Copyright (C) 2005 by Dominic Rath *
3 * Dominic.Rath@gmx.de *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
20 #ifdef HAVE_CONFIG_H
21 #include "config.h"
22 #endif
23
24 #include "arm720t.h"
25 #include "jtag.h"
26 #include "log.h"
27
28 #include <stdlib.h>
29 #include <string.h>
30
31 #if 1
32 #define _DEBUG_INSTRUCTION_EXECUTION_
33 #endif
34
35 /* cli handling */
36 int arm720t_register_commands(struct command_context_s *cmd_ctx);
37
38 int arm720t_handle_cp15_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
39 int arm720t_handle_virt2phys_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
40 int arm720t_handle_md_phys_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
41 int arm720t_handle_mw_phys_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
42
43 /* forward declarations */
44 int arm720t_target_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct target_s *target);
45 int arm720t_init_target(struct command_context_s *cmd_ctx, struct target_s *target);
46 int arm720t_quit();
47 int arm720t_arch_state(struct target_s *target, char *buf, int buf_size);
48 int arm720t_read_memory(struct target_s *target, u32 address, u32 size, u32 count, u8 *buffer);
49 int arm720t_write_memory(struct target_s *target, u32 address, u32 size, u32 count, u8 *buffer);
50 int arm720t_soft_reset_halt(struct target_s *target);
51
52 target_type_t arm720t_target =
53 {
54 .name = "arm720t",
55
56 .poll = arm7_9_poll,
57 .arch_state = arm720t_arch_state,
58
59 .halt = arm7_9_halt,
60 .resume = arm7_9_resume,
61 .step = arm7_9_step,
62
63 .assert_reset = arm7_9_assert_reset,
64 .deassert_reset = arm7_9_deassert_reset,
65 .soft_reset_halt = arm720t_soft_reset_halt,
66
67 .get_gdb_reg_list = armv4_5_get_gdb_reg_list,
68
69 .read_memory = arm720t_read_memory,
70 .write_memory = arm720t_write_memory,
71 .bulk_write_memory = arm7_9_bulk_write_memory,
72
73 .run_algorithm = armv4_5_run_algorithm,
74
75 .add_breakpoint = arm7_9_add_breakpoint,
76 .remove_breakpoint = arm7_9_remove_breakpoint,
77 .add_watchpoint = arm7_9_add_watchpoint,
78 .remove_watchpoint = arm7_9_remove_watchpoint,
79
80 .register_commands = arm720t_register_commands,
81 .target_command = arm720t_target_command,
82 .init_target = arm720t_init_target,
83 .quit = arm720t_quit
84 };
85
86 int arm720t_scan_cp15(target_t *target, u32 out, u32 *in, int instruction, int clock)
87 {
88 armv4_5_common_t *armv4_5 = target->arch_info;
89 arm7_9_common_t *arm7_9 = armv4_5->arch_info;
90 arm_jtag_t *jtag_info = &arm7_9->jtag_info;
91 scan_field_t fields[2];
92 u8 out_buf[4];
93 u8 instruction_buf = instruction;
94
95 out = flip_u32(out, 32);
96 buf_set_u32(out_buf, 0, 32, out);
97
98 jtag_add_end_state(TAP_PD);
99 arm_jtag_scann(jtag_info, 0xf);
100 arm_jtag_set_instr(jtag_info, jtag_info->intest_instr);
101
102 fields[0].device = jtag_info->chain_pos;
103 fields[0].num_bits = 1;
104 fields[0].out_value = &instruction_buf;
105 fields[0].out_mask = NULL;
106 fields[0].in_value = NULL;
107 fields[0].in_check_value = NULL;
108 fields[0].in_check_mask = NULL;
109 fields[0].in_handler = NULL;
110 fields[0].in_handler_priv = NULL;
111
112 fields[1].device = jtag_info->chain_pos;
113 fields[1].num_bits = 32;
114 fields[1].out_value = out_buf;
115 fields[1].out_mask = NULL;
116 if (in)
117 {
118 fields[1].in_value = (u8*)in;
119 fields[1].in_handler = arm_jtag_buf_to_u32_flip;
120 fields[1].in_handler_priv = in;
121 } else
122 {
123 fields[1].in_value = NULL;
124 fields[1].in_handler = NULL;
125 fields[1].in_handler_priv = NULL;
126 }
127 fields[1].in_check_value = NULL;
128 fields[1].in_check_mask = NULL;
129
130 jtag_add_dr_scan(2, fields, -1);
131
132 if (clock)
133 jtag_add_runtest(0, -1);
134
135 #ifdef _DEBUG_INSTRUCTION_EXECUTION_
136 jtag_execute_queue();
137
138 if (in)
139 DEBUG("out: %8.8x, in: %8.8x, instruction: %i, clock: %i", out, *in, instruction, clock);
140 else
141 DEBUG("out: %8.8x, instruction: %i, clock: %i", out, instruction, clock);
142 #else
143 DEBUG("out: %8.8x, instruction: %i, clock: %i", in, out, instruction, clock);
144 #endif
145
146 return ERROR_OK;
147 }
148
149 int arm720t_read_cp15(target_t *target, u32 opcode, u32 *value)
150 {
151 /* fetch CP15 opcode */
152 arm720t_scan_cp15(target, opcode, NULL, 1, 1);
153 /* "DECODE" stage */
154 arm720t_scan_cp15(target, ARMV4_5_NOP, NULL, 1, 1);
155 /* "EXECUTE" stage (1) */
156 arm720t_scan_cp15(target, ARMV4_5_NOP, NULL, 1, 0);
157 arm720t_scan_cp15(target, 0x0, NULL, 0, 1);
158 /* "EXECUTE" stage (2) */
159 arm720t_scan_cp15(target, 0x0, NULL, 0, 1);
160 /* "EXECUTE" stage (3), CDATA is read */
161 arm720t_scan_cp15(target, ARMV4_5_NOP, value, 1, 1);
162
163 return ERROR_OK;
164 }
165
166 int arm720t_write_cp15(target_t *target, u32 opcode, u32 value)
167 {
168 /* fetch CP15 opcode */
169 arm720t_scan_cp15(target, opcode, NULL, 1, 1);
170 /* "DECODE" stage */
171 arm720t_scan_cp15(target, ARMV4_5_NOP, NULL, 1, 1);
172 /* "EXECUTE" stage (1) */
173 arm720t_scan_cp15(target, ARMV4_5_NOP, NULL, 1, 0);
174 arm720t_scan_cp15(target, 0x0, NULL, 0, 1);
175 /* "EXECUTE" stage (2) */
176 arm720t_scan_cp15(target, value, NULL, 0, 1);
177 arm720t_scan_cp15(target, ARMV4_5_NOP, NULL, 1, 1);
178
179 return ERROR_OK;
180 }
181
182 u32 arm720t_get_ttb(target_t *target)
183 {
184 u32 ttb = 0x0;
185
186 arm720t_read_cp15(target, 0xee120f10, &ttb);
187 jtag_execute_queue();
188
189 ttb &= 0xffffc000;
190
191 return ttb;
192 }
193
194 void arm720t_disable_mmu_caches(target_t *target, int mmu, int d_u_cache, int i_cache)
195 {
196 u32 cp15_control;
197
198 /* read cp15 control register */
199 arm720t_read_cp15(target, 0xee110f10, &cp15_control);
200 jtag_execute_queue();
201
202 if (mmu)
203 cp15_control &= ~0x1U;
204
205 if (d_u_cache || i_cache)
206 cp15_control &= ~0x4U;
207
208 arm720t_write_cp15(target, 0xee010f10, cp15_control);
209 }
210
211 void arm720t_enable_mmu_caches(target_t *target, int mmu, int d_u_cache, int i_cache)
212 {
213 u32 cp15_control;
214
215 /* read cp15 control register */
216 arm720t_read_cp15(target, 0xee110f10, &cp15_control);
217 jtag_execute_queue();
218
219 if (mmu)
220 cp15_control |= 0x1U;
221
222 if (d_u_cache || i_cache)
223 cp15_control |= 0x4U;
224
225 arm720t_write_cp15(target, 0xee010f10, cp15_control);
226 }
227
228 void arm720t_post_debug_entry(target_t *target)
229 {
230 armv4_5_common_t *armv4_5 = target->arch_info;
231 arm7_9_common_t *arm7_9 = armv4_5->arch_info;
232 arm7tdmi_common_t *arm7tdmi = arm7_9->arch_info;
233 arm720t_common_t *arm720t = arm7tdmi->arch_info;
234
235 /* examine cp15 control reg */
236 arm720t_read_cp15(target, 0xee110f10, &arm720t->cp15_control_reg);
237 jtag_execute_queue();
238 DEBUG("cp15_control_reg: %8.8x", arm720t->cp15_control_reg);
239
240 arm720t->armv4_5_mmu.mmu_enabled = (arm720t->cp15_control_reg & 0x1U) ? 1 : 0;
241 arm720t->armv4_5_mmu.armv4_5_cache.d_u_cache_enabled = (arm720t->cp15_control_reg & 0x4U) ? 1 : 0;
242 arm720t->armv4_5_mmu.armv4_5_cache.i_cache_enabled = 0;
243
244 /* save i/d fault status and address register */
245 arm720t_read_cp15(target, 0xee150f10, &arm720t->fsr);
246 arm720t_read_cp15(target, 0xee160f10, &arm720t->far);
247 jtag_execute_queue();
248 }
249
250 void arm720t_pre_restore_context(target_t *target)
251 {
252 armv4_5_common_t *armv4_5 = target->arch_info;
253 arm7_9_common_t *arm7_9 = armv4_5->arch_info;
254 arm7tdmi_common_t *arm7tdmi = arm7_9->arch_info;
255 arm720t_common_t *arm720t = arm7tdmi->arch_info;
256
257 /* restore i/d fault status and address register */
258 arm720t_write_cp15(target, 0xee050f10, arm720t->fsr);
259 arm720t_write_cp15(target, 0xee060f10, arm720t->far);
260 }
261
262 int arm720t_get_arch_pointers(target_t *target, armv4_5_common_t **armv4_5_p, arm7_9_common_t **arm7_9_p, arm7tdmi_common_t **arm7tdmi_p, arm720t_common_t **arm720t_p)
263 {
264 armv4_5_common_t *armv4_5 = target->arch_info;
265 arm7_9_common_t *arm7_9;
266 arm7tdmi_common_t *arm7tdmi;
267 arm720t_common_t *arm720t;
268
269 if (armv4_5->common_magic != ARMV4_5_COMMON_MAGIC)
270 {
271 return -1;
272 }
273
274 arm7_9 = armv4_5->arch_info;
275 if (arm7_9->common_magic != ARM7_9_COMMON_MAGIC)
276 {
277 return -1;
278 }
279
280 arm7tdmi = arm7_9->arch_info;
281 if (arm7tdmi->common_magic != ARM7TDMI_COMMON_MAGIC)
282 {
283 return -1;
284 }
285
286 arm720t = arm7tdmi->arch_info;
287 if (arm720t->common_magic != ARM720T_COMMON_MAGIC)
288 {
289 return -1;
290 }
291
292 *armv4_5_p = armv4_5;
293 *arm7_9_p = arm7_9;
294 *arm7tdmi_p = arm7tdmi;
295 *arm720t_p = arm720t;
296
297 return ERROR_OK;
298 }
299
300 int arm720t_arch_state(struct target_s *target, char *buf, int buf_size)
301 {
302 armv4_5_common_t *armv4_5 = target->arch_info;
303 arm7_9_common_t *arm7_9 = armv4_5->arch_info;
304 arm7tdmi_common_t *arm7tdmi = arm7_9->arch_info;
305 arm720t_common_t *arm720t = arm7tdmi->arch_info;
306
307 char *state[] =
308 {
309 "disabled", "enabled"
310 };
311
312 if (armv4_5->common_magic != ARMV4_5_COMMON_MAGIC)
313 {
314 ERROR("BUG: called for a non-ARMv4/5 target");
315 exit(-1);
316 }
317
318 snprintf(buf, buf_size,
319 "target halted in %s state due to %s, current mode: %s\n"
320 "cpsr: 0x%8.8x pc: 0x%8.8x\n"
321 "MMU: %s, Cache: %s",
322 armv4_5_state_strings[armv4_5->core_state],
323 target_debug_reason_strings[target->debug_reason],
324 armv4_5_mode_strings[armv4_5_mode_to_number(armv4_5->core_mode)],
325 buf_get_u32(armv4_5->core_cache->reg_list[ARMV4_5_CPSR].value, 0, 32),
326 buf_get_u32(armv4_5->core_cache->reg_list[15].value, 0, 32),
327 state[arm720t->armv4_5_mmu.mmu_enabled],
328 state[arm720t->armv4_5_mmu.armv4_5_cache.d_u_cache_enabled]);
329
330 return ERROR_OK;
331 }
332
333 int arm720t_read_memory(struct target_s *target, u32 address, u32 size, u32 count, u8 *buffer)
334 {
335 int retval;
336 armv4_5_common_t *armv4_5 = target->arch_info;
337 arm7_9_common_t *arm7_9 = armv4_5->arch_info;
338 arm7tdmi_common_t *arm7tdmi = arm7_9->arch_info;
339 arm720t_common_t *arm720t = arm7tdmi->arch_info;
340
341 /* disable cache, but leave MMU enabled */
342 if (arm720t->armv4_5_mmu.armv4_5_cache.d_u_cache_enabled)
343 arm720t_disable_mmu_caches(target, 0, 1, 0);
344
345 retval = arm7_9_read_memory(target, address, size, count, buffer);
346
347 if (arm720t->armv4_5_mmu.armv4_5_cache.d_u_cache_enabled)
348 arm720t_enable_mmu_caches(target, 0, 1, 0);
349
350 return retval;
351 }
352
353 int arm720t_write_memory(struct target_s *target, u32 address, u32 size, u32 count, u8 *buffer)
354 {
355 int retval;
356
357 if ((retval = arm7_9_write_memory(target, address, size, count, buffer)) != ERROR_OK)
358 return retval;
359
360 return retval;
361 }
362
363 int arm720t_soft_reset_halt(struct target_s *target)
364 {
365 armv4_5_common_t *armv4_5 = target->arch_info;
366 arm7_9_common_t *arm7_9 = armv4_5->arch_info;
367 arm7tdmi_common_t *arm7tdmi = arm7_9->arch_info;
368 arm720t_common_t *arm720t = arm7tdmi->arch_info;
369 reg_t *dbg_stat = &arm7_9->eice_cache->reg_list[EICE_DBG_STAT];
370
371 if (target->state == TARGET_RUNNING)
372 {
373 target->type->halt(target);
374 }
375
376 while (buf_get_u32(dbg_stat->value, EICE_DBG_CONTROL_DBGACK, 1) == 0)
377 {
378 embeddedice_read_reg(dbg_stat);
379 jtag_execute_queue();
380 }
381
382 target->state = TARGET_HALTED;
383
384 /* SVC, ARM state, IRQ and FIQ disabled */
385 buf_set_u32(armv4_5->core_cache->reg_list[ARMV4_5_CPSR].value, 0, 8, 0xd3);
386 armv4_5->core_cache->reg_list[ARMV4_5_CPSR].dirty = 1;
387 armv4_5->core_cache->reg_list[ARMV4_5_CPSR].valid = 1;
388
389 /* start fetching from 0x0 */
390 buf_set_u32(armv4_5->core_cache->reg_list[15].value, 0, 32, 0x0);
391 armv4_5->core_cache->reg_list[15].dirty = 1;
392 armv4_5->core_cache->reg_list[15].valid = 1;
393
394 armv4_5->core_mode = ARMV4_5_MODE_SVC;
395 armv4_5->core_state = ARMV4_5_STATE_ARM;
396
397 arm720t_disable_mmu_caches(target, 1, 1, 1);
398 arm720t->armv4_5_mmu.mmu_enabled = 0;
399 arm720t->armv4_5_mmu.armv4_5_cache.d_u_cache_enabled = 0;
400 arm720t->armv4_5_mmu.armv4_5_cache.i_cache_enabled = 0;
401
402 target_call_event_callbacks(target, TARGET_EVENT_HALTED);
403
404 return ERROR_OK;
405 }
406
407 int arm720t_init_target(struct command_context_s *cmd_ctx, struct target_s *target)
408 {
409 arm7tdmi_init_target(cmd_ctx, target);
410
411 return ERROR_OK;
412
413 }
414
415 int arm720t_quit()
416 {
417
418 return ERROR_OK;
419 }
420
421 int arm720t_init_arch_info(target_t *target, arm720t_common_t *arm720t, int chain_pos, char *variant)
422 {
423 arm7tdmi_common_t *arm7tdmi = &arm720t->arm7tdmi_common;
424 arm7_9_common_t *arm7_9 = &arm7tdmi->arm7_9_common;
425
426 arm7tdmi_init_arch_info(target, arm7tdmi, chain_pos, variant);
427
428 arm7tdmi->arch_info = arm720t;
429 arm720t->common_magic = ARM720T_COMMON_MAGIC;
430
431 arm7_9->post_debug_entry = arm720t_post_debug_entry;
432 arm7_9->pre_restore_context = arm720t_pre_restore_context;
433
434 arm720t->armv4_5_mmu.armv4_5_cache.ctype = -1;
435 arm720t->armv4_5_mmu.get_ttb = arm720t_get_ttb;
436 arm720t->armv4_5_mmu.read_memory = arm7_9_read_memory;
437 arm720t->armv4_5_mmu.write_memory = arm7_9_write_memory;
438 arm720t->armv4_5_mmu.disable_mmu_caches = arm720t_disable_mmu_caches;
439 arm720t->armv4_5_mmu.enable_mmu_caches = arm720t_enable_mmu_caches;
440 arm720t->armv4_5_mmu.has_tiny_pages = 0;
441 arm720t->armv4_5_mmu.mmu_enabled = 0;
442
443 return ERROR_OK;
444 }
445
446 int arm720t_target_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct target_s *target)
447 {
448 int chain_pos;
449 char *variant = NULL;
450 arm720t_common_t *arm720t = malloc(sizeof(arm720t_common_t));
451
452 if (argc < 4)
453 {
454 ERROR("'target arm720t' requires at least one additional argument");
455 exit(-1);
456 }
457
458 chain_pos = strtoul(args[3], NULL, 0);
459
460 if (argc >= 5)
461 variant = args[4];
462
463 DEBUG("chain_pos: %i, variant: %s", chain_pos, variant);
464
465 arm720t_init_arch_info(target, arm720t, chain_pos, variant);
466
467 return ERROR_OK;
468 }
469
470 int arm720t_register_commands(struct command_context_s *cmd_ctx)
471 {
472 int retval;
473 command_t *arm720t_cmd;
474
475
476 retval = arm7tdmi_register_commands(cmd_ctx);
477
478 arm720t_cmd = register_command(cmd_ctx, NULL, "arm720t", NULL, COMMAND_ANY, "arm720t specific commands");
479
480 register_command(cmd_ctx, arm720t_cmd, "cp15", arm720t_handle_cp15_command, COMMAND_EXEC, "display/modify cp15 register <opcode> [value]");
481 register_command(cmd_ctx, arm720t_cmd, "virt2phys", arm720t_handle_virt2phys_command, COMMAND_EXEC, "translate va to pa <va>");
482
483 register_command(cmd_ctx, arm720t_cmd, "mdw_phys", arm720t_handle_md_phys_command, COMMAND_EXEC, "display memory words <physical addr> [count]");
484 register_command(cmd_ctx, arm720t_cmd, "mdh_phys", arm720t_handle_md_phys_command, COMMAND_EXEC, "display memory half-words <physical addr> [count]");
485 register_command(cmd_ctx, arm720t_cmd, "mdb_phys", arm720t_handle_md_phys_command, COMMAND_EXEC, "display memory bytes <physical addr> [count]");
486
487 register_command(cmd_ctx, arm720t_cmd, "mww_phys", arm720t_handle_mw_phys_command, COMMAND_EXEC, "write memory word <physical addr> <value>");
488 register_command(cmd_ctx, arm720t_cmd, "mwh_phys", arm720t_handle_mw_phys_command, COMMAND_EXEC, "write memory half-word <physical addr> <value>");
489 register_command(cmd_ctx, arm720t_cmd, "mwb_phys", arm720t_handle_mw_phys_command, COMMAND_EXEC, "write memory byte <physical addr> <value>");
490
491 return ERROR_OK;
492 }
493
494 int arm720t_handle_cp15_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
495 {
496 int retval;
497 target_t *target = get_current_target(cmd_ctx);
498 armv4_5_common_t *armv4_5;
499 arm7_9_common_t *arm7_9;
500 arm7tdmi_common_t *arm7tdmi;
501 arm720t_common_t *arm720t;
502 arm_jtag_t *jtag_info;
503
504 if (arm720t_get_arch_pointers(target, &armv4_5, &arm7_9, &arm7tdmi, &arm720t) != ERROR_OK)
505 {
506 command_print(cmd_ctx, "current target isn't an ARM720t target");
507 return ERROR_OK;
508 }
509
510 jtag_info = &arm7_9->jtag_info;
511
512 if (target->state != TARGET_HALTED)
513 {
514 command_print(cmd_ctx, "target must be stopped for \"%s\" command", cmd);
515 return ERROR_OK;
516 }
517
518 /* one or more argument, access a single register (write if second argument is given */
519 if (argc >= 1)
520 {
521 u32 opcode = strtoul(args[0], NULL, 0);
522
523 if (argc == 1)
524 {
525 u32 value;
526 if ((retval = arm720t_read_cp15(target, opcode, &value)) != ERROR_OK)
527 {
528 command_print(cmd_ctx, "couldn't access cp15 with opcode 0x%8.8x", opcode);
529 return ERROR_OK;
530 }
531 jtag_execute_queue();
532
533 command_print(cmd_ctx, "0x%8.8x: 0x%8.8x", opcode, value);
534 }
535 else if (argc == 2)
536 {
537 u32 value = strtoul(args[1], NULL, 0);
538 if ((retval = arm720t_write_cp15(target, opcode, value)) != ERROR_OK)
539 {
540 command_print(cmd_ctx, "couldn't access cp15 with opcode 0x%8.8x", opcode);
541 return ERROR_OK;
542 }
543 command_print(cmd_ctx, "0x%8.8x: 0x%8.8x", opcode, value);
544 }
545 }
546
547 return ERROR_OK;
548 }
549
550 int arm720t_handle_virt2phys_command(command_context_t *cmd_ctx, char *cmd, char **args, int argc)
551 {
552 target_t *target = get_current_target(cmd_ctx);
553 armv4_5_common_t *armv4_5;
554 arm7_9_common_t *arm7_9;
555 arm7tdmi_common_t *arm7tdmi;
556 arm720t_common_t *arm720t;
557 arm_jtag_t *jtag_info;
558
559 if (arm720t_get_arch_pointers(target, &armv4_5, &arm7_9, &arm7tdmi, &arm720t) != ERROR_OK)
560 {
561 command_print(cmd_ctx, "current target isn't an ARM720t target");
562 return ERROR_OK;
563 }
564
565 jtag_info = &arm7_9->jtag_info;
566
567 if (target->state != TARGET_HALTED)
568 {
569 command_print(cmd_ctx, "target must be stopped for \"%s\" command", cmd);
570 return ERROR_OK;
571 }
572
573 return armv4_5_mmu_handle_virt2phys_command(cmd_ctx, cmd, args, argc, target, &arm720t->armv4_5_mmu);
574 }
575
576 int arm720t_handle_md_phys_command(command_context_t *cmd_ctx, char *cmd, char **args, int argc)
577 {
578 target_t *target = get_current_target(cmd_ctx);
579 armv4_5_common_t *armv4_5;
580 arm7_9_common_t *arm7_9;
581 arm7tdmi_common_t *arm7tdmi;
582 arm720t_common_t *arm720t;
583 arm_jtag_t *jtag_info;
584
585 if (arm720t_get_arch_pointers(target, &armv4_5, &arm7_9, &arm7tdmi, &arm720t) != ERROR_OK)
586 {
587 command_print(cmd_ctx, "current target isn't an ARM720t target");
588 return ERROR_OK;
589 }
590
591 jtag_info = &arm7_9->jtag_info;
592
593 if (target->state != TARGET_HALTED)
594 {
595 command_print(cmd_ctx, "target must be stopped for \"%s\" command", cmd);
596 return ERROR_OK;
597 }
598
599 return armv4_5_mmu_handle_md_phys_command(cmd_ctx, cmd, args, argc, target, &arm720t->armv4_5_mmu);
600 }
601
602 int arm720t_handle_mw_phys_command(command_context_t *cmd_ctx, char *cmd, char **args, int argc)
603 {
604 target_t *target = get_current_target(cmd_ctx);
605 armv4_5_common_t *armv4_5;
606 arm7_9_common_t *arm7_9;
607 arm7tdmi_common_t *arm7tdmi;
608 arm720t_common_t *arm720t;
609 arm_jtag_t *jtag_info;
610
611 if (arm720t_get_arch_pointers(target, &armv4_5, &arm7_9, &arm7tdmi, &arm720t) != ERROR_OK)
612 {
613 command_print(cmd_ctx, "current target isn't an ARM720t target");
614 return ERROR_OK;
615 }
616
617 jtag_info = &arm7_9->jtag_info;
618
619 if (target->state != TARGET_HALTED)
620 {
621 command_print(cmd_ctx, "target must be stopped for \"%s\" command", cmd);
622 return ERROR_OK;
623 }
624
625 return armv4_5_mmu_handle_mw_phys_command(cmd_ctx, cmd, args, argc, target, &arm720t->armv4_5_mmu);
626 }
627

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)