aboutsummaryrefslogtreecommitdiffstats
path: root/decoder/include/opencsd/etmv4/trc_pkt_elem_etmv4i.h
diff options
context:
space:
mode:
authorRuslan Bukin <br@FreeBSD.org>2019-10-10 13:19:21 +0000
committerRuslan Bukin <br@FreeBSD.org>2019-10-10 13:19:21 +0000
commitcf98ba14dc260458f757fa46419575cf69f45a44 (patch)
tree1cafc844f372337d2a95c8a416b915d46bf4daf8 /decoder/include/opencsd/etmv4/trc_pkt_elem_etmv4i.h
parenta6157d81121ac9559d806dafa346039199598442 (diff)
downloadsrc-cf98ba14dc260458f757fa46419575cf69f45a44.tar.gz
src-cf98ba14dc260458f757fa46419575cf69f45a44.zip
Import OpenCSD -- an ARM CoreSight Trace Decode library.vendor/opencsd/a1961c91b02a92f3c6ed8b145c636ac4c5565aca
Git ID a1961c91b02a92f3c6ed8b145c636ac4c5565aca Sponsored by: DARPA, AFRL
Notes
Notes: svn path=/vendor/opencsd/a1961c91b02a92f3c6ed8b145c636ac4c5565aca/; revision=353391 svn path=/vendor/opencsd/dist/; revision=353392; tag=vendor/opencsd/a1961c91b02a92f3c6ed8b145c636ac4c5565aca
Diffstat (limited to 'decoder/include/opencsd/etmv4/trc_pkt_elem_etmv4i.h')
-rw-r--r--decoder/include/opencsd/etmv4/trc_pkt_elem_etmv4i.h29
1 files changed, 17 insertions, 12 deletions
diff --git a/decoder/include/opencsd/etmv4/trc_pkt_elem_etmv4i.h b/decoder/include/opencsd/etmv4/trc_pkt_elem_etmv4i.h
index e0343c76260c..02adfc51aa75 100644
--- a/decoder/include/opencsd/etmv4/trc_pkt_elem_etmv4i.h
+++ b/decoder/include/opencsd/etmv4/trc_pkt_elem_etmv4i.h
@@ -115,7 +115,7 @@ public:
void initNextPacket(); //!< clear any single packet only flags / state.
void setType(const ocsd_etmv4_i_pkt_type pkt_type) { type = pkt_type; };
- void updateErrType(const ocsd_etmv4_i_pkt_type err_pkt_type);
+ void updateErrType(const ocsd_etmv4_i_pkt_type err_pkt_type, const uint8_t val = 0);
void clearTraceInfo(); //!< clear all the trace info data prior to setting for new trace info packet.
void setTraceInfo(const uint32_t infoVal);
@@ -208,11 +208,12 @@ private:
Etmv4PktAddrStack m_addr_stack;
};
-inline void EtmV4ITrcPacket::updateErrType(const ocsd_etmv4_i_pkt_type err_pkt_type)
+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()
@@ -223,7 +224,9 @@ inline void EtmV4ITrcPacket::clearTraceInfo()
pkt_valid.bits.spec_depth_valid = 0;
pkt_valid.bits.cc_thresh_valid = 0;
- pkt_valid.bits.ts_valid = 0; // mark TS as invalid - must be re-updated after trace info.
+ // set these as defaults - if they don't appear in TINFO this is the state.
+ setTraceInfo(0);
+ setTraceInfoSpec(0);
}
inline void EtmV4ITrcPacket::setTraceInfo(const uint32_t infoVal)
@@ -444,18 +447,20 @@ inline void EtmV4ITrcPacket::set32BitAddress(const uint32_t addr, const uint8_t
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;
+ if (pkt_valid.bits.context_valid && context.SF)
+ {
+ v_addr.size = VA_64BIT;
+ 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.val = (v_addr.val & ~mask) | (addr & mask);
+ }
else
{
- v_addr.val &= 0xFFFFFFFF; // ensure vaddr is only 32 bits if not 64 bit
+ v_addr.val = addr;
v_addr.size = VA_32BIT;
- }
-
- if (v_addr.valid_bits < 32) // may be 64 bit address so only set 32 if less
- v_addr.valid_bits = 32;
-
- v_addr.val = (v_addr.val & ~mask) | (addr & mask);
+ v_addr.valid_bits = 32;
+ }
+
v_addr_ISA = IS;
push_vaddr();
}