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 ***************************************************************************/
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
47 struct aarch64_common
{
50 /* Context information */
53 uint32_t system_control_reg
;
54 uint32_t system_control_reg_curr
;
56 enum arm_mode curr_mode
;
59 /* Breakpoint register pairs */
62 int brp_num_available
;
63 struct aarch64_brp
*brp_list
;
65 /* Use aarch64_read_regs_through_mem for fast register reads */
68 struct armv8_common armv8_common
;
72 static inline struct aarch64_common
*
73 target_to_aarch64(struct target
*target
)
75 return container_of(target
->arch_info
, struct aarch64_common
, armv8_common
.arm
);
78 #endif /* AARCH64_H */