Loading...
Searching...
No Matches
trc_gen_elem_types.h
Go to the documentation of this file.
/*
* 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_GEN_ELEM_TYPES_H_INCLUDED
#define ARM_TRC_GEN_ELEM_TYPES_H_INCLUDED
#include "opencsd/ocsd_if_types.h"
typedef enum _ocsd_gen_trc_elem_t
{
OCSD_GEN_TRC_ELEM_UNKNOWN = 0,
OCSD_GEN_TRC_ELEM_NO_SYNC,
OCSD_GEN_TRC_ELEM_TRACE_ON,
OCSD_GEN_TRC_ELEM_EO_TRACE,
OCSD_GEN_TRC_ELEM_PE_CONTEXT,
OCSD_GEN_TRC_ELEM_INSTR_RANGE,
OCSD_GEN_TRC_ELEM_I_RANGE_NOPATH,
OCSD_GEN_TRC_ELEM_ADDR_NACC,
OCSD_GEN_TRC_ELEM_ADDR_UNKNOWN,
OCSD_GEN_TRC_ELEM_EXCEPTION,
OCSD_GEN_TRC_ELEM_EXCEPTION_RET,
OCSD_GEN_TRC_ELEM_TIMESTAMP,
OCSD_GEN_TRC_ELEM_CYCLE_COUNT,
OCSD_GEN_TRC_ELEM_EVENT,
OCSD_GEN_TRC_ELEM_SWTRACE,
OCSD_GEN_TRC_ELEM_SYNC_MARKER,
OCSD_GEN_TRC_ELEM_MEMTRANS,
OCSD_GEN_TRC_ELEM_INSTRUMENTATION,
OCSD_GEN_TRC_ELEM_CUSTOM,
} ocsd_gen_trc_elem_t;
typedef enum _trace_on_reason_t {
TRACE_ON_NORMAL = 0,
TRACE_ON_OVERFLOW,
TRACE_ON_EX_DEBUG,
} trace_on_reason_t;
typedef struct _trace_event_t {
uint16_t ev_type;
uint16_t ev_number;
} trace_event_t;
typedef enum _unsync_info_t {
UNSYNC_UNKNOWN,
UNSYNC_INIT_DECODER,
UNSYNC_RESET_DECODER,
UNSYNC_OVERFLOW,
UNSYNC_DISCARD,
UNSYNC_BAD_PACKET,
UNSYNC_BAD_IMAGE,
UNSYNC_EOT,
} unsync_info_t;
typedef enum _trace_sync_marker_t {
ELEM_MARKER_TS,
} trace_sync_marker_t;
typedef struct _trace_marker_payload_t {
trace_sync_marker_t type;
uint32_t value;
} trace_marker_payload_t;
typedef enum _memtrans_t {
OCSD_MEM_TRANS_TRACE_INIT,
OCSD_MEM_TRANS_START,
OCSD_MEM_TRANS_COMMIT,
OCSD_MEM_TRANS_FAIL,
} trace_memtrans_t;
typedef struct _sw_ite_t {
uint8_t el;
uint64_t value;
} trace_sw_ite_t;
typedef struct _ocsd_generic_trace_elem {
ocsd_gen_trc_elem_t elem_type;
ocsd_isa isa;
ocsd_vaddr_t st_addr;
ocsd_vaddr_t en_addr;
ocsd_pe_context context;
uint64_t timestamp;
uint32_t cycle_count;
ocsd_instr_type last_i_type;
ocsd_instr_subtype last_i_subtype;
union {
struct {
uint32_t last_instr_exec:1;
uint32_t last_instr_sz:3;
uint32_t has_cc:1;
uint32_t cpu_freq_change:1;
uint32_t excep_ret_addr:1;
uint32_t excep_data_marker:1;
uint32_t extended_data:1;
uint32_t has_ts:1;
uint32_t last_instr_cond:1;
uint32_t excep_ret_addr_br_tgt:1;
uint32_t excep_M_tail_chain:1;
};
uint32_t flag_bits;
};
union {
uint32_t exception_number;
trace_event_t trace_event;
trace_on_reason_t trace_on_reason;
ocsd_swt_info_t sw_trace_info;
uint32_t num_instr_range;
unsync_info_t unsync_eot_info;
trace_marker_payload_t sync_marker;
trace_memtrans_t mem_trans;
trace_sw_ite_t sw_ite;
};
const void *ptr_extended_data;
} ocsd_generic_trace_elem;
typedef enum _event_t {
EVENT_UNKNOWN = 0,
EVENT_TRIGGER,
EVENT_NUMBERED
} event_t;
#endif // ARM_TRC_GEN_ELEM_TYPES_H_INCLUDED
/* End of File opencsd/trc_gen_elem_types.h */
trace_on_reason_t
enum _trace_on_reason_t trace_on_reason_t
_memtrans_t
_memtrans_t
Definition trc_gen_elem_types.h:102
_trace_sync_marker_t
_trace_sync_marker_t
Definition trc_gen_elem_types.h:93
unsync_info_t
enum _unsync_info_t unsync_info_t
trace_sw_ite_t
struct _sw_ite_t trace_sw_ite_t
_unsync_info_t
_unsync_info_t
Definition trc_gen_elem_types.h:82
_event_t
_event_t
Definition trc_gen_elem_types.h:161
event_t
enum _event_t event_t
ocsd_generic_trace_elem
struct _ocsd_generic_trace_elem ocsd_generic_trace_elem
trace_memtrans_t
enum _memtrans_t trace_memtrans_t
trace_event_t
struct _trace_event_t trace_event_t
ocsd_gen_trc_elem_t
enum _ocsd_gen_trc_elem_t ocsd_gen_trc_elem_t
_trace_on_reason_t
_trace_on_reason_t
Definition trc_gen_elem_types.h:71
trace_marker_payload_t
struct _trace_marker_payload_t trace_marker_payload_t
trace_sync_marker_t
enum _trace_sync_marker_t trace_sync_marker_t
_ocsd_gen_trc_elem_t
_ocsd_gen_trc_elem_t
Definition trc_gen_elem_types.h:48
OCSD_MEM_TRANS_FAIL
@ OCSD_MEM_TRANS_FAIL
Definition trc_gen_elem_types.h:106
OCSD_MEM_TRANS_TRACE_INIT
@ OCSD_MEM_TRANS_TRACE_INIT
Definition trc_gen_elem_types.h:103
OCSD_MEM_TRANS_COMMIT
@ OCSD_MEM_TRANS_COMMIT
Definition trc_gen_elem_types.h:105
OCSD_MEM_TRANS_START
@ OCSD_MEM_TRANS_START
Definition trc_gen_elem_types.h:104
ELEM_MARKER_TS
@ ELEM_MARKER_TS
Definition trc_gen_elem_types.h:94
UNSYNC_DISCARD
@ UNSYNC_DISCARD
Definition trc_gen_elem_types.h:87
UNSYNC_OVERFLOW
@ UNSYNC_OVERFLOW
Definition trc_gen_elem_types.h:86
UNSYNC_BAD_IMAGE
@ UNSYNC_BAD_IMAGE
Definition trc_gen_elem_types.h:89
UNSYNC_UNKNOWN
@ UNSYNC_UNKNOWN
Definition trc_gen_elem_types.h:83
UNSYNC_INIT_DECODER
@ UNSYNC_INIT_DECODER
Definition trc_gen_elem_types.h:84
UNSYNC_RESET_DECODER
@ UNSYNC_RESET_DECODER
Definition trc_gen_elem_types.h:85
UNSYNC_BAD_PACKET
@ UNSYNC_BAD_PACKET
Definition trc_gen_elem_types.h:88
UNSYNC_EOT
@ UNSYNC_EOT
Definition trc_gen_elem_types.h:90
EVENT_NUMBERED
@ EVENT_NUMBERED
Definition trc_gen_elem_types.h:164
EVENT_UNKNOWN
@ EVENT_UNKNOWN
Definition trc_gen_elem_types.h:162
EVENT_TRIGGER
@ EVENT_TRIGGER
Definition trc_gen_elem_types.h:163
TRACE_ON_OVERFLOW
@ TRACE_ON_OVERFLOW
Definition trc_gen_elem_types.h:73
TRACE_ON_EX_DEBUG
@ TRACE_ON_EX_DEBUG
Definition trc_gen_elem_types.h:74
TRACE_ON_NORMAL
@ TRACE_ON_NORMAL
Definition trc_gen_elem_types.h:72
OCSD_GEN_TRC_ELEM_MEMTRANS
@ OCSD_GEN_TRC_ELEM_MEMTRANS
Definition trc_gen_elem_types.h:65
OCSD_GEN_TRC_ELEM_CUSTOM
@ OCSD_GEN_TRC_ELEM_CUSTOM
Definition trc_gen_elem_types.h:67
OCSD_GEN_TRC_ELEM_ADDR_NACC
@ OCSD_GEN_TRC_ELEM_ADDR_NACC
Definition trc_gen_elem_types.h:56
OCSD_GEN_TRC_ELEM_EVENT
@ OCSD_GEN_TRC_ELEM_EVENT
Definition trc_gen_elem_types.h:62
OCSD_GEN_TRC_ELEM_UNKNOWN
@ OCSD_GEN_TRC_ELEM_UNKNOWN
Definition trc_gen_elem_types.h:49
OCSD_GEN_TRC_ELEM_CYCLE_COUNT
@ OCSD_GEN_TRC_ELEM_CYCLE_COUNT
Definition trc_gen_elem_types.h:61
OCSD_GEN_TRC_ELEM_SYNC_MARKER
@ OCSD_GEN_TRC_ELEM_SYNC_MARKER
Definition trc_gen_elem_types.h:64
OCSD_GEN_TRC_ELEM_TIMESTAMP
@ OCSD_GEN_TRC_ELEM_TIMESTAMP
Definition trc_gen_elem_types.h:60
OCSD_GEN_TRC_ELEM_INSTRUMENTATION
@ OCSD_GEN_TRC_ELEM_INSTRUMENTATION
Definition trc_gen_elem_types.h:66
OCSD_GEN_TRC_ELEM_INSTR_RANGE
@ OCSD_GEN_TRC_ELEM_INSTR_RANGE
Definition trc_gen_elem_types.h:54
OCSD_GEN_TRC_ELEM_EO_TRACE
@ OCSD_GEN_TRC_ELEM_EO_TRACE
Definition trc_gen_elem_types.h:52
OCSD_GEN_TRC_ELEM_EXCEPTION_RET
@ OCSD_GEN_TRC_ELEM_EXCEPTION_RET
Definition trc_gen_elem_types.h:59
OCSD_GEN_TRC_ELEM_ADDR_UNKNOWN
@ OCSD_GEN_TRC_ELEM_ADDR_UNKNOWN
Definition trc_gen_elem_types.h:57
OCSD_GEN_TRC_ELEM_EXCEPTION
@ OCSD_GEN_TRC_ELEM_EXCEPTION
Definition trc_gen_elem_types.h:58
OCSD_GEN_TRC_ELEM_SWTRACE
@ OCSD_GEN_TRC_ELEM_SWTRACE
Definition trc_gen_elem_types.h:63
OCSD_GEN_TRC_ELEM_PE_CONTEXT
@ OCSD_GEN_TRC_ELEM_PE_CONTEXT
Definition trc_gen_elem_types.h:53
OCSD_GEN_TRC_ELEM_NO_SYNC
@ OCSD_GEN_TRC_ELEM_NO_SYNC
Definition trc_gen_elem_types.h:50
OCSD_GEN_TRC_ELEM_I_RANGE_NOPATH
@ OCSD_GEN_TRC_ELEM_I_RANGE_NOPATH
Definition trc_gen_elem_types.h:55
OCSD_GEN_TRC_ELEM_TRACE_ON
@ OCSD_GEN_TRC_ELEM_TRACE_ON
Definition trc_gen_elem_types.h:51
ocsd_swt_info_t
struct _ocsd_swt_info ocsd_swt_info_t
ocsd_instr_subtype
enum _ocsd_instr_subtype ocsd_instr_subtype
ocsd_instr_type
enum _ocsd_instr_type ocsd_instr_type
ocsd_pe_context
struct _ocsd_pe_context ocsd_pe_context
ocsd_isa
enum _ocsd_isa ocsd_isa
ocsd_vaddr_t
uint64_t ocsd_vaddr_t
Definition ocsd_if_types.h:306
ocsd_if_types.h
OpenCSD : Standard Types used in the library interfaces.
_ocsd_generic_trace_elem
Definition trc_gen_elem_types.h:114
_ocsd_generic_trace_elem::cycle_count
uint32_t cycle_count
Definition trc_gen_elem_types.h:121
_ocsd_generic_trace_elem::excep_M_tail_chain
uint32_t excep_M_tail_chain
Definition trc_gen_elem_types.h:138
_ocsd_generic_trace_elem::last_instr_sz
uint32_t last_instr_sz
Definition trc_gen_elem_types.h:129
_ocsd_generic_trace_elem::isa
ocsd_isa isa
Definition trc_gen_elem_types.h:116
_ocsd_generic_trace_elem::excep_ret_addr
uint32_t excep_ret_addr
Definition trc_gen_elem_types.h:132
_ocsd_generic_trace_elem::excep_data_marker
uint32_t excep_data_marker
Definition trc_gen_elem_types.h:133
_ocsd_generic_trace_elem::sync_marker
trace_marker_payload_t sync_marker
Definition trc_gen_elem_types.h:151
_ocsd_generic_trace_elem::mem_trans
trace_memtrans_t mem_trans
Definition trc_gen_elem_types.h:152
_ocsd_generic_trace_elem::extended_data
uint32_t extended_data
Definition trc_gen_elem_types.h:134
_ocsd_generic_trace_elem::exception_number
uint32_t exception_number
Definition trc_gen_elem_types.h:145
_ocsd_generic_trace_elem::cpu_freq_change
uint32_t cpu_freq_change
Definition trc_gen_elem_types.h:131
_ocsd_generic_trace_elem::st_addr
ocsd_vaddr_t st_addr
Definition trc_gen_elem_types.h:117
_ocsd_generic_trace_elem::last_i_subtype
ocsd_instr_subtype last_i_subtype
Definition trc_gen_elem_types.h:123
_ocsd_generic_trace_elem::last_instr_exec
uint32_t last_instr_exec
Definition trc_gen_elem_types.h:128
_ocsd_generic_trace_elem::timestamp
uint64_t timestamp
Definition trc_gen_elem_types.h:120
_ocsd_generic_trace_elem::ptr_extended_data
const void * ptr_extended_data
Definition trc_gen_elem_types.h:156
_ocsd_generic_trace_elem::trace_event
trace_event_t trace_event
Definition trc_gen_elem_types.h:146
_ocsd_generic_trace_elem::sw_trace_info
ocsd_swt_info_t sw_trace_info
Definition trc_gen_elem_types.h:148
_ocsd_generic_trace_elem::last_instr_cond
uint32_t last_instr_cond
Definition trc_gen_elem_types.h:136
_ocsd_generic_trace_elem::trace_on_reason
trace_on_reason_t trace_on_reason
Definition trc_gen_elem_types.h:147
_ocsd_generic_trace_elem::has_cc
uint32_t has_cc
Definition trc_gen_elem_types.h:130
_ocsd_generic_trace_elem::sw_ite
trace_sw_ite_t sw_ite
Definition trc_gen_elem_types.h:153
_ocsd_generic_trace_elem::flag_bits
uint32_t flag_bits
Definition trc_gen_elem_types.h:140
_ocsd_generic_trace_elem::num_instr_range
uint32_t num_instr_range
Definition trc_gen_elem_types.h:149
_ocsd_generic_trace_elem::unsync_eot_info
unsync_info_t unsync_eot_info
Definition trc_gen_elem_types.h:150
_ocsd_generic_trace_elem::elem_type
ocsd_gen_trc_elem_t elem_type
Definition trc_gen_elem_types.h:115
_ocsd_generic_trace_elem::has_ts
uint32_t has_ts
Definition trc_gen_elem_types.h:135
_ocsd_generic_trace_elem::last_i_type
ocsd_instr_type last_i_type
Definition trc_gen_elem_types.h:122
_ocsd_generic_trace_elem::context
ocsd_pe_context context
Definition trc_gen_elem_types.h:119
_ocsd_generic_trace_elem::en_addr
ocsd_vaddr_t en_addr
Definition trc_gen_elem_types.h:118
_ocsd_generic_trace_elem::excep_ret_addr_br_tgt
uint32_t excep_ret_addr_br_tgt
Definition trc_gen_elem_types.h:137
_sw_ite_t
Definition trc_gen_elem_types.h:109
_sw_ite_t::value
uint64_t value
Definition trc_gen_elem_types.h:111
_sw_ite_t::el
uint8_t el
Definition trc_gen_elem_types.h:110
_trace_event_t
Definition trc_gen_elem_types.h:77
_trace_event_t::ev_type
uint16_t ev_type
Definition trc_gen_elem_types.h:78
_trace_event_t::ev_number
uint16_t ev_number
Definition trc_gen_elem_types.h:79
_trace_marker_payload_t
Definition trc_gen_elem_types.h:97
_trace_marker_payload_t::value
uint32_t value
Definition trc_gen_elem_types.h:99
_trace_marker_payload_t::type
trace_sync_marker_t type
Definition trc_gen_elem_types.h:98