OpenOCD
mips64_pracc.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  * Support for processors implementing MIPS64 instruction set
4  *
5  * Copyright (C) 2014 by Andrey Sidorov <anysidorov@gmail.com>
6  * Copyright (C) 2014 by Aleksey Kuleshov <rndfax@yandex.ru>
7  * Copyright (C) 2014-2019 by Peter Mamonov <pmamonov@gmail.com>
8  *
9  * Based on the work of:
10  * Copyright (C) 2008 by Spencer Oliver
11  * Copyright (C) 2008 by David T.L. Wong
12  * Copyright (C) 2010 by Konstantin Kostyukhin, Nikolay Shmyrev
13  */
14 
15 #ifndef OPENOCD_TARGET_MIPS64_PRACC_H
16 #define OPENOCD_TARGET_MIPS64_PRACC_H
17 
18 #include "mips_ejtag.h"
19 
20 #define MIPS64_PRACC_TEXT 0xffffffffFF200200ull
21 
22 #define MIPS64_PRACC_STACK 0xffffffffFF204000ull
23 #define MIPS64_PRACC_PARAM_IN 0xffffffffFF201000ull
24 #define MIPS64_PRACC_PARAM_IN_SIZE 0x1000
25 #define MIPS64_PRACC_PARAM_OUT (MIPS64_PRACC_PARAM_IN + MIPS64_PRACC_PARAM_IN_SIZE)
26 #define MIPS64_PRACC_PARAM_OUT_SIZE 0x1000
27 
28 #undef UPPER16
29 #undef LOWER16
30 #define UPPER16(v) ((uint32_t)((v >> 16) & 0xFFFF))
31 #define LOWER16(v) ((uint32_t)(v & 0xFFFF))
32 #define MIPS64_PRACC_FASTDATA_AREA 0xffffffffFF200000ull
33 #define MIPS64_PRACC_FASTDATA_SIZE 16
34 #define MIPS64_FASTDATA_HANDLER_SIZE 0x80
35 
36 /* FIXME: 16-bit NEG */
37 #undef NEG16
38 #define NEG16(v) ((uint32_t)(((~(v)) + 1) & 0xFFFF))
39 
40 #define MIPS64_PRACC_ADDR_STEP 4
41 #define MIPS64_PRACC_DATA_STEP 8
42 
43 int mips64_pracc_read_mem(struct mips_ejtag *ejtag_info, uint64_t addr, unsigned int size,
44  unsigned int count, void *buf);
45 int mips64_pracc_write_mem(struct mips_ejtag *ejtag_info, uint64_t addr, unsigned int size,
46  unsigned int count, void *buf);
47 
48 int mips64_pracc_read_regs(struct mips_ejtag *ejtag_info, uint64_t *regs);
49 int mips64_pracc_write_regs(struct mips_ejtag *ejtag_info, uint64_t *regs);
50 
51 int mips64_pracc_exec(struct mips_ejtag *ejtag_info,
52  unsigned int code_len, const uint32_t *code,
53  unsigned int num_param_in, uint64_t *param_in,
54  unsigned int num_param_out, uint64_t *param_out);
55 
56 int mips64_pracc_fastdata_xfer(struct mips_ejtag *ejtag_info,
57  struct working_area *source,
58  bool write_t, uint64_t addr,
59  unsigned int count, uint64_t *buf);
60 
61 #endif /* OPENOCD_TARGET_MIPS64_PRACC_H */
static const struct @109 regs[]
int mips64_pracc_write_regs(struct mips_ejtag *ejtag_info, uint64_t *regs)
Definition: mips64_pracc.c:827
int mips64_pracc_exec(struct mips_ejtag *ejtag_info, unsigned int code_len, const uint32_t *code, unsigned int num_param_in, uint64_t *param_in, unsigned int num_param_out, uint64_t *param_out)
Definition: mips64_pracc.c:211
int mips64_pracc_read_regs(struct mips_ejtag *ejtag_info, uint64_t *regs)
int mips64_pracc_read_mem(struct mips_ejtag *ejtag_info, uint64_t addr, unsigned int size, unsigned int count, void *buf)
Definition: mips64_pracc.c:549
int mips64_pracc_write_mem(struct mips_ejtag *ejtag_info, uint64_t addr, unsigned int size, unsigned int count, void *buf)
Definition: mips64_pracc.c:810
int mips64_pracc_fastdata_xfer(struct mips_ejtag *ejtag_info, struct working_area *source, bool write_t, uint64_t addr, unsigned int count, uint64_t *buf)
target_addr_t addr
Start address to search for the control block.
Definition: rtt/rtt.c:28
size_t size
Size of the control block search area.
Definition: rtt/rtt.c:30
struct rtt_source source
Definition: rtt/rtt.c:23
uint8_t count[4]
Definition: vdebug.c:22