OpenCSD - CoreSight Trace Decode Library 1.3.3
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
39
47{
48// markers for unknown packets
52
53// markers for valid packets
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
71
73
74typedef 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;
86
87typedef struct _ocsd_ptm_excep {
89 uint16_t number;
90 struct {
91 uint32_t present:1;
94
95
96typedef struct _ocsd_ptm_pkt
97{
106
109 uint32_t cycle_count;
110 uint8_t cc_valid;
112 uint64_t timestamp;
120
121typedef 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;
130
135#endif // ARM_TRC_PKT_PTM_TYPES_H_INCLUDED
136
137/* End of File trc_pkt_ptm_types.h */
enum _ocsd_core_profile ocsd_core_profile_t
enum _ocsd_arch_version ocsd_arch_version_t
enum _ocsd_isa ocsd_isa
_ocsd_ptm_pkt_type
struct _ocsd_ptm_cfg ocsd_ptm_cfg
struct _ptm_context_t ptm_context_t
struct _ocsd_ptm_excep ocsd_ptm_excep
enum _ocsd_armv7_exception ocsd_armv7_exception
enum _ocsd_ptm_pkt_type ocsd_ptm_pkt_type
enum _ocsd_iSync_reason ocsd_iSync_reason
struct _ocsd_ptm_pkt ocsd_ptm_pkt
@ PTM_PKT_BAD_SEQUENCE
invalid sequence for packet type
@ PTM_PKT_TIMESTAMP
timestamp packet.
@ PTM_PKT_RESERVED
Reserved packet encoding
@ PTM_PKT_NOERROR
no error base type packet.
@ PTM_PKT_VMID
VMID packet.
@ PTM_PKT_EXCEPTION_RET
exception return.
@ PTM_PKT_INCOMPLETE_EOT
flushing incomplete packet at end of trace.
@ PTM_PKT_I_SYNC
Instruction sync with address.
@ PTM_PKT_BRANCH_ADDRESS
Branch address with optional exception.
@ PTM_PKT_WPOINT_UPDATE
Waypoint update.
@ PTM_PKT_IGNORE
ignore packet.
@ PTM_PKT_NOTSYNC
no sync found yet
@ PTM_PKT_A_SYNC
Alignment Synchronisation.
@ PTM_PKT_TPIU_PAD_EOB
@ PTM_PKT_CONTEXT_ID
context id packet.
@ PTM_PKT_ATOM
atom waypoint packet.
@ PTM_PKT_BRANCH_OR_BYPASS_EOT
@ PTM_PKT_TRIGGER
trigger packet
ocsd_core_profile_t core_prof
ocsd_arch_version_t arch_ver
ocsd_armv7_exception type
struct _ocsd_ptm_excep::@27 bits
ocsd_ptm_excep exception
ocsd_pkt_vaddr addr
ptm_context_t context
ocsd_ptm_pkt_type err_type
ocsd_pkt_atom atom
ocsd_ptm_pkt_type type
ocsd_iSync_reason i_sync_reason
OpenCSD: Common "C" types for trace packets.