target/xtensa: virtualize XDM registers
[openocd.git] / src / target / etb.h
blobfa75600ad687e3a80658d8b8f56185ed87cf752b
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 /***************************************************************************
4 * Copyright (C) 2007 by Dominic Rath *
5 * Dominic.Rath@gmx.de *
6 ***************************************************************************/
8 #ifndef OPENOCD_TARGET_ETB_H
9 #define OPENOCD_TARGET_ETB_H
11 /* ETB registers */
12 enum {
13 ETB_ID = 0x00,
14 ETB_RAM_DEPTH = 0x01,
15 ETB_RAM_WIDTH = 0x02,
16 ETB_STATUS = 0x03,
17 ETB_RAM_DATA = 0x04,
18 ETB_RAM_READ_POINTER = 0x05,
19 ETB_RAM_WRITE_POINTER = 0x06,
20 ETB_TRIGGER_COUNTER = 0x07,
21 ETB_CTRL = 0x08,
24 struct etb {
25 struct etm_context *etm_ctx;
26 struct jtag_tap *tap;
27 uint32_t cur_scan_chain;
28 struct reg_cache *reg_cache;
30 /* ETB parameters */
31 uint32_t ram_depth;
32 uint32_t ram_width;
34 /** how much trace buffer to fill after trigger */
35 unsigned trigger_percent;
38 struct etb_reg {
39 uint32_t addr;
40 struct etb *etb;
43 extern struct etm_capture_driver etb_capture_driver;
45 struct reg_cache *etb_build_reg_cache(struct etb *etb);
47 #endif /* OPENOCD_TARGET_ETB_H */