Loading...
Searching...
No Matches
trc_pkt_types_ptm.h
Go to the documentation of this file.
/*
* \file trc_pkt_ptm_types.h
* \brief OpenCSD : PTM specific types
*
* \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_PTM_TYPES_H_INCLUDED
#define ARM_TRC_PKT_PTM_TYPES_H_INCLUDED
#include "opencsd/trc_pkt_types.h"
typedef enum _ocsd_ptm_pkt_type
{
// markers for unknown packets
PTM_PKT_NOTSYNC,
PTM_PKT_INCOMPLETE_EOT,
PTM_PKT_NOERROR,
// markers for valid packets
PTM_PKT_BRANCH_ADDRESS,
PTM_PKT_A_SYNC,
PTM_PKT_I_SYNC,
PTM_PKT_TRIGGER,
PTM_PKT_WPOINT_UPDATE,
PTM_PKT_IGNORE,
PTM_PKT_CONTEXT_ID,
PTM_PKT_VMID,
PTM_PKT_ATOM,
PTM_PKT_TIMESTAMP,
PTM_PKT_EXCEPTION_RET,
PTM_PKT_BRANCH_OR_BYPASS_EOT, // interpreter FSM 'state' : unsure if branch 0 packet or bypass flush end of trace
PTM_PKT_TPIU_PAD_EOB, // pad end of a buffer - no valid trace at this point
// markers for bad packets
PTM_PKT_BAD_SEQUENCE,
PTM_PKT_RESERVED,
} ocsd_ptm_pkt_type;
typedef struct _ptm_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;
} ptm_context_t;
typedef struct _ocsd_ptm_excep {
ocsd_armv7_exception type;
uint16_t number;
struct {
uint32_t present:1;
} bits;
} ocsd_ptm_excep;
typedef struct _ocsd_ptm_pkt
{
ocsd_ptm_pkt_type type;
ocsd_isa curr_isa;
ocsd_isa prev_isa;
ocsd_pkt_vaddr addr;
ptm_context_t context;
ocsd_pkt_atom atom;
ocsd_iSync_reason i_sync_reason;
uint32_t cycle_count;
uint8_t cc_valid;
uint64_t timestamp;
uint8_t ts_update_bits;
ocsd_ptm_excep exception;
ocsd_ptm_pkt_type err_type;
} ocsd_ptm_pkt;
typedef struct _ocsd_ptm_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_ptm_cfg;
#endif // ARM_TRC_PKT_PTM_TYPES_H_INCLUDED
/* 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_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_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_pkt_atom
Definition trc_pkt_types.h:85
_ocsd_pkt_vaddr
Definition trc_pkt_types.h:59
_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::@28 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.