1 /***************************************************************************
2 * Copyright (C) 2015 by David Ung *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
14 * You should have received a copy of the GNU General Public License *
15 * along with this program; if not, write to the *
16 * Free Software Foundation, Inc., *
17 ***************************************************************************/
19 #ifndef OPENOCD_TARGET_AARCH64_H
20 #define OPENOCD_TARGET_AARCH64_H
24 #define AARCH64_COMMON_MAGIC 0x411fc082
26 #define CPUDBG_CPUID 0xD00
27 #define CPUDBG_CTYPR 0xD04
28 #define CPUDBG_TTYPR 0xD0C
29 #define ID_AA64PFR0_EL1 0xD20
30 #define ID_AA64DFR0_EL1 0xD28
31 #define CPUDBG_LOCKACCESS 0xFB0
32 #define CPUDBG_LOCKSTATUS 0xFB4
37 #define AARCH64_PADDRDBG_CPU_SHIFT 13
39 enum aarch64_isrmasking_mode
{
52 struct aarch64_common
{
55 /* Context information */
56 uint32_t system_control_reg
;
57 uint32_t system_control_reg_curr
;
59 /* Breakpoint register pairs */
62 int brp_num_available
;
63 struct aarch64_brp
*brp_list
;
65 struct armv8_common armv8_common
;
67 enum aarch64_isrmasking_mode isrmasking_mode
;
70 static inline struct aarch64_common
*
71 target_to_aarch64(struct target
*target
)
73 return container_of(target
->arch_info
, struct aarch64_common
, armv8_common
.arm
);
76 #endif /* OPENOCD_TARGET_AARCH64_H */