OpenCSD - CoreSight Trace Decode Library
0.14.0
|
Go to the documentation of this file.
35 #ifndef ARM_TRC_PKT_PROC_ETMV4I_IMPL_H_INCLUDED
36 #define ARM_TRC_PKT_PROC_ETMV4I_IMPL_H_INCLUDED
61 const uint32_t dataBlockSize,
62 const uint8_t *pDataBlock,
63 uint32_t *numBytesProcessed);
111 struct _t_info_pkt_prog {
116 #define TINFO_INFO_SECT 0x01
117 #define TINFO_KEY_SECT 0x02
118 #define TINFO_SPEC_SECT 0x04
119 #define TINFO_CYCT_SECT 0x08
120 #define TINFO_CTRL 0x20
121 #define TINFO_ALL_SECT 0x1F
122 #define TINFO_ALL 0x3F
131 bool m_bCtxtInfoDone;
162 void iNotSync(
const uint8_t lastByte);
163 void iPktNoPayload(
const uint8_t lastByte);
164 void iPktReserved(
const uint8_t lastByte);
165 void iPktExtension(
const uint8_t lastByte);
166 void iPktASync(
const uint8_t lastByte);
167 void iPktTraceInfo(
const uint8_t lastByte);
168 void iPktTimestamp(
const uint8_t lastByte);
169 void iPktException(
const uint8_t lastByte);
170 void iPktCycleCntF123(
const uint8_t lastByte);
171 void iPktSpeclRes(
const uint8_t lastByte);
172 void iPktCondInstr(
const uint8_t lastByte);
173 void iPktCondResult(
const uint8_t lastByte);
174 void iPktContext(
const uint8_t lastByte);
175 void iPktAddrCtxt(
const uint8_t lastByte);
176 void iPktShortAddr(
const uint8_t lastByte);
177 void iPktLongAddr(
const uint8_t lastByte);
178 void iPktQ(
const uint8_t lastByte);
179 void iAtom(
const uint8_t lastByte);
180 void iPktInvalidCfg(
const uint8_t lastByte);
182 unsigned extractContField(
const std::vector<uint8_t> &buffer,
const unsigned st_idx, uint32_t &value,
const unsigned byte_limit = 5);
183 unsigned extractContField64(
const std::vector<uint8_t> &buffer,
const unsigned st_idx, uint64_t &value,
const unsigned byte_limit = 9);
184 unsigned extractCondResult(
const std::vector<uint8_t> &buffer,
const unsigned st_idx, uint32_t& key, uint8_t &result);
185 void extractAndSetContextInfo(
const std::vector<uint8_t> &buffer,
const int st_idx);
186 int extract64BitLongAddr(
const std::vector<uint8_t> &buffer,
const int st_idx,
const uint8_t IS, uint64_t &value);
187 int extract32BitLongAddr(
const std::vector<uint8_t> &buffer,
const int st_idx,
const uint8_t IS, uint32_t &value);
188 int extractShortAddr(
const std::vector<uint8_t> &buffer,
const int st_idx,
const uint8_t IS, uint32_t &value,
int &bits);
194 struct _pkt_i_table_t {
199 void BuildIPacketTable();
201 void throwBadSequenceError(
const char *pszExtMsg);
212 #endif // ARM_TRC_PKT_PROC_ETMV4I_IMPL_H_INCLUDED
virtual ocsd_datapath_resp_t onEOT()
Implementation function for the OCSD_OP_EOT operation.
enum _ocsd_err_t ocsd_err_t
ocsd_trc_index_t m_update_on_unsync_packet_index
bool m_is_sync
seen first sync packet
ocsd_trc_index_t m_packet_index
const bool isBadPacket() const
void InitProcessorState()
ETMv4 Instuction Trace Protocol Packet.
Interpreter class for etm v4 config structure.
enum _ocsd_etmv4_i_pkt_type ocsd_etmv4_i_pkt_type
virtual ocsd_err_t onProtocolConfig()
Called when the configuration object is passed to the decoder.
virtual ocsd_datapath_resp_t onReset()
Implementation function for the OCSD_OP_RESET operation.
virtual const bool isBadPacket() const
check if the current packet is an error / bad packet
virtual ocsd_datapath_resp_t processData(const ocsd_trc_index_t index, const uint32_t dataBlockSize, const uint8_t *pDataBlock, uint32_t *numBytesProcessed)
Implementation function for the OCSD_OP_DATA operation.
process_state m_process_state
uint32_t ocsd_trc_index_t
virtual ocsd_datapath_resp_t onFlush()
Implementation function for the OCSD_OP_FLUSH operation.
unsigned m_dump_unsynced_bytes
number of unsynced bytes to send
std::vector< uint8_t > m_currPacketData
enum TrcPktProcEtmV4I::_process_state process_state
OpenCSD : Trace packet processor base class.
Packet Processor base class. Provides common infrastructure and interconnections for packet processor...
enum _ocsd_datapath_resp_t ocsd_datapath_resp_t
virtual ~TrcPktProcEtmV4I()
bool m_first_trace_info
seen first trace info packet after sync
ocsd_trc_index_t m_blockIndex
bool m_sent_notsync_packet
send one not sync packet if we see any unsynced data on the channel
EtmV4ITrcPacket m_curr_packet