OpenCSD - CoreSight Trace Decode Library  0.12.1
trc_pkt_types_stm.h
Go to the documentation of this file.
1 /*
2  * \file trc_pkt_types_stm.h
3  * \brief OpenCSD : STM decoder
4  *
5  * \copyright Copyright (c) 2015, ARM Limited. All Rights Reserved.
6  */
7 
8 /*
9  * Redistribution and use in source and binary forms, with or without modification,
10  * are permitted provided that the following conditions are met:
11  *
12  * 1. Redistributions of source code must retain the above copyright notice,
13  * this list of conditions and the following disclaimer.
14  *
15  * 2. Redistributions in binary form must reproduce the above copyright notice,
16  * this list of conditions and the following disclaimer in the documentation
17  * and/or other materials provided with the distribution.
18  *
19  * 3. Neither the name of the copyright holder nor the names of its contributors
20  * may be used to endorse or promote products derived from this software without
21  * specific prior written permission.
22  *
23  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND
24  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
26  * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
27  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33  */
34 #ifndef ARM_TRC_PKT_TYPES_STM_H_INCLUDED
35 #define ARM_TRC_PKT_TYPES_STM_H_INCLUDED
36 
37 #include "opencsd/trc_pkt_types.h"
38 
49 typedef enum _ocsd_stm_pkt_type
50 {
51 /* markers for unknown packets / state*/
56 /* markers for valid packets*/
78 /* packet errors.*/
83 
88 typedef enum _ocsd_stm_ts_type
89 {
94 
100 typedef struct _ocsd_stm_pkt
101 {
104  uint8_t master;
105  uint16_t channel;
107  uint64_t timestamp;
108  uint8_t pkt_ts_bits;
109  uint8_t pkt_has_ts;
113  uint8_t pkt_has_marker;
115  union {
116  uint8_t D8;
117  uint16_t D16;
118  uint32_t D32;
119  uint64_t D64;
120  } payload;
121 
124 } ocsd_stm_pkt;
125 
131 typedef enum _hw_event_feat {
136 
137 
142 typedef struct _ocsd_stm_cfg
143 {
144  uint32_t reg_tcsr;
145  uint32_t reg_feat3r;
146  uint32_t reg_devid;
148  uint32_t reg_feat1r;
149  uint32_t reg_hwev_mast;
151 } ocsd_stm_cfg;
152 
156 #endif // ARM_TRC_PKT_TYPES_STM_H_INCLUDED
157 
158 /* End of File trc_pkt_types_stm.h */
ocsd_stm_pkt_type
enum _ocsd_stm_pkt_type ocsd_stm_pkt_type
STM_PKT_MERR
Definition: trc_pkt_types_stm.h:64
ocsd_stm_cfg
struct _ocsd_stm_cfg ocsd_stm_cfg
_ocsd_stm_pkt::D8
uint8_t D8
Definition: trc_pkt_types_stm.h:116
STM_PKT_INCOMPLETE_EOT
Definition: trc_pkt_types_stm.h:53
STM_PKT_D16
Definition: trc_pkt_types_stm.h:74
_ocsd_stm_cfg::hw_event
hw_event_feat_t hw_event
Definition: trc_pkt_types_stm.h:150
STM_PKT_D64
Definition: trc_pkt_types_stm.h:76
_ocsd_stm_pkt::channel
uint16_t channel
Definition: trc_pkt_types_stm.h:105
STM_PKT_FLAG
Definition: trc_pkt_types_stm.h:70
STM_PKT_BAD_SEQUENCE
Definition: trc_pkt_types_stm.h:79
_ocsd_stm_pkt::timestamp
uint64_t timestamp
Definition: trc_pkt_types_stm.h:107
_ocsd_stm_cfg::reg_hwev_mast
uint32_t reg_hwev_mast
Definition: trc_pkt_types_stm.h:149
_ocsd_stm_pkt::D64
uint64_t D64
Definition: trc_pkt_types_stm.h:119
STM_PKT_D8
Definition: trc_pkt_types_stm.h:73
STM_PKT_C8
Definition: trc_pkt_types_stm.h:67
_ocsd_stm_pkt::err_type
ocsd_stm_pkt_type err_type
Definition: trc_pkt_types_stm.h:122
STM_PKT_NO_ERR_TYPE
Definition: trc_pkt_types_stm.h:54
STM_PKT_D32
Definition: trc_pkt_types_stm.h:75
STM_PKT_RESERVED
Definition: trc_pkt_types_stm.h:80
STM_PKT_ASYNC
Definition: trc_pkt_types_stm.h:57
_ocsd_stm_pkt::pkt_ts_bits
uint8_t pkt_ts_bits
Definition: trc_pkt_types_stm.h:108
STM_PKT_GERR
Definition: trc_pkt_types_stm.h:63
STM_PKT_NOTSYNC
Definition: trc_pkt_types_stm.h:52
_ocsd_stm_ts_type
_ocsd_stm_ts_type
Definition: trc_pkt_types_stm.h:88
_ocsd_stm_cfg::reg_tcsr
uint32_t reg_tcsr
Definition: trc_pkt_types_stm.h:144
STM_PKT_D4
Definition: trc_pkt_types_stm.h:72
_ocsd_stm_pkt::ts_type
ocsd_stm_ts_type ts_type
Definition: trc_pkt_types_stm.h:111
STM_PKT_C16
Definition: trc_pkt_types_stm.h:68
_ocsd_stm_pkt
Definition: trc_pkt_types_stm.h:100
_ocsd_stm_pkt::pkt_has_ts
uint8_t pkt_has_ts
Definition: trc_pkt_types_stm.h:109
_ocsd_stm_cfg::reg_feat3r
uint32_t reg_feat3r
Definition: trc_pkt_types_stm.h:145
HwEvent_UseRegisters
Definition: trc_pkt_types_stm.h:134
HwEvent_Unknown_Disabled
Definition: trc_pkt_types_stm.h:132
_ocsd_stm_cfg::reg_feat1r
uint32_t reg_feat1r
Definition: trc_pkt_types_stm.h:148
_ocsd_stm_pkt_type
_ocsd_stm_pkt_type
Definition: trc_pkt_types_stm.h:49
STM_PKT_NULL
Definition: trc_pkt_types_stm.h:60
STM_TS_UNKNOWN
Definition: trc_pkt_types_stm.h:90
STM_PKT_M8
Definition: trc_pkt_types_stm.h:66
trc_pkt_types.h
OpenCSD: Common "C" types for trace packets.
_ocsd_stm_pkt::master
uint8_t master
Definition: trc_pkt_types_stm.h:104
STM_TS_GREY
Definition: trc_pkt_types_stm.h:92
_ocsd_stm_pkt::D16
uint16_t D16
Definition: trc_pkt_types_stm.h:117
STM_PKT_VERSION
Definition: trc_pkt_types_stm.h:58
_ocsd_stm_pkt::D32
uint32_t D32
Definition: trc_pkt_types_stm.h:118
_ocsd_stm_pkt::payload
union _ocsd_stm_pkt::@28 payload
_ocsd_stm_pkt::type
ocsd_stm_pkt_type type
Definition: trc_pkt_types_stm.h:102
HwEvent_Enabled
Definition: trc_pkt_types_stm.h:133
hw_event_feat_t
enum _hw_event_feat hw_event_feat_t
_ocsd_stm_pkt::pkt_has_marker
uint8_t pkt_has_marker
Definition: trc_pkt_types_stm.h:113
ocsd_stm_pkt
struct _ocsd_stm_pkt ocsd_stm_pkt
ocsd_stm_ts_type
enum _ocsd_stm_ts_type ocsd_stm_ts_type
_ocsd_stm_cfg::reg_devid
uint32_t reg_devid
Definition: trc_pkt_types_stm.h:146
_hw_event_feat
_hw_event_feat
Definition: trc_pkt_types_stm.h:131
STM_PKT_FREQ
Definition: trc_pkt_types_stm.h:59
STM_PKT_TRIG
Definition: trc_pkt_types_stm.h:61
_ocsd_stm_cfg
Definition: trc_pkt_types_stm.h:142
STM_TS_NATBINARY
Definition: trc_pkt_types_stm.h:91