trc_pkt_types_stm.h
Go to the documentation of this file.
/*
* \file trc_pkt_types_stm.h
* \brief OpenCSD : STM decoder
*
* \copyright Copyright (c) 2015, ARM Limited. All Rights Reserved.
*/
/*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its contributors
* may be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef ARM_TRC_PKT_TYPES_STM_H_INCLUDED
#define ARM_TRC_PKT_TYPES_STM_H_INCLUDED
#include "opencsd/trc_pkt_types.h"
typedef enum _ocsd_stm_pkt_type
{
/* markers for unknown packets / state*/
STM_PKT_NOTSYNC,
STM_PKT_INCOMPLETE_EOT,
STM_PKT_NO_ERR_TYPE,
/* markers for valid packets*/
STM_PKT_ASYNC,
STM_PKT_VERSION,
STM_PKT_FREQ,
STM_PKT_NULL,
STM_PKT_TRIG,
STM_PKT_GERR,
STM_PKT_MERR,
STM_PKT_M8,
STM_PKT_C8,
STM_PKT_C16,
STM_PKT_FLAG,
STM_PKT_D4,
STM_PKT_D8,
STM_PKT_D16,
STM_PKT_D32,
STM_PKT_D64,
/* packet errors.*/
STM_PKT_BAD_SEQUENCE,
STM_PKT_RESERVED,
} ocsd_stm_pkt_type;
typedef enum _ocsd_stm_ts_type
{
STM_TS_UNKNOWN,
STM_TS_NATBINARY,
STM_TS_GREY
} ocsd_stm_ts_type;
typedef struct _ocsd_stm_pkt
{
ocsd_stm_pkt_type type;
uint8_t master;
uint16_t channel;
uint64_t timestamp;
uint8_t pkt_ts_bits;
uint8_t pkt_has_ts;
ocsd_stm_ts_type ts_type;
uint8_t pkt_has_marker;
union {
uint8_t D8;
uint16_t D16;
uint32_t D32;
uint64_t D64;
} payload;
ocsd_stm_pkt_type err_type;
} ocsd_stm_pkt;
typedef enum _hw_event_feat {
HwEvent_Unknown_Disabled,
HwEvent_Enabled,
HwEvent_UseRegisters
} hw_event_feat_t;
typedef struct _ocsd_stm_cfg
{
uint32_t reg_tcsr;
uint32_t reg_feat3r;
uint32_t reg_devid;
uint32_t reg_feat1r;
uint32_t reg_hwev_mast;
hw_event_feat_t hw_event;
} ocsd_stm_cfg;
#endif // ARM_TRC_PKT_TYPES_STM_H_INCLUDED
/* 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