1 /***************************************************************************
2 * Copyright (C) 2005 by Dominic Rath *
3 * Dominic.Rath@gmx.de *
5 * Copyright (C) 2006 by Magnus Lundin *
8 * Copyright (C) 2008 by Spencer Oliver *
9 * spen@spen-soft.co.uk *
11 * Copyright (C) 2009 by Dirk Behme *
12 * dirk.behme@gmail.com - copy from cortex_m3 *
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. *
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. *
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 ***************************************************************************/
36 extern char* cortex_a8_state_strings
[];
38 #define CORTEX_A8_COMMON_MAGIC 0x411fc082
40 #define CPUID 0x54011D00
41 /* Debug Control Block */
42 #define DCB_DHCSR 0x54011DF0
43 #define DCB_DCRSR 0x54011DF4
44 #define DCB_DCRDR 0x54011DF8
45 #define DCB_DEMCR 0x54011DFC
47 typedef struct cortex_a8_fp_comparator_s
52 uint32_t fpcr_address
;
53 } cortex_a8_fp_comparator_t
;
55 typedef struct cortex_a8_dwt_comparator_s
61 uint32_t dwt_comparator_address
;
62 } cortex_a8_dwt_comparator_t
;
64 typedef struct cortex_a8_common_s
69 /* Context information */
71 uint32_t nvic_dfsr
; /* Debug Fault Status Register - shows reason for debug halt */
72 uint32_t nvic_icsr
; /* Interrupt Control State Register - shows active and pending IRQ */
74 /* Flash Patch and Breakpoint (FPB) */
77 int fp_code_available
;
80 cortex_a8_fp_comparator_t
*fp_comparator_list
;
82 /* Data Watchpoint and Trace (DWT) */
84 int dwt_comp_available
;
85 cortex_a8_dwt_comparator_t
*dwt_comparator_list
;
89 uint32_t *intsetenable
;
91 armv7m_common_t armv7m
;
95 extern int cortex_a8_init_arch_info(target_t
*target
, cortex_a8_common_t
*cortex_a8
, jtag_tap_t
*tap
);
96 int cortex_a8_read_memory(struct target_s
*target
, uint32_t address
, uint32_t size
, uint32_t count
, uint8_t *buffer
);
97 int cortex_a8_write_memory(struct target_s
*target
, uint32_t address
, uint32_t size
, uint32_t count
, uint8_t *buffer
);
99 #endif /* CORTEX_A8_H */