~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/tools/perf/util/cs-etm-decoder/cs-etm-decoder.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * SPDX-License-Identifier: GPL-2.0
  3  *
  4  * Copyright(C) 2015-2018 Linaro Limited.
  5  *
  6  * Author: Tor Jeremiassen <tor@ti.com>
  7  * Author: Mathieu Poirier <mathieu.poirier@linaro.org>
  8  */
  9 
 10 #ifndef INCLUDE__CS_ETM_DECODER_H__
 11 #define INCLUDE__CS_ETM_DECODER_H__
 12 
 13 #include <linux/types.h>
 14 #include <opencsd/ocsd_if_types.h>
 15 #include <stdio.h>
 16 
 17 struct cs_etm_decoder;
 18 struct cs_etm_packet;
 19 struct cs_etm_packet_queue;
 20 
 21 struct cs_etm_queue;
 22 
 23 typedef u32 (*cs_etm_mem_cb_type)(struct cs_etm_queue *, u8, u64, size_t, u8 *,
 24                                   const ocsd_mem_space_acc_t);
 25 
 26 struct cs_etmv3_trace_params {
 27         u32 reg_ctrl;
 28         u32 reg_trc_id;
 29         u32 reg_ccer;
 30         u32 reg_idr;
 31 };
 32 
 33 struct cs_etmv4_trace_params {
 34         u32 reg_idr0;
 35         u32 reg_idr1;
 36         u32 reg_idr2;
 37         u32 reg_idr8;
 38         u32 reg_configr;
 39         u32 reg_traceidr;
 40 };
 41 
 42 struct cs_ete_trace_params {
 43         u32 reg_idr0;
 44         u32 reg_idr1;
 45         u32 reg_idr2;
 46         u32 reg_idr8;
 47         u32 reg_configr;
 48         u32 reg_traceidr;
 49         u32 reg_devarch;
 50 };
 51 
 52 struct cs_etm_trace_params {
 53         int protocol;
 54         union {
 55                 struct cs_etmv3_trace_params etmv3;
 56                 struct cs_etmv4_trace_params etmv4;
 57                 struct cs_ete_trace_params ete;
 58         };
 59 };
 60 
 61 struct cs_etm_decoder_params {
 62         int operation;
 63         void (*packet_printer)(const char *msg);
 64         cs_etm_mem_cb_type mem_acc_cb;
 65         bool formatted;
 66         bool fsyncs;
 67         bool hsyncs;
 68         bool frame_aligned;
 69         void *data;
 70 };
 71 
 72 /*
 73  * The following enums are indexed starting with 1 to align with the
 74  * open source coresight trace decoder library.
 75  */
 76 enum {
 77         CS_ETM_PROTO_ETMV3 = 1,
 78         CS_ETM_PROTO_ETMV4i,
 79         CS_ETM_PROTO_ETMV4d,
 80         CS_ETM_PROTO_PTM,
 81         CS_ETM_PROTO_ETE
 82 };
 83 
 84 enum cs_etm_decoder_operation {
 85         CS_ETM_OPERATION_PRINT = 1,
 86         CS_ETM_OPERATION_DECODE,
 87         CS_ETM_OPERATION_MAX,
 88 };
 89 
 90 int cs_etm_decoder__process_data_block(struct cs_etm_decoder *decoder,
 91                                        u64 indx, const u8 *buf,
 92                                        size_t len, size_t *consumed);
 93 
 94 struct cs_etm_decoder *
 95 cs_etm_decoder__new(int num_cpu,
 96                     struct cs_etm_decoder_params *d_params,
 97                     struct cs_etm_trace_params t_params[]);
 98 
 99 void cs_etm_decoder__free(struct cs_etm_decoder *decoder);
100 
101 int cs_etm_decoder__add_mem_access_cb(struct cs_etm_decoder *decoder,
102                                       u64 start, u64 end,
103                                       cs_etm_mem_cb_type cb_func);
104 
105 int cs_etm_decoder__get_packet(struct cs_etm_packet_queue *packet_queue,
106                                struct cs_etm_packet *packet);
107 
108 int cs_etm_decoder__reset(struct cs_etm_decoder *decoder);
109 const char *cs_etm_decoder__get_name(struct cs_etm_decoder *decoder);
110 
111 #endif /* INCLUDE__CS_ETM_DECODER_H__ */
112 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php