OpenOCD
aarch64.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-or-later */
2
3
/***************************************************************************
4
* Copyright (C) 2015 by David Ung *
5
***************************************************************************/
6
7
#ifndef OPENOCD_TARGET_AARCH64_H
8
#define OPENOCD_TARGET_AARCH64_H
9
10
#include "
armv8.h
"
11
12
#define AARCH64_COMMON_MAGIC 0x41413634U
13
14
#define CPUDBG_CPUID 0xD00
15
#define CPUDBG_CTYPR 0xD04
16
#define CPUDBG_TTYPR 0xD0C
17
#define ID_AA64PFR0_EL1 0xD20
18
#define ID_AA64DFR0_EL1 0xD28
19
#define CPUDBG_LOCKACCESS 0xFB0
20
#define CPUDBG_LOCKSTATUS 0xFB4
21
22
#define BRP_NORMAL 0
23
#define BRP_CONTEXT 1
24
25
#define AARCH64_PADDRDBG_CPU_SHIFT 13
26
27
enum
aarch64_isrmasking_mode
{
28
AARCH64_ISRMASK_OFF
,
29
AARCH64_ISRMASK_ON
,
30
};
31
32
struct
aarch64_brp
{
33
int
used
;
34
int
type
;
35
target_addr_t
value
;
36
uint32_t
control
;
37
uint8_t
brpn
;
38
};
39
40
struct
aarch64_common
{
41
unsigned
int
common_magic
;
42
43
struct
armv8_common
armv8_common
;
44
45
/* Context information */
46
uint32_t
system_control_reg
;
47
uint32_t
system_control_reg_curr
;
48
49
/* Breakpoint register pairs */
50
int
brp_num_context
;
51
int
brp_num
;
52
int
brp_num_available
;
53
struct
aarch64_brp
*
brp_list
;
54
55
/* Watchpoint register pairs */
56
int
wp_num
;
57
int
wp_num_available
;
58
struct
aarch64_brp
*
wp_list
;
59
60
enum
aarch64_isrmasking_mode
isrmasking_mode
;
61
};
62
63
static
inline
struct
aarch64_common
*
64
target_to_aarch64
(
struct
target
*
target
)
65
{
66
return
container_of
(
target
->
arch_info
,
struct
aarch64_common
,
armv8_common
.
arm
);
67
}
68
69
#endif
/* OPENOCD_TARGET_AARCH64_H */
target_to_aarch64
static struct aarch64_common * target_to_aarch64(struct target *target)
Definition:
aarch64.h:64
aarch64_isrmasking_mode
aarch64_isrmasking_mode
Definition:
aarch64.h:27
AARCH64_ISRMASK_ON
@ AARCH64_ISRMASK_ON
Definition:
aarch64.h:29
AARCH64_ISRMASK_OFF
@ AARCH64_ISRMASK_OFF
Definition:
aarch64.h:28
armv8.h
aarch64_brp
Definition:
aarch64.h:32
aarch64_brp::brpn
uint8_t brpn
Definition:
aarch64.h:37
aarch64_brp::value
target_addr_t value
Definition:
aarch64.h:35
aarch64_brp::type
int type
Definition:
aarch64.h:34
aarch64_brp::control
uint32_t control
Definition:
aarch64.h:36
aarch64_brp::used
int used
Definition:
aarch64.h:33
aarch64_common
Definition:
aarch64.h:40
aarch64_common::system_control_reg
uint32_t system_control_reg
Definition:
aarch64.h:46
aarch64_common::common_magic
unsigned int common_magic
Definition:
aarch64.h:41
aarch64_common::wp_num_available
int wp_num_available
Definition:
aarch64.h:57
aarch64_common::wp_list
struct aarch64_brp * wp_list
Definition:
aarch64.h:58
aarch64_common::brp_num_available
int brp_num_available
Definition:
aarch64.h:52
aarch64_common::system_control_reg_curr
uint32_t system_control_reg_curr
Definition:
aarch64.h:47
aarch64_common::brp_num
int brp_num
Definition:
aarch64.h:51
aarch64_common::wp_num
int wp_num
Definition:
aarch64.h:56
aarch64_common::brp_list
struct aarch64_brp * brp_list
Definition:
aarch64.h:53
aarch64_common::isrmasking_mode
enum aarch64_isrmasking_mode isrmasking_mode
Definition:
aarch64.h:60
aarch64_common::brp_num_context
int brp_num_context
Definition:
aarch64.h:50
armv8_common
Definition:
armv8.h:180
armv8_common::arm
struct arm arm
Definition:
armv8.h:183
target
Definition:
target.h:120
target::arch_info
void * arch_info
Definition:
target.h:169
target_addr_t
uint64_t target_addr_t
Definition:
types.h:335
container_of
#define container_of(ptr, type, member)
Cast a member of a structure out to the containing structure.
Definition:
types.h:68
src
target
aarch64.h
Generated by
1.9.1