trc_pkt_elem_etmv4i.h
Go to the documentation of this file.
/*
* \file trc_pkt_elem_etmv4i.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_PKT_ELEM_ETMV4I_H_INCLUDED
#define ARM_TRC_PKT_ELEM_ETMV4I_H_INCLUDED
#include "trc_pkt_types_etmv4.h"
#include "common/trc_printable_elem.h"
#include "common/trc_pkt_elem_base.h"
class Etmv4PktAddrStack
{
public:
Etmv4PktAddrStack()
{
reset_stack();
}
~Etmv4PktAddrStack() {};
void push(const ocsd_pkt_vaddr vaddr, const uint8_t isa)
{
m_v_addr[2] = m_v_addr[1];
m_v_addr[1] = m_v_addr[0];
m_v_addr[0] = vaddr;
m_v_addr_ISA[2] = m_v_addr_ISA[1];
m_v_addr_ISA[1] = m_v_addr_ISA[0];
m_v_addr_ISA[0] = isa;
}
void get_idx(const uint8_t idx, ocsd_pkt_vaddr &vaddr, uint8_t &isa)
{
if (idx < 3)
{
vaddr = m_v_addr[idx];
isa = m_v_addr_ISA[idx];
}
}
// explicit reset for TInfo.
void reset_stack()
{
for (int i = 0; i < 3; i++)
{
m_v_addr[i].pkt_bits = 0;
m_v_addr[i].size = OCSD_MAX_VA_BITSIZE == 64 ? VA_64BIT : VA_32BIT;
m_v_addr[i].val = 0;
m_v_addr[i].valid_bits = OCSD_MAX_VA_BITSIZE;
m_v_addr_ISA[i] = 0;
}
}
private:
ocsd_pkt_vaddr m_v_addr[3];
uint8_t m_v_addr_ISA[3];
};
class EtmV4ITrcPacket : public TrcPacketBase, public ocsd_etmv4_i_pkt, public trcPrintableElem
{
public:
EtmV4ITrcPacket();
~EtmV4ITrcPacket();
EtmV4ITrcPacket &operator =(const ocsd_etmv4_i_pkt* p_pkt);
virtual const void *c_pkt() const { return (const ocsd_etmv4_i_pkt *)this; };
// update interface - set packet values
void initStartState();
void initNextPacket();
void setType(const ocsd_etmv4_i_pkt_type pkt_type) { type = pkt_type; };
void updateErrType(const ocsd_etmv4_i_pkt_type err_pkt_type, const uint8_t val = 0);
void clearTraceInfo();
void setTraceInfo(const uint32_t infoVal);
void setTraceInfoKey(const uint32_t keyVal);
void setTraceInfoSpec(const uint32_t specVal);
void setTraceInfoCyct(const uint32_t cyctVal);
void setTS(const uint64_t value, const uint8_t bits);
void setCycleCount(const uint32_t value);
void setCommitElements(const uint32_t commit_elem);
void setCancelElements(const uint32_t cancel_elem);
void setAtomPacket(const ocsd_pkt_atm_type type, const uint32_t En_bits, const uint8_t num);
void setCondIF1(uint32_t const cond_key);
void setCondIF2(uint8_t const c_elem_idx);
void setCondIF3(uint8_t const num_c_elem, const bool finalElem);
void setCondRF1(const uint32_t key[2], const uint8_t res[2], const uint8_t CI[2], const bool set2Keys);
void setCondRF2(const uint8_t key_incr, const uint8_t token);
void setCondRF3(const uint16_t tokens);
void setCondRF4(const uint8_t token);
void setContextInfo(const bool update, const uint8_t EL = 0, const uint8_t NS = 0, const uint8_t SF = 0);
void setContextVMID(const uint32_t VMID);
void setContextCID(const uint32_t CID);
void setExceptionInfo(const uint16_t excep_type, const uint8_t addr_interp, const uint8_t m_fault_pending, const uint8_t m_type);
void set64BitAddress(const uint64_t addr, const uint8_t IS);
void set32BitAddress(const uint32_t addr, const uint8_t IS);
void updateShortAddress(const uint32_t addr, const uint8_t IS, const uint8_t update_bits);
void setAddressExactMatch(const uint8_t idx);
void setDataSyncMarker(const uint8_t dsm_val);
void setEvent(const uint8_t event_val);
void setQType(const bool has_count, const uint32_t count, const bool has_addr, const bool addr_match, const uint8_t type);
// packet status interface - get packet info.
const ocsd_etmv4_i_pkt_type getType() const { return type; };
const ocsd_etmv4_i_pkt_type getErrType() const { return err_type; };
const bool hasCommitElementsCount() const
{
return pkt_valid.bits.commit_elem_valid ? true : false;
};
// trace info
const etmv4_trace_info_t &getTraceInfo() const { return trace_info; };
const uint32_t getCCThreshold() const;
const uint32_t getP0Key() const;
const uint32_t getCurrSpecDepth() const;
// atom
const ocsd_pkt_atom &getAtom() const { return atom; };
const int getNumAtoms() const { return atom.num; };
// context
const etmv4_context_t &getContext() const { return context; };
// address
const uint8_t &getAddrMatch() const { return addr_exact_match_idx; };
const ocsd_vaddr_t &getAddrVal() const { return v_addr.val; };
const uint8_t &getAddrIS() const { return v_addr_ISA; };
const bool getAddr64Bit() const { return v_addr.size == VA_64BIT; };
// ts
const uint64_t getTS() const { return pkt_valid.bits.ts_valid ? ts.timestamp : 0; };
// cc
const uint32_t getCC() const { return pkt_valid.bits.cc_valid ? cycle_count : 0; };
// speculation
const int getCommitElem() const { return commit_elements; };
const int getCancelElem() const { return cancel_elements; };
// packet type
const bool isBadPacket() const;
// printing
virtual void toString(std::string &str) const;
virtual void toStringFmt(const uint32_t fmtFlags, std::string &str) const;
void setProtocolVersion(const uint8_t version) { protocol_version = version; };
private:
const char *packetTypeName(const ocsd_etmv4_i_pkt_type type, const char **pDesc) const;
void contextStr(std::string &ctxtStr) const;
void atomSeq(std::string &valStr) const;
void addrMatchIdx(std::string &valStr) const;
void exceptionInfo(std::string &valStr) const;
void push_vaddr();
void pop_vaddr_idx(const uint8_t idx);
const bool isETE() const { return (protocol_version & 0xF0) == 0x50; };
Etmv4PktAddrStack m_addr_stack;
};
inline void EtmV4ITrcPacket::updateErrType(const ocsd_etmv4_i_pkt_type err_pkt_type, const uint8_t err_val /* = 0 */)
{
// set primary type to incoming error type, set packet err type to previous primary type.
err_type = type;
type = err_pkt_type;
err_hdr_val = err_val;
}
inline void EtmV4ITrcPacket::clearTraceInfo()
{
pkt_valid.bits.ts_valid = 0;
pkt_valid.bits.trace_info_valid = 0;
pkt_valid.bits.p0_key_valid = 0;
pkt_valid.bits.spec_depth_valid = 0;
pkt_valid.bits.cc_thresh_valid = 0;
// set these as defaults - if they don't appear in TINFO this is the state.
setTraceInfo(0);
setTraceInfoSpec(0);
// explicitly reset the stack & zero the current address.
m_addr_stack.reset_stack();
m_addr_stack.get_idx(0, v_addr, v_addr_ISA);
}
inline void EtmV4ITrcPacket::setTraceInfo(const uint32_t infoVal)
{
trace_info.val = infoVal;
pkt_valid.bits.trace_info_valid = 1;
}
inline void EtmV4ITrcPacket::setTraceInfoKey(const uint32_t keyVal)
{
p0_key = keyVal;
pkt_valid.bits.p0_key_valid = 1;
}
inline void EtmV4ITrcPacket::setTraceInfoSpec(const uint32_t specVal)
{
curr_spec_depth = specVal;
pkt_valid.bits.spec_depth_valid = 1;
}
inline void EtmV4ITrcPacket::setTraceInfoCyct(const uint32_t cyctVal)
{
cc_threshold = cyctVal;
pkt_valid.bits.cc_thresh_valid = 1;
}
inline void EtmV4ITrcPacket::setTS(const uint64_t value, const uint8_t bits)
{
uint64_t mask = (uint64_t)-1LL;
if(bits < 64) mask = (1ULL << bits) - 1;
ts.timestamp = (ts.timestamp & ~mask) | (value & mask);
ts.bits_changed = bits;
pkt_valid.bits.ts_valid = 1;
}
inline void EtmV4ITrcPacket::setCycleCount(const uint32_t value)
{
pkt_valid.bits.cc_valid = 1;
cycle_count = value;
}
inline void EtmV4ITrcPacket::setCommitElements(const uint32_t commit_elem)
{
pkt_valid.bits.commit_elem_valid = 1;
commit_elements = commit_elem;
}
inline const uint32_t EtmV4ITrcPacket::getCCThreshold() const
{
if(pkt_valid.bits.cc_thresh_valid)
return cc_threshold;
return 0;
}
inline const uint32_t EtmV4ITrcPacket::getP0Key() const
{
if(pkt_valid.bits.p0_key_valid)
return p0_key;
return 0;
}
inline const uint32_t EtmV4ITrcPacket::getCurrSpecDepth() const
{
if(pkt_valid.bits.spec_depth_valid)
return curr_spec_depth;
return 0;
}
inline void EtmV4ITrcPacket::setCancelElements(const uint32_t cancel_elem)
{
cancel_elements = cancel_elem;
}
inline void EtmV4ITrcPacket::setAtomPacket(const ocsd_pkt_atm_type type, const uint32_t En_bits, const uint8_t num)
{
if(type == ATOM_REPEAT)
{
uint32_t bit_patt = En_bits & 0x1;
if(bit_patt)
{
// none zero - all 1s
bit_patt = (bit_patt << num) - 1;
}
atom.En_bits = bit_patt;
}
else
atom.En_bits = En_bits;
atom.num = num;
}
inline void EtmV4ITrcPacket::setCondIF1(const uint32_t cond_key)
{
cond_instr.cond_key_set = 1;
cond_instr.f3_final_elem = 0;
cond_instr.f2_cond_incr = 0;
cond_instr.num_c_elem = 1;
cond_instr.cond_c_key = cond_key;
}
inline void EtmV4ITrcPacket::setCondIF2(const uint8_t c_elem_idx)
{
cond_instr.cond_key_set = 0;
cond_instr.f3_final_elem = 0;
switch(c_elem_idx & 0x3)
{
case 0:
cond_instr.f2_cond_incr = 1;
cond_instr.num_c_elem = 1;
break;
case 1:
cond_instr.f2_cond_incr = 0;
cond_instr.num_c_elem = 1;
break;
case 2:
cond_instr.f2_cond_incr = 1;
cond_instr.num_c_elem = 2;
break;
}
}
inline void EtmV4ITrcPacket::setCondIF3(const uint8_t num_c_elem, const bool finalElem)
{
cond_instr.cond_key_set = 0;
cond_instr.f3_final_elem = finalElem ? 1: 0;
cond_instr.f2_cond_incr = 0;
cond_instr.num_c_elem = num_c_elem;
}
inline void EtmV4ITrcPacket::setCondRF1(const uint32_t key[2], const uint8_t res[2], const uint8_t CI[2],const bool set2Keys)
{
cond_result.key_res_0_set = 1;
cond_result.cond_r_key_0 = key[0];
cond_result.res_0 = res[0];
cond_result.ci_0 = CI[0];
if(set2Keys)
{
cond_result.key_res_1_set = 1;
cond_result.cond_r_key_1 = key[1];
cond_result.res_1 = res[1];
cond_result.ci_1 = CI[1];
}
}
inline void EtmV4ITrcPacket::setCondRF2(const uint8_t key_incr, const uint8_t token)
{
cond_result.key_res_0_set = 0;
cond_result.key_res_1_set = 0;
cond_result.f2_key_incr = key_incr;
cond_result.f2f4_token = token;
}
inline void EtmV4ITrcPacket::setCondRF3(const uint16_t tokens)
{
cond_result.key_res_0_set = 0;
cond_result.key_res_1_set = 0;
cond_result.f3_tokens = tokens;
}
inline void EtmV4ITrcPacket::setCondRF4(const uint8_t token)
{
cond_result.key_res_0_set = 0;
cond_result.key_res_1_set = 0;
cond_result.f2f4_token = token;
}
inline void EtmV4ITrcPacket::setContextInfo(const bool update, const uint8_t EL, const uint8_t NS, const uint8_t SF)
{
pkt_valid.bits.context_valid = 1;
if(update)
{
context.updated = 1;
context.EL = EL;
context.NS = NS;
context.SF = SF;
}
}
inline void EtmV4ITrcPacket::setContextVMID(const uint32_t VMID)
{
pkt_valid.bits.context_valid = 1;
context.updated = 1;
context.VMID = VMID;
context.updated_v = 1;
}
inline void EtmV4ITrcPacket::setContextCID(const uint32_t CID)
{
pkt_valid.bits.context_valid = 1;
context.updated = 1;
context.ctxtID = CID;
context.updated_c = 1;
}
inline void EtmV4ITrcPacket::setExceptionInfo(const uint16_t excep_type, const uint8_t addr_interp, const uint8_t m_fault_pending, const uint8_t m_type)
{
exception_info.exceptionType = excep_type;
exception_info.addr_interp = addr_interp;
exception_info.m_fault_pending = m_fault_pending;
exception_info.m_type = m_type;
}
inline void EtmV4ITrcPacket::set64BitAddress(const uint64_t addr, const uint8_t IS)
{
v_addr.pkt_bits = 64;
v_addr.valid_bits = 64;
v_addr.size = VA_64BIT;
v_addr.val = addr;
v_addr_ISA = IS;
push_vaddr();
}
inline void EtmV4ITrcPacket::set32BitAddress(const uint32_t addr, const uint8_t IS)
{
uint64_t mask = OCSD_BIT_MASK(32);
v_addr.pkt_bits = 32;
if (pkt_valid.bits.context_valid && context.SF)
{
v_addr.size = VA_64BIT;
v_addr.val = (v_addr.val & ~mask) | (addr & mask);
}
else
{
v_addr.val = addr;
v_addr.size = VA_32BIT;
}
if (v_addr.valid_bits < 32) // may be updating a 64 bit address so only set 32 if currently less.
v_addr.valid_bits = 32;
v_addr_ISA = IS;
push_vaddr();
}
inline void EtmV4ITrcPacket::updateShortAddress(const uint32_t addr, const uint8_t IS, const uint8_t update_bits)
{
ocsd_vaddr_t update_mask = OCSD_BIT_MASK(update_bits);
v_addr.pkt_bits = update_bits;
if(v_addr.valid_bits < update_bits)
v_addr.valid_bits = update_bits;
v_addr.val = (v_addr.val & ~update_mask) | (addr & update_mask);
v_addr_ISA = IS;
push_vaddr();
}
inline void EtmV4ITrcPacket::setAddressExactMatch(const uint8_t idx)
{
addr_exact_match_idx = idx;
pop_vaddr_idx(idx);
push_vaddr();
}
inline void EtmV4ITrcPacket::setDataSyncMarker(const uint8_t dsm_value)
{
dsm_val = dsm_value;
}
inline void EtmV4ITrcPacket::setEvent(const uint8_t event_value)
{
event_val = event_value;
}
inline void EtmV4ITrcPacket::setQType(const bool has_count, const uint32_t count, const bool has_addr, const bool addr_match, const uint8_t type)
{
Q_pkt.q_count = count;
Q_pkt.q_type = type;
Q_pkt.count_present = has_count ? 1 : 0;
Q_pkt.addr_present = has_addr ? 1: 0;
Q_pkt.addr_match = addr_match ? 1 :0;
}
inline const bool EtmV4ITrcPacket::isBadPacket() const
{
return (type >= ETM4_PKT_I_BAD_SEQUENCE);
}
inline void EtmV4ITrcPacket::push_vaddr()
{
m_addr_stack.push(v_addr, v_addr_ISA);
}
inline void EtmV4ITrcPacket::pop_vaddr_idx(const uint8_t idx)
{
m_addr_stack.get_idx(idx, v_addr, v_addr_ISA);
}
#endif // ARM_TRC_PKT_ELEM_ETMV4I_H_INCLUDED
/* End of File trc_pkt_elem_etmv4i.h */
EtmV4ITrcPacket
ETMv4 Instuction Trace Protocol Packet.
Definition: trc_pkt_elem_etmv4i.h:111
EtmV4ITrcPacket::toStringFmt
virtual void toStringFmt(const uint32_t fmtFlags, std::string &str) const
EtmV4ITrcPacket::initNextPacket
void initNextPacket()
clear any single packet only flags / state.
EtmV4ITrcPacket::hasCommitElementsCount
const bool hasCommitElementsCount() const
return true if this packet has set the commit packet count.
Definition: trc_pkt_elem_etmv4i.h:169
EtmV4ITrcPacket::c_pkt
virtual const void * c_pkt() const
return the underlying C API packet structure
Definition: trc_pkt_elem_etmv4i.h:118
EtmV4ITrcPacket::setProtocolVersion
void setProtocolVersion(const uint8_t version)
Definition: trc_pkt_elem_etmv4i.h:210
EtmV4ITrcPacket::toString
virtual void toString(std::string &str) const
EtmV4ITrcPacket::getCommitElem
const int getCommitElem() const
Definition: trc_pkt_elem_etmv4i.h:200
EtmV4ITrcPacket::getNumAtoms
const int getNumAtoms() const
Definition: trc_pkt_elem_etmv4i.h:182
EtmV4ITrcPacket::operator=
EtmV4ITrcPacket & operator=(const ocsd_etmv4_i_pkt *p_pkt)
EtmV4ITrcPacket::getTraceInfo
const etmv4_trace_info_t & getTraceInfo() const
Definition: trc_pkt_elem_etmv4i.h:175
EtmV4ITrcPacket::getTS
const uint64_t getTS() const
Definition: trc_pkt_elem_etmv4i.h:194
EtmV4ITrcPacket::setType
void setType(const ocsd_etmv4_i_pkt_type pkt_type)
Definition: trc_pkt_elem_etmv4i.h:124
EtmV4ITrcPacket::getAddrMatch
const uint8_t & getAddrMatch() const
Definition: trc_pkt_elem_etmv4i.h:188
EtmV4ITrcPacket::getType
const ocsd_etmv4_i_pkt_type getType() const
Definition: trc_pkt_elem_etmv4i.h:165
EtmV4ITrcPacket::EtmV4ITrcPacket
EtmV4ITrcPacket()
EtmV4ITrcPacket::getAddrIS
const uint8_t & getAddrIS() const
Definition: trc_pkt_elem_etmv4i.h:190
EtmV4ITrcPacket::getAtom
const ocsd_pkt_atom & getAtom() const
Definition: trc_pkt_elem_etmv4i.h:181
EtmV4ITrcPacket::getCancelElem
const int getCancelElem() const
Definition: trc_pkt_elem_etmv4i.h:201
EtmV4ITrcPacket::getAddr64Bit
const bool getAddr64Bit() const
Definition: trc_pkt_elem_etmv4i.h:191
EtmV4ITrcPacket::getCC
const uint32_t getCC() const
Definition: trc_pkt_elem_etmv4i.h:197
EtmV4ITrcPacket::initStartState
void initStartState()
Set to initial state - no intra packet state valid. Use on start of trace / discontinuities.
EtmV4ITrcPacket::getContext
const etmv4_context_t & getContext() const
Definition: trc_pkt_elem_etmv4i.h:185
EtmV4ITrcPacket::~EtmV4ITrcPacket
~EtmV4ITrcPacket()
EtmV4ITrcPacket::getErrType
const ocsd_etmv4_i_pkt_type getErrType() const
Definition: trc_pkt_elem_etmv4i.h:166
EtmV4ITrcPacket::getAddrVal
const ocsd_vaddr_t & getAddrVal() const
Definition: trc_pkt_elem_etmv4i.h:189
Etmv4PktAddrStack
ETMv4 Address packet values stack.
Definition: trc_pkt_elem_etmv4i.h:56
Etmv4PktAddrStack::~Etmv4PktAddrStack
~Etmv4PktAddrStack()
Definition: trc_pkt_elem_etmv4i.h:62
Etmv4PktAddrStack::push
void push(const ocsd_pkt_vaddr vaddr, const uint8_t isa)
Definition: trc_pkt_elem_etmv4i.h:64
Etmv4PktAddrStack::reset_stack
void reset_stack()
Definition: trc_pkt_elem_etmv4i.h:84
Etmv4PktAddrStack::Etmv4PktAddrStack
Etmv4PktAddrStack()
Definition: trc_pkt_elem_etmv4i.h:58
Etmv4PktAddrStack::get_idx
void get_idx(const uint8_t idx, ocsd_pkt_vaddr &vaddr, uint8_t &isa)
Definition: trc_pkt_elem_etmv4i.h:74
TrcPacketBase
Definition: trc_pkt_elem_base.h:38
trcPrintableElem
Class to provide trace element strings for printing.
Definition: trc_printable_elem.h:56
OCSD_BIT_MASK
#define OCSD_BIT_MASK(bits)
Definition: ocsd_if_types.h:316
OCSD_MAX_VA_BITSIZE
#define OCSD_MAX_VA_BITSIZE
Definition: ocsd_if_types.h:311
ocsd_vaddr_t
uint64_t ocsd_vaddr_t
Definition: ocsd_if_types.h:310
EtmV4ITrcPacket::isBadPacket
const bool isBadPacket() const
Definition: trc_pkt_elem_etmv4i.h:526
EtmV4ITrcPacket::setAtomPacket
void setAtomPacket(const ocsd_pkt_atm_type type, const uint32_t En_bits, const uint8_t num)
Definition: trc_pkt_elem_etmv4i.h:323
EtmV4ITrcPacket::setDataSyncMarker
void setDataSyncMarker(const uint8_t dsm_val)
Definition: trc_pkt_elem_etmv4i.h:507
EtmV4ITrcPacket::set32BitAddress
void set32BitAddress(const uint32_t addr, const uint8_t IS)
Definition: trc_pkt_elem_etmv4i.h:465
EtmV4ITrcPacket::updateShortAddress
void updateShortAddress(const uint32_t addr, const uint8_t IS, const uint8_t update_bits)
Definition: trc_pkt_elem_etmv4i.h:488
EtmV4ITrcPacket::getCurrSpecDepth
const uint32_t getCurrSpecDepth() const
Definition: trc_pkt_elem_etmv4i.h:311
EtmV4ITrcPacket::setTS
void setTS(const uint64_t value, const uint8_t bits)
Definition: trc_pkt_elem_etmv4i.h:276
EtmV4ITrcPacket::setCycleCount
void setCycleCount(const uint32_t value)
Definition: trc_pkt_elem_etmv4i.h:285
EtmV4ITrcPacket::setTraceInfoSpec
void setTraceInfoSpec(const uint32_t specVal)
Definition: trc_pkt_elem_etmv4i.h:264
EtmV4ITrcPacket::setCondRF2
void setCondRF2(const uint8_t key_incr, const uint8_t token)
Definition: trc_pkt_elem_etmv4i.h:397
EtmV4ITrcPacket::getCCThreshold
const uint32_t getCCThreshold() const
Definition: trc_pkt_elem_etmv4i.h:297
EtmV4ITrcPacket::setCondRF3
void setCondRF3(const uint16_t tokens)
Definition: trc_pkt_elem_etmv4i.h:405
EtmV4ITrcPacket::setTraceInfo
void setTraceInfo(const uint32_t infoVal)
Definition: trc_pkt_elem_etmv4i.h:252
EtmV4ITrcPacket::setExceptionInfo
void setExceptionInfo(const uint16_t excep_type, const uint8_t addr_interp, const uint8_t m_fault_pending, const uint8_t m_type)
Definition: trc_pkt_elem_etmv4i.h:447
EtmV4ITrcPacket::setContextCID
void setContextCID(const uint32_t CID)
Definition: trc_pkt_elem_etmv4i.h:439
EtmV4ITrcPacket::clearTraceInfo
void clearTraceInfo()
clear all the trace info data prior to setting for new trace info packet.
Definition: trc_pkt_elem_etmv4i.h:235
ocsd_etmv4_i_pkt_type
enum _ocsd_etmv4_i_pkt_type ocsd_etmv4_i_pkt_type
EtmV4ITrcPacket::setContextVMID
void setContextVMID(const uint32_t VMID)
Definition: trc_pkt_elem_etmv4i.h:431
EtmV4ITrcPacket::updateErrType
void updateErrType(const ocsd_etmv4_i_pkt_type err_pkt_type, const uint8_t val=0)
Definition: trc_pkt_elem_etmv4i.h:227
EtmV4ITrcPacket::setCondRF1
void setCondRF1(const uint32_t key[2], const uint8_t res[2], const uint8_t CI[2], const bool set2Keys)
Definition: trc_pkt_elem_etmv4i.h:380
EtmV4ITrcPacket::set64BitAddress
void set64BitAddress(const uint64_t addr, const uint8_t IS)
Definition: trc_pkt_elem_etmv4i.h:455
ocsd_pkt_atm_type
enum _ocsd_pkt_atm_type ocsd_pkt_atm_type
EtmV4ITrcPacket::setCondIF2
void setCondIF2(uint8_t const c_elem_idx)
Definition: trc_pkt_elem_etmv4i.h:349
EtmV4ITrcPacket::setAddressExactMatch
void setAddressExactMatch(const uint8_t idx)
Definition: trc_pkt_elem_etmv4i.h:500
EtmV4ITrcPacket::setQType
void setQType(const bool has_count, const uint32_t count, const bool has_addr, const bool addr_match, const uint8_t type)
Definition: trc_pkt_elem_etmv4i.h:517
EtmV4ITrcPacket::setTraceInfoKey
void setTraceInfoKey(const uint32_t keyVal)
Definition: trc_pkt_elem_etmv4i.h:258
EtmV4ITrcPacket::setCancelElements
void setCancelElements(const uint32_t cancel_elem)
Definition: trc_pkt_elem_etmv4i.h:318
EtmV4ITrcPacket::setCondIF3
void setCondIF3(uint8_t const num_c_elem, const bool finalElem)
Definition: trc_pkt_elem_etmv4i.h:372
EtmV4ITrcPacket::setEvent
void setEvent(const uint8_t event_val)
Definition: trc_pkt_elem_etmv4i.h:512
EtmV4ITrcPacket::setCommitElements
void setCommitElements(const uint32_t commit_elem)
Definition: trc_pkt_elem_etmv4i.h:291
EtmV4ITrcPacket::setCondIF1
void setCondIF1(uint32_t const cond_key)
Definition: trc_pkt_elem_etmv4i.h:340
EtmV4ITrcPacket::setContextInfo
void setContextInfo(const bool update, const uint8_t EL=0, const uint8_t NS=0, const uint8_t SF=0)
Definition: trc_pkt_elem_etmv4i.h:419
EtmV4ITrcPacket::setCondRF4
void setCondRF4(const uint8_t token)
Definition: trc_pkt_elem_etmv4i.h:412
EtmV4ITrcPacket::setTraceInfoCyct
void setTraceInfoCyct(const uint32_t cyctVal)
Definition: trc_pkt_elem_etmv4i.h:270
EtmV4ITrcPacket::getP0Key
const uint32_t getP0Key() const
Definition: trc_pkt_elem_etmv4i.h:304
ETM4_PKT_I_BAD_SEQUENCE
@ ETM4_PKT_I_BAD_SEQUENCE
Definition: trc_pkt_types_etmv4.h:56
VA_32BIT
@ VA_32BIT
Definition: trc_pkt_types.h:54
VA_64BIT
@ VA_64BIT
Definition: trc_pkt_types.h:55
ATOM_REPEAT
@ ATOM_REPEAT
Definition: trc_pkt_types.h:76
_etmv4_context_t
Definition: trc_pkt_types_etmv4.h:179
_etmv4_context_t::SF
uint32_t SF
sixty four bit
Definition: trc_pkt_types_etmv4.h:182
_etmv4_context_t::VMID
uint32_t VMID
current VMID
Definition: trc_pkt_types_etmv4.h:189
_etmv4_context_t::updated_v
uint32_t updated_v
updated VMID
Definition: trc_pkt_types_etmv4.h:186
_etmv4_context_t::updated_c
uint32_t updated_c
updated CtxtID
Definition: trc_pkt_types_etmv4.h:185
_etmv4_context_t::ctxtID
uint32_t ctxtID
Current ctxtID.
Definition: trc_pkt_types_etmv4.h:188
_etmv4_context_t::updated
uint32_t updated
updated this context packet (otherwise same as last time)
Definition: trc_pkt_types_etmv4.h:184
_etmv4_context_t::NS
uint32_t NS
none secure
Definition: trc_pkt_types_etmv4.h:183
_etmv4_context_t::EL
uint32_t EL
exception level.
Definition: trc_pkt_types_etmv4.h:181
_ocsd_etmv4_i_pkt
Definition: trc_pkt_types_etmv4.h:199
_ocsd_etmv4_i_pkt::bits
struct _ocsd_etmv4_i_pkt::@17::@24 bits
_ocsd_etmv4_i_pkt::dsm_val
uint8_t dsm_val
Data Sync Marker number, or unnumbered atom count - packet type determines.
Definition: trc_pkt_types_etmv4.h:237
_ocsd_etmv4_i_pkt::exception_info
struct _ocsd_etmv4_i_pkt::@13 exception_info
_ocsd_etmv4_i_pkt::type
ocsd_etmv4_i_pkt_type type
Definition: trc_pkt_types_etmv4.h:200
_ocsd_etmv4_i_pkt::Q_pkt
struct _ocsd_etmv4_i_pkt::@16 Q_pkt
_ocsd_etmv4_i_pkt::p0_key
uint32_t p0_key
current P0 key value for data packet synchronisation
Definition: trc_pkt_types_etmv4.h:221
_ocsd_etmv4_i_pkt::trace_info
etmv4_trace_info_t trace_info
trace info structure - programmed configuration of trace capture.
Definition: trc_pkt_types_etmv4.h:226
_ocsd_etmv4_i_pkt::v_addr
ocsd_pkt_vaddr v_addr
most recently broadcast address packet
Definition: trc_pkt_types_etmv4.h:204
_ocsd_etmv4_i_pkt::num_c_elem
uint8_t num_c_elem
Definition: trc_pkt_types_etmv4.h:242
_ocsd_etmv4_i_pkt::cancel_elements
uint32_t cancel_elements
Definition: trc_pkt_types_etmv4.h:224
_ocsd_etmv4_i_pkt::addr_interp
uint32_t addr_interp
address value interpretation
Definition: trc_pkt_types_etmv4.h:230
_ocsd_etmv4_i_pkt::cond_instr
struct _ocsd_etmv4_i_pkt::@14 cond_instr
_ocsd_etmv4_i_pkt::err_type
ocsd_etmv4_i_pkt_type err_type
Definition: trc_pkt_types_etmv4.h:294
_ocsd_etmv4_i_pkt::m_fault_pending
uint32_t m_fault_pending
M class fault pending.
Definition: trc_pkt_types_etmv4.h:231
_ocsd_etmv4_i_pkt::curr_spec_depth
uint32_t curr_spec_depth
current speculation depth
Definition: trc_pkt_types_etmv4.h:220
_ocsd_etmv4_i_pkt::protocol_version
uint8_t protocol_version
Definition: trc_pkt_types_etmv4.h:298
_ocsd_etmv4_i_pkt::addr_match
uint32_t addr_match
Definition: trc_pkt_types_etmv4.h:270
_ocsd_etmv4_i_pkt::v_addr_ISA
uint8_t v_addr_ISA
ISA for the address packet. (0 = IS0 / 1 = IS1)
Definition: trc_pkt_types_etmv4.h:205
_ocsd_etmv4_i_pkt::ts
struct _ocsd_etmv4_i_pkt::@12 ts
_ocsd_etmv4_i_pkt::cc_threshold
uint32_t cc_threshold
cycle count threshold - from trace info.
Definition: trc_pkt_types_etmv4.h:214
_ocsd_etmv4_i_pkt::cond_result
struct _ocsd_etmv4_i_pkt::@15 cond_result
_ocsd_etmv4_i_pkt::cycle_count
uint32_t cycle_count
cycle count
Definition: trc_pkt_types_etmv4.h:218
_ocsd_etmv4_i_pkt::atom
ocsd_pkt_atom atom
atom elements - number of atoms indicates validity of packet
Definition: trc_pkt_types_etmv4.h:217
_ocsd_etmv4_i_pkt::context
etmv4_context_t context
current context for PE
Definition: trc_pkt_types_etmv4.h:207
_ocsd_etmv4_i_pkt::err_hdr_val
uint8_t err_hdr_val
Definition: trc_pkt_types_etmv4.h:295
_ocsd_etmv4_i_pkt::event_val
uint8_t event_val
Event value on event packet.
Definition: trc_pkt_types_etmv4.h:238
_ocsd_etmv4_i_pkt::addr_exact_match_idx
uint8_t addr_exact_match_idx
address match index in this packet.
Definition: trc_pkt_types_etmv4.h:236
_ocsd_etmv4_i_pkt::val
uint32_t val
Definition: trc_pkt_types_etmv4.h:278
_ocsd_etmv4_i_pkt::pkt_valid
union _ocsd_etmv4_i_pkt::@17 pkt_valid
valid bits for packet elements (addresses have their own valid bits).
_ocsd_etmv4_i_pkt::m_type
uint32_t m_type
1 if M class exception.
Definition: trc_pkt_types_etmv4.h:232
_ocsd_etmv4_i_pkt::commit_elements
uint32_t commit_elements
Definition: trc_pkt_types_etmv4.h:223
_ocsd_pkt_atom
Definition: trc_pkt_types.h:85
_ocsd_pkt_atom::num
uint8_t num
Definition: trc_pkt_types.h:91
_ocsd_pkt_atom::En_bits
uint32_t En_bits
Definition: trc_pkt_types.h:90
_ocsd_pkt_vaddr
Definition: trc_pkt_types.h:59
_ocsd_pkt_vaddr::valid_bits
uint8_t valid_bits
Definition: trc_pkt_types.h:63
_ocsd_pkt_vaddr::size
ocsd_pkt_va_size size
Definition: trc_pkt_types.h:60
_ocsd_pkt_vaddr::val
ocsd_vaddr_t val
Definition: trc_pkt_types.h:61
_ocsd_pkt_vaddr::pkt_bits
uint8_t pkt_bits
Definition: trc_pkt_types.h:62
trc_pkt_elem_base.h
trc_pkt_types_etmv4.h
trc_printable_elem.h
OpenCSD : Standard printable element base class.
_etmv4_trace_info_t
Definition: trc_pkt_types_etmv4.h:168
_etmv4_trace_info_t::val
uint32_t val
trace info full value.
Definition: trc_pkt_types_etmv4.h:169