OpenCSD - CoreSight Trace Decode Library
0.14.4
include
opencsd
stm
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*/
52
STM_PKT_NOTSYNC
,
53
STM_PKT_INCOMPLETE_EOT
,
54
STM_PKT_NO_ERR_TYPE
,
56
/* markers for valid packets*/
57
STM_PKT_ASYNC
,
58
STM_PKT_VERSION
,
59
STM_PKT_FREQ
,
60
STM_PKT_NULL
,
61
STM_PKT_TRIG
,
63
STM_PKT_GERR
,
64
STM_PKT_MERR
,
66
STM_PKT_M8
,
67
STM_PKT_C8
,
68
STM_PKT_C16
,
70
STM_PKT_FLAG
,
72
STM_PKT_D4
,
73
STM_PKT_D8
,
74
STM_PKT_D16
,
75
STM_PKT_D32
,
76
STM_PKT_D64
,
78
/* packet errors.*/
79
STM_PKT_BAD_SEQUENCE
,
80
STM_PKT_RESERVED
,
82
}
ocsd_stm_pkt_type
;
83
88
typedef
enum
_ocsd_stm_ts_type
89
{
90
STM_TS_UNKNOWN
,
91
STM_TS_NATBINARY
,
92
STM_TS_GREY
93
}
ocsd_stm_ts_type
;
94
100
typedef
struct
_ocsd_stm_pkt
101
{
102
ocsd_stm_pkt_type
type
;
104
uint8_t
master
;
105
uint16_t
channel
;
107
uint64_t
timestamp
;
108
uint8_t
pkt_ts_bits
;
109
uint8_t
pkt_has_ts
;
111
ocsd_stm_ts_type
ts_type
;
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
122
ocsd_stm_pkt_type
err_type
;
124
}
ocsd_stm_pkt
;
125
131
typedef
enum
_hw_event_feat
{
132
HwEvent_Unknown_Disabled
,
133
HwEvent_Enabled
,
134
HwEvent_UseRegisters
135
}
hw_event_feat_t
;
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
;
150
hw_event_feat_t
hw_event
;
151
}
ocsd_stm_cfg
;
152
156
#endif // ARM_TRC_PKT_TYPES_STM_H_INCLUDED
157
158
/* End of File trc_pkt_types_stm.h */
STM_PKT_MERR
@ STM_PKT_MERR
Definition:
trc_pkt_types_stm.h:64
ocsd_stm_pkt
struct _ocsd_stm_pkt ocsd_stm_pkt
_ocsd_stm_pkt::D8
uint8_t D8
Definition:
trc_pkt_types_stm.h:116
STM_PKT_INCOMPLETE_EOT
@ STM_PKT_INCOMPLETE_EOT
Definition:
trc_pkt_types_stm.h:53
STM_PKT_D16
@ 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
@ 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
@ STM_PKT_FLAG
Definition:
trc_pkt_types_stm.h:70
STM_PKT_BAD_SEQUENCE
@ 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
@ STM_PKT_D8
Definition:
trc_pkt_types_stm.h:73
STM_PKT_C8
@ 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
_ocsd_stm_pkt::payload
union _ocsd_stm_pkt::@28 payload
STM_PKT_NO_ERR_TYPE
@ STM_PKT_NO_ERR_TYPE
Definition:
trc_pkt_types_stm.h:54
ocsd_stm_cfg
struct _ocsd_stm_cfg ocsd_stm_cfg
STM_PKT_D32
@ STM_PKT_D32
Definition:
trc_pkt_types_stm.h:75
STM_PKT_RESERVED
@ STM_PKT_RESERVED
Definition:
trc_pkt_types_stm.h:80
STM_PKT_ASYNC
@ 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
@ STM_PKT_GERR
Definition:
trc_pkt_types_stm.h:63
STM_PKT_NOTSYNC
@ STM_PKT_NOTSYNC
Definition:
trc_pkt_types_stm.h:52
_ocsd_stm_ts_type
_ocsd_stm_ts_type
Definition:
trc_pkt_types_stm.h:89
_ocsd_stm_cfg::reg_tcsr
uint32_t reg_tcsr
Definition:
trc_pkt_types_stm.h:144
STM_PKT_D4
@ 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
@ STM_PKT_C16
Definition:
trc_pkt_types_stm.h:68
_ocsd_stm_pkt
Definition:
trc_pkt_types_stm.h:101
_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
@ HwEvent_UseRegisters
Definition:
trc_pkt_types_stm.h:134
HwEvent_Unknown_Disabled
@ 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:50
STM_PKT_NULL
@ STM_PKT_NULL
Definition:
trc_pkt_types_stm.h:60
STM_TS_UNKNOWN
@ STM_TS_UNKNOWN
Definition:
trc_pkt_types_stm.h:90
ocsd_stm_ts_type
enum _ocsd_stm_ts_type ocsd_stm_ts_type
STM_PKT_M8
@ 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
@ 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
@ 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::type
ocsd_stm_pkt_type type
Definition:
trc_pkt_types_stm.h:102
HwEvent_Enabled
@ HwEvent_Enabled
Definition:
trc_pkt_types_stm.h:133
_ocsd_stm_pkt::pkt_has_marker
uint8_t pkt_has_marker
Definition:
trc_pkt_types_stm.h:113
_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
@ STM_PKT_FREQ
Definition:
trc_pkt_types_stm.h:59
STM_PKT_TRIG
@ STM_PKT_TRIG
Definition:
trc_pkt_types_stm.h:61
hw_event_feat_t
enum _hw_event_feat hw_event_feat_t
ocsd_stm_pkt_type
enum _ocsd_stm_pkt_type ocsd_stm_pkt_type
_ocsd_stm_cfg
Definition:
trc_pkt_types_stm.h:143
STM_TS_NATBINARY
@ STM_TS_NATBINARY
Definition:
trc_pkt_types_stm.h:91
Generated on Sat Nov 21 2020 02:41:15 for OpenCSD - CoreSight Trace Decode Library by
1.8.20