trc_pkt_types_etmv3.h
Go to the documentation of this file.
/*
* \file trc_pkt_types_etmv3.h
* \brief OpenCSD :
*
* \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_ETM3_PKT_TYPES_ETMV3_H_INCLUDED
#define ARM_TRC_ETM3_PKT_TYPES_ETMV3_H_INCLUDED
#include "opencsd/trc_pkt_types.h"
typedef enum _ocsd_etmv3_pkt_type
{
// markers for unknown packets
ETM3_PKT_NOERROR,
ETM3_PKT_NOTSYNC,
ETM3_PKT_INCOMPLETE_EOT,
// markers for valid packets
ETM3_PKT_BRANCH_ADDRESS,
ETM3_PKT_A_SYNC,
ETM3_PKT_CYCLE_COUNT,
ETM3_PKT_I_SYNC,
ETM3_PKT_I_SYNC_CYCLE,
ETM3_PKT_TRIGGER,
ETM3_PKT_P_HDR,
ETM3_PKT_STORE_FAIL,
ETM3_PKT_OOO_DATA,
ETM3_PKT_OOO_ADDR_PLC,
ETM3_PKT_NORM_DATA,
ETM3_PKT_DATA_SUPPRESSED,
ETM3_PKT_VAL_NOT_TRACED,
ETM3_PKT_IGNORE,
ETM3_PKT_CONTEXT_ID,
ETM3_PKT_VMID,
ETM3_PKT_EXCEPTION_ENTRY,
ETM3_PKT_EXCEPTION_EXIT,
ETM3_PKT_TIMESTAMP,
// internal processing types
ETM3_PKT_BRANCH_OR_BYPASS_EOT,
// packet errors
ETM3_PKT_BAD_SEQUENCE,
ETM3_PKT_BAD_TRACEMODE,
ETM3_PKT_RESERVED
} ocsd_etmv3_pkt_type;
typedef struct _ocsd_etmv3_excep {
ocsd_armv7_exception type;
uint16_t number;
struct {
uint32_t present:1;
uint32_t cancel:1;
uint32_t cm_type:1;
uint32_t cm_resume:4;
uint32_t cm_irq_n:9;
} bits;
} ocsd_etmv3_excep;
typedef struct _etmv3_context_t {
struct {
uint32_t curr_alt_isa:1;
uint32_t curr_NS:1;
uint32_t curr_Hyp:1;
uint32_t updated:1;
uint32_t updated_c:1;
uint32_t updated_v:1;
};
uint32_t ctxtID;
uint8_t VMID;
} etmv3_context_t;
typedef struct _etmv3_data_t {
uint32_t value;
ocsd_pkt_vaddr addr;
struct {
uint32_t ooo_tag:2;
uint32_t be:1;
uint32_t update_be:1;
uint32_t update_addr:1;
uint32_t update_dval:1;
};
} etmv3_data_t;
typedef struct _etmv3_isync_t {
ocsd_iSync_reason reason;
struct {
uint32_t has_cycle_count:1;
uint32_t has_LSipAddress:1;
uint32_t no_address:1;
};
} etmv3_isync_t;
typedef struct _ocsd_etmv3_pkt
{
ocsd_etmv3_pkt_type type;
ocsd_isa curr_isa;
ocsd_isa prev_isa;
etmv3_context_t context;
ocsd_pkt_vaddr addr;
etmv3_isync_t isync_info;
ocsd_etmv3_excep exception;
ocsd_pkt_atom atom;
uint8_t p_hdr_fmt;
uint32_t cycle_count;
uint64_t timestamp;
uint8_t ts_update_bits;
etmv3_data_t data;
ocsd_etmv3_pkt_type err_type;
} ocsd_etmv3_pkt;
typedef struct _ocsd_etmv3_cfg
{
uint32_t reg_idr;
uint32_t reg_ctrl;
uint32_t reg_ccer;
uint32_t reg_trc_id;
ocsd_arch_version_t arch_ver;
ocsd_core_profile_t core_prof;
} ocsd_etmv3_cfg;
#define DATA_ADDR_EXPECTED_FLAG 0x20
#endif // ARM_TRC_ETM3_PKT_TYPES_ETMV3_H_INCLUDED
/* End of File trc_pkt_types_etmv3.h */
_etmv3_data_t::update_addr
uint32_t update_addr
Definition: trc_pkt_types_etmv3.h:120
_ocsd_etmv3_pkt::prev_isa
ocsd_isa prev_isa
Definition: trc_pkt_types_etmv3.h:139
ocsd_etmv3_cfg
struct _ocsd_etmv3_cfg ocsd_etmv3_cfg
_ocsd_etmv3_pkt::exception
ocsd_etmv3_excep exception
Definition: trc_pkt_types_etmv3.h:146
ETM3_PKT_BRANCH_OR_BYPASS_EOT
Definition: trc_pkt_types_etmv3.h:76
ETM3_PKT_A_SYNC
Definition: trc_pkt_types_etmv3.h:56
ETM3_PKT_EXCEPTION_EXIT
Definition: trc_pkt_types_etmv3.h:72
ETM3_PKT_NORM_DATA
Definition: trc_pkt_types_etmv3.h:65
ETM3_PKT_INCOMPLETE_EOT
flushing incomplete/empty packet at end of trace.
Definition: trc_pkt_types_etmv3.h:52
_ocsd_etmv3_excep::bits
struct _ocsd_etmv3_excep::@1 bits
etmv3_data_t
struct _etmv3_data_t etmv3_data_t
_etmv3_context_t::curr_alt_isa
uint32_t curr_alt_isa
Definition: trc_pkt_types_etmv3.h:99
_ocsd_etmv3_cfg::arch_ver
ocsd_arch_version_t arch_ver
Definition: trc_pkt_types_etmv3.h:167
ocsd_arch_version_t
enum _ocsd_arch_version ocsd_arch_version_t
_ocsd_etmv3_pkt
Definition: trc_pkt_types_etmv3.h:134
_etmv3_data_t
Definition: trc_pkt_types_etmv3.h:111
ETM3_PKT_BAD_SEQUENCE
invalid sequence for packet type
Definition: trc_pkt_types_etmv3.h:79
ocsd_armv7_exception
enum _ocsd_armv7_exception ocsd_armv7_exception
_ocsd_etmv3_pkt::p_hdr_fmt
uint8_t p_hdr_fmt
Definition: trc_pkt_types_etmv3.h:149
_etmv3_isync_t
Definition: trc_pkt_types_etmv3.h:125
ETM3_PKT_STORE_FAIL
Definition: trc_pkt_types_etmv3.h:62
_ocsd_etmv3_cfg::reg_idr
uint32_t reg_idr
Definition: trc_pkt_types_etmv3.h:163
_etmv3_context_t
Definition: trc_pkt_types_etmv3.h:97
ETM3_PKT_TIMESTAMP
Definition: trc_pkt_types_etmv3.h:73
ETM3_PKT_VAL_NOT_TRACED
Definition: trc_pkt_types_etmv3.h:67
_ocsd_etmv3_pkt::type
ocsd_etmv3_pkt_type type
Definition: trc_pkt_types_etmv3.h:136
_ocsd_etmv3_pkt::err_type
ocsd_etmv3_pkt_type err_type
Definition: trc_pkt_types_etmv3.h:157
_etmv3_data_t::value
uint32_t value
Definition: trc_pkt_types_etmv3.h:113
_etmv3_isync_t::has_LSipAddress
uint32_t has_LSipAddress
Definition: trc_pkt_types_etmv3.h:129
_etmv3_context_t::VMID
uint8_t VMID
Definition: trc_pkt_types_etmv3.h:107
_ocsd_etmv3_excep::cm_resume
uint32_t cm_resume
Definition: trc_pkt_types_etmv3.h:92
_ocsd_etmv3_pkt::isync_info
etmv3_isync_t isync_info
Definition: trc_pkt_types_etmv3.h:144
_etmv3_data_t::update_be
uint32_t update_be
Definition: trc_pkt_types_etmv3.h:119
_ocsd_etmv3_pkt::timestamp
uint64_t timestamp
Definition: trc_pkt_types_etmv3.h:152
ETM3_PKT_P_HDR
Definition: trc_pkt_types_etmv3.h:61
_ocsd_etmv3_cfg
Definition: trc_pkt_types_etmv3.h:161
ETM3_PKT_EXCEPTION_ENTRY
Definition: trc_pkt_types_etmv3.h:71
_etmv3_data_t::ooo_tag
uint32_t ooo_tag
Definition: trc_pkt_types_etmv3.h:117
ETM3_PKT_VMID
Definition: trc_pkt_types_etmv3.h:70
_ocsd_etmv3_pkt::addr
ocsd_pkt_vaddr addr
Definition: trc_pkt_types_etmv3.h:142
_etmv3_data_t::addr
ocsd_pkt_vaddr addr
Definition: trc_pkt_types_etmv3.h:114
ETM3_PKT_OOO_DATA
Definition: trc_pkt_types_etmv3.h:63
_etmv3_context_t::curr_Hyp
uint32_t curr_Hyp
Definition: trc_pkt_types_etmv3.h:101
_ocsd_etmv3_excep::type
ocsd_armv7_exception type
Definition: trc_pkt_types_etmv3.h:86
_etmv3_isync_t::has_cycle_count
uint32_t has_cycle_count
Definition: trc_pkt_types_etmv3.h:128
_etmv3_context_t::updated
uint32_t updated
Definition: trc_pkt_types_etmv3.h:102
ETM3_PKT_DATA_SUPPRESSED
Definition: trc_pkt_types_etmv3.h:66
ocsd_etmv3_pkt_type
enum _ocsd_etmv3_pkt_type ocsd_etmv3_pkt_type
ETM3_PKT_TRIGGER
Definition: trc_pkt_types_etmv3.h:60
ocsd_etmv3_excep
struct _ocsd_etmv3_excep ocsd_etmv3_excep
_etmv3_isync_t::reason
ocsd_iSync_reason reason
Definition: trc_pkt_types_etmv3.h:126
ETM3_PKT_OOO_ADDR_PLC
Definition: trc_pkt_types_etmv3.h:64
_etmv3_context_t::updated_c
uint32_t updated_c
Definition: trc_pkt_types_etmv3.h:103
_ocsd_etmv3_cfg::reg_ccer
uint32_t reg_ccer
Definition: trc_pkt_types_etmv3.h:165
_etmv3_isync_t::no_address
uint32_t no_address
Definition: trc_pkt_types_etmv3.h:130
_etmv3_context_t::curr_NS
uint32_t curr_NS
Definition: trc_pkt_types_etmv3.h:100
ETM3_PKT_I_SYNC
Definition: trc_pkt_types_etmv3.h:58
_ocsd_etmv3_pkt::atom
ocsd_pkt_atom atom
Definition: trc_pkt_types_etmv3.h:148
_ocsd_etmv3_pkt_type
_ocsd_etmv3_pkt_type
Definition: trc_pkt_types_etmv3.h:46
_ocsd_etmv3_excep::number
uint16_t number
Definition: trc_pkt_types_etmv3.h:87
_ocsd_etmv3_excep::cm_irq_n
uint32_t cm_irq_n
Definition: trc_pkt_types_etmv3.h:93
_ocsd_etmv3_pkt::cycle_count
uint32_t cycle_count
Definition: trc_pkt_types_etmv3.h:150
_ocsd_pkt_vaddr
Definition: trc_pkt_types.h:58
_ocsd_etmv3_pkt::context
etmv3_context_t context
Definition: trc_pkt_types_etmv3.h:141
_etmv3_context_t::updated_v
uint32_t updated_v
Definition: trc_pkt_types_etmv3.h:104
ETM3_PKT_NOTSYNC
no sync found yet
Definition: trc_pkt_types_etmv3.h:51
_ocsd_etmv3_cfg::reg_ctrl
uint32_t reg_ctrl
Definition: trc_pkt_types_etmv3.h:164
ocsd_etmv3_pkt
struct _ocsd_etmv3_pkt ocsd_etmv3_pkt
etmv3_isync_t
struct _etmv3_isync_t etmv3_isync_t
_ocsd_etmv3_excep::cancel
uint32_t cancel
Definition: trc_pkt_types_etmv3.h:90
_etmv3_data_t::update_dval
uint32_t update_dval
Definition: trc_pkt_types_etmv3.h:121
_etmv3_data_t::be
uint32_t be
Definition: trc_pkt_types_etmv3.h:118
_ocsd_etmv3_excep::present
uint32_t present
Definition: trc_pkt_types_etmv3.h:89
ETM3_PKT_CONTEXT_ID
Definition: trc_pkt_types_etmv3.h:69
_etmv3_context_t::ctxtID
uint32_t ctxtID
Definition: trc_pkt_types_etmv3.h:106
_ocsd_etmv3_excep::cm_type
uint32_t cm_type
Definition: trc_pkt_types_etmv3.h:91
ETM3_PKT_CYCLE_COUNT
Definition: trc_pkt_types_etmv3.h:57
trc_pkt_types.h
OpenCSD: Common "C" types for trace packets.
ETM3_PKT_RESERVED
packet type reserved.
Definition: trc_pkt_types_etmv3.h:81
_ocsd_pkt_atom
Definition: trc_pkt_types.h:84
ocsd_iSync_reason
enum _ocsd_iSync_reason ocsd_iSync_reason
ETM3_PKT_IGNORE
Definition: trc_pkt_types_etmv3.h:68
etmv3_context_t
struct _etmv3_context_t etmv3_context_t
ETM3_PKT_BAD_TRACEMODE
invalid packet type for this trace mode.
Definition: trc_pkt_types_etmv3.h:80
_ocsd_etmv3_pkt::ts_update_bits
uint8_t ts_update_bits
Definition: trc_pkt_types_etmv3.h:153
_ocsd_etmv3_pkt::data
etmv3_data_t data
Definition: trc_pkt_types_etmv3.h:155
ocsd_isa
enum _ocsd_isa ocsd_isa
_ocsd_etmv3_excep
Definition: trc_pkt_types_etmv3.h:85
_ocsd_etmv3_pkt::curr_isa
ocsd_isa curr_isa
Definition: trc_pkt_types_etmv3.h:138
ETM3_PKT_I_SYNC_CYCLE
Definition: trc_pkt_types_etmv3.h:59
_ocsd_etmv3_cfg::reg_trc_id
uint32_t reg_trc_id
Definition: trc_pkt_types_etmv3.h:166
_ocsd_etmv3_cfg::core_prof
ocsd_core_profile_t core_prof
Definition: trc_pkt_types_etmv3.h:168
ocsd_core_profile_t
enum _ocsd_core_profile ocsd_core_profile_t
ETM3_PKT_NOERROR
no error in packet - supplimentary data.
Definition: trc_pkt_types_etmv3.h:50
ETM3_PKT_BRANCH_ADDRESS
Definition: trc_pkt_types_etmv3.h:55