OpenCSD - CoreSight Trace Decode Library
1.8.3
Toggle main menu visibility
Loading...
Searching...
No Matches
include
opencsd
ptm
trc_pkt_types_ptm.h
Go to the documentation of this file.
1
/*
2
* \file trc_pkt_ptm_types.h
3
* \brief OpenCSD : PTM specific types
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
35
#ifndef ARM_TRC_PKT_PTM_TYPES_H_INCLUDED
36
#define ARM_TRC_PKT_PTM_TYPES_H_INCLUDED
37
38
#include "
opencsd/trc_pkt_types.h
"
39
42
45
46
typedef
enum
_ocsd_ptm_pkt_type
47
{
48
// markers for unknown packets
49
PTM_PKT_NOTSYNC
,
50
PTM_PKT_INCOMPLETE_EOT
,
51
PTM_PKT_NOERROR
,
52
53
// markers for valid packets
54
PTM_PKT_BRANCH_ADDRESS
,
55
PTM_PKT_A_SYNC
,
56
PTM_PKT_I_SYNC
,
57
PTM_PKT_TRIGGER
,
58
PTM_PKT_WPOINT_UPDATE
,
59
PTM_PKT_IGNORE
,
60
PTM_PKT_CONTEXT_ID
,
61
PTM_PKT_VMID
,
62
PTM_PKT_ATOM
,
63
PTM_PKT_TIMESTAMP
,
64
PTM_PKT_EXCEPTION_RET
,
65
PTM_PKT_BRANCH_OR_BYPASS_EOT
,
// interpreter FSM 'state' : unsure if branch 0 packet or bypass flush end of trace
66
PTM_PKT_TPIU_PAD_EOB
,
// pad end of a buffer - no valid trace at this point
67
68
// markers for bad packets
69
PTM_PKT_BAD_SEQUENCE
,
70
PTM_PKT_RESERVED
,
71
72
}
ocsd_ptm_pkt_type
;
73
74
typedef
struct
_ptm_context_t
{
75
struct
{
76
uint32_t
curr_alt_isa
:1;
77
uint32_t
curr_NS
:1;
78
uint32_t
curr_Hyp
:1;
79
uint32_t
updated
:1;
80
uint32_t
updated_c
:1;
81
uint32_t
updated_v
:1;
82
};
83
uint32_t
ctxtID
;
84
uint8_t
VMID
;
85
}
ptm_context_t
;
86
87
typedef
struct
_ocsd_ptm_excep
{
88
ocsd_armv7_exception
type
;
89
uint16_t
number
;
90
struct
{
91
uint32_t
present
:1;
92
}
bits
;
93
}
ocsd_ptm_excep
;
94
95
96
typedef
struct
_ocsd_ptm_pkt
97
{
98
ocsd_ptm_pkt_type
type
;
99
100
ocsd_isa
curr_isa
;
101
ocsd_isa
prev_isa
;
102
103
ocsd_pkt_vaddr
addr
;
104
ptm_context_t
context
;
105
ocsd_pkt_atom
atom
;
106
107
ocsd_iSync_reason
i_sync_reason
;
108
109
uint32_t
cycle_count
;
110
uint8_t
cc_valid
;
111
112
uint64_t
timestamp
;
113
uint8_t
ts_update_bits
;
114
115
ocsd_ptm_excep
exception
;
116
117
ocsd_ptm_pkt_type
err_type
;
118
119
}
ocsd_ptm_pkt
;
120
121
typedef
struct
_ocsd_ptm_cfg
122
{
123
uint32_t
reg_idr
;
124
uint32_t
reg_ctrl
;
125
uint32_t
reg_ccer
;
126
uint32_t
reg_trc_id
;
127
ocsd_arch_version_t
arch_ver
;
128
ocsd_core_profile_t
core_prof
;
129
}
ocsd_ptm_cfg
;
130
132
133
135
#endif
// ARM_TRC_PKT_PTM_TYPES_H_INCLUDED
136
137
/* End of File trc_pkt_ptm_types.h */
ocsd_core_profile_t
enum _ocsd_core_profile ocsd_core_profile_t
ocsd_arch_version_t
enum _ocsd_arch_version ocsd_arch_version_t
ocsd_isa
enum _ocsd_isa ocsd_isa
ocsd_pkt_vaddr
struct _ocsd_pkt_vaddr ocsd_pkt_vaddr
_ocsd_ptm_pkt_type
_ocsd_ptm_pkt_type
Definition
trc_pkt_types_ptm.h:47
ocsd_ptm_cfg
struct _ocsd_ptm_cfg ocsd_ptm_cfg
ptm_context_t
struct _ptm_context_t ptm_context_t
ocsd_ptm_excep
struct _ocsd_ptm_excep ocsd_ptm_excep
ocsd_armv7_exception
enum _ocsd_armv7_exception ocsd_armv7_exception
ocsd_ptm_pkt_type
enum _ocsd_ptm_pkt_type ocsd_ptm_pkt_type
ocsd_pkt_atom
struct _ocsd_pkt_atom ocsd_pkt_atom
ocsd_iSync_reason
enum _ocsd_iSync_reason ocsd_iSync_reason
ocsd_ptm_pkt
struct _ocsd_ptm_pkt ocsd_ptm_pkt
PTM_PKT_BAD_SEQUENCE
@ PTM_PKT_BAD_SEQUENCE
invalid sequence for packet type
Definition
trc_pkt_types_ptm.h:69
PTM_PKT_TIMESTAMP
@ PTM_PKT_TIMESTAMP
timestamp packet.
Definition
trc_pkt_types_ptm.h:63
PTM_PKT_RESERVED
@ PTM_PKT_RESERVED
Reserved packet encoding.
Definition
trc_pkt_types_ptm.h:70
PTM_PKT_NOERROR
@ PTM_PKT_NOERROR
no error base type packet.
Definition
trc_pkt_types_ptm.h:51
PTM_PKT_VMID
@ PTM_PKT_VMID
VMID packet.
Definition
trc_pkt_types_ptm.h:61
PTM_PKT_EXCEPTION_RET
@ PTM_PKT_EXCEPTION_RET
exception return.
Definition
trc_pkt_types_ptm.h:64
PTM_PKT_INCOMPLETE_EOT
@ PTM_PKT_INCOMPLETE_EOT
flushing incomplete packet at end of trace.
Definition
trc_pkt_types_ptm.h:50
PTM_PKT_I_SYNC
@ PTM_PKT_I_SYNC
Instruction sync with address.
Definition
trc_pkt_types_ptm.h:56
PTM_PKT_BRANCH_ADDRESS
@ PTM_PKT_BRANCH_ADDRESS
Branch address with optional exception.
Definition
trc_pkt_types_ptm.h:54
PTM_PKT_WPOINT_UPDATE
@ PTM_PKT_WPOINT_UPDATE
Waypoint update.
Definition
trc_pkt_types_ptm.h:58
PTM_PKT_IGNORE
@ PTM_PKT_IGNORE
ignore packet.
Definition
trc_pkt_types_ptm.h:59
PTM_PKT_NOTSYNC
@ PTM_PKT_NOTSYNC
no sync found yet
Definition
trc_pkt_types_ptm.h:49
PTM_PKT_A_SYNC
@ PTM_PKT_A_SYNC
Alignment Synchronisation.
Definition
trc_pkt_types_ptm.h:55
PTM_PKT_TPIU_PAD_EOB
@ PTM_PKT_TPIU_PAD_EOB
Definition
trc_pkt_types_ptm.h:66
PTM_PKT_CONTEXT_ID
@ PTM_PKT_CONTEXT_ID
context id packet.
Definition
trc_pkt_types_ptm.h:60
PTM_PKT_ATOM
@ PTM_PKT_ATOM
atom waypoint packet.
Definition
trc_pkt_types_ptm.h:62
PTM_PKT_BRANCH_OR_BYPASS_EOT
@ PTM_PKT_BRANCH_OR_BYPASS_EOT
Definition
trc_pkt_types_ptm.h:65
PTM_PKT_TRIGGER
@ PTM_PKT_TRIGGER
trigger packet
Definition
trc_pkt_types_ptm.h:57
_ocsd_ptm_cfg
Definition
trc_pkt_types_ptm.h:122
_ocsd_ptm_cfg::reg_ccer
uint32_t reg_ccer
Definition
trc_pkt_types_ptm.h:125
_ocsd_ptm_cfg::reg_ctrl
uint32_t reg_ctrl
Definition
trc_pkt_types_ptm.h:124
_ocsd_ptm_cfg::core_prof
ocsd_core_profile_t core_prof
Definition
trc_pkt_types_ptm.h:128
_ocsd_ptm_cfg::arch_ver
ocsd_arch_version_t arch_ver
Definition
trc_pkt_types_ptm.h:127
_ocsd_ptm_cfg::reg_idr
uint32_t reg_idr
Definition
trc_pkt_types_ptm.h:123
_ocsd_ptm_cfg::reg_trc_id
uint32_t reg_trc_id
Definition
trc_pkt_types_ptm.h:126
_ocsd_ptm_excep
Definition
trc_pkt_types_ptm.h:87
_ocsd_ptm_excep::type
ocsd_armv7_exception type
Definition
trc_pkt_types_ptm.h:88
_ocsd_ptm_excep::number
uint16_t number
Definition
trc_pkt_types_ptm.h:89
_ocsd_ptm_excep::present
uint32_t present
Definition
trc_pkt_types_ptm.h:91
_ocsd_ptm_excep::bits
struct _ocsd_ptm_excep::@137105023207201254161064013165017340322250131042 bits
_ocsd_ptm_pkt
Definition
trc_pkt_types_ptm.h:97
_ocsd_ptm_pkt::cycle_count
uint32_t cycle_count
Definition
trc_pkt_types_ptm.h:109
_ocsd_ptm_pkt::cc_valid
uint8_t cc_valid
Definition
trc_pkt_types_ptm.h:110
_ocsd_ptm_pkt::exception
ocsd_ptm_excep exception
Definition
trc_pkt_types_ptm.h:115
_ocsd_ptm_pkt::curr_isa
ocsd_isa curr_isa
Definition
trc_pkt_types_ptm.h:100
_ocsd_ptm_pkt::addr
ocsd_pkt_vaddr addr
Definition
trc_pkt_types_ptm.h:103
_ocsd_ptm_pkt::context
ptm_context_t context
Definition
trc_pkt_types_ptm.h:104
_ocsd_ptm_pkt::err_type
ocsd_ptm_pkt_type err_type
Definition
trc_pkt_types_ptm.h:117
_ocsd_ptm_pkt::atom
ocsd_pkt_atom atom
Definition
trc_pkt_types_ptm.h:105
_ocsd_ptm_pkt::type
ocsd_ptm_pkt_type type
Definition
trc_pkt_types_ptm.h:98
_ocsd_ptm_pkt::i_sync_reason
ocsd_iSync_reason i_sync_reason
Definition
trc_pkt_types_ptm.h:107
_ocsd_ptm_pkt::prev_isa
ocsd_isa prev_isa
Definition
trc_pkt_types_ptm.h:101
_ocsd_ptm_pkt::ts_update_bits
uint8_t ts_update_bits
Definition
trc_pkt_types_ptm.h:113
_ocsd_ptm_pkt::timestamp
uint64_t timestamp
Definition
trc_pkt_types_ptm.h:112
_ptm_context_t
Definition
trc_pkt_types_ptm.h:74
_ptm_context_t::updated_v
uint32_t updated_v
Definition
trc_pkt_types_ptm.h:81
_ptm_context_t::curr_NS
uint32_t curr_NS
Definition
trc_pkt_types_ptm.h:77
_ptm_context_t::updated_c
uint32_t updated_c
Definition
trc_pkt_types_ptm.h:80
_ptm_context_t::curr_Hyp
uint32_t curr_Hyp
Definition
trc_pkt_types_ptm.h:78
_ptm_context_t::updated
uint32_t updated
Definition
trc_pkt_types_ptm.h:79
_ptm_context_t::ctxtID
uint32_t ctxtID
Definition
trc_pkt_types_ptm.h:83
_ptm_context_t::curr_alt_isa
uint32_t curr_alt_isa
Definition
trc_pkt_types_ptm.h:76
_ptm_context_t::VMID
uint8_t VMID
Definition
trc_pkt_types_ptm.h:84
trc_pkt_types.h
OpenCSD: Common "C" types for trace packets.
Generated on
for OpenCSD - CoreSight Trace Decode Library by
1.17.0