at91sam9260: update sram information
[openocd/openocdswd.git] / src / target / cortex_a8.h
blob7e116e49a441a167839ad169010790e01d6eeae1
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
32 #include "armv7a.h"
34 #define CORTEX_A8_COMMON_MAGIC 0x411fc082
36 /* See Cortex-A8 TRM section 12.5 */
37 #define CPUDBG_CPUID 0xD00
38 #define CPUDBG_CTYPR 0xD04
39 #define CPUDBG_TTYPR 0xD0C
40 #define CPUDBG_LOCKACCESS 0xFB0
41 #define CPUDBG_LOCKSTATUS 0xFB4
43 #define BRP_NORMAL 0
44 #define BRP_CONTEXT 1
46 struct cortex_a8_brp
48 int used;
49 int type;
50 uint32_t value;
51 uint32_t control;
52 uint8_t BRPn;
55 struct cortex_a8_common
57 int common_magic;
58 struct arm_jtag jtag_info;
60 /* Context information */
61 uint32_t cpudbg_dscr;
63 /* Saved cp15 registers */
64 uint32_t cp15_control_reg;
66 /* Breakpoint register pairs */
67 int brp_num_context;
68 int brp_num;
69 int brp_num_available;
70 struct cortex_a8_brp *brp_list;
72 /* Use cortex_a8_read_regs_through_mem for fast register reads */
73 int fast_reg_read;
75 /* Flag that helps to resolve what ttb to use: user or kernel */
76 int current_address_mode;
78 struct armv7a_common armv7a_common;
81 static inline struct cortex_a8_common *
82 target_to_cortex_a8(struct target *target)
84 return container_of(target->arch_info, struct cortex_a8_common,
85 armv7a_common.armv4_5_common);
88 #endif /* CORTEX_A8_H */