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_WNDW_SECT 0x10 121 #define TINFO_CTRL 0x20 122 #define TINFO_ALL_SECT 0x1F 123 #define TINFO_ALL 0x3F 132 bool m_bCtxtInfoDone;
163 void iNotSync(
const uint8_t lastByte);
164 void iPktNoPayload(
const uint8_t lastByte);
165 void iPktReserved(
const uint8_t lastByte);
166 void iPktExtension(
const uint8_t lastByte);
167 void iPktASync(
const uint8_t lastByte);
168 void iPktTraceInfo(
const uint8_t lastByte);
169 void iPktTimestamp(
const uint8_t lastByte);
170 void iPktException(
const uint8_t lastByte);
171 void iPktCycleCntF123(
const uint8_t lastByte);
172 void iPktSpeclRes(
const uint8_t lastByte);
173 void iPktCondInstr(
const uint8_t lastByte);
174 void iPktCondResult(
const uint8_t lastByte);
175 void iPktContext(
const uint8_t lastByte);
176 void iPktAddrCtxt(
const uint8_t lastByte);
177 void iPktShortAddr(
const uint8_t lastByte);
178 void iPktLongAddr(
const uint8_t lastByte);
179 void iPktQ(
const uint8_t lastByte);
180 void iAtom(
const uint8_t lastByte);
181 void iPktInvalidCfg(
const uint8_t lastByte);
183 unsigned extractContField(
const std::vector<uint8_t> &buffer,
const unsigned st_idx, uint32_t &value,
const unsigned byte_limit = 5);
184 unsigned extractTSField64(
const std::vector<uint8_t> &buffer,
const unsigned st_idx, uint64_t &value);
185 unsigned extractCondResult(
const std::vector<uint8_t> &buffer,
const unsigned st_idx, uint32_t& key, uint8_t &result);
186 void extractAndSetContextInfo(
const std::vector<uint8_t> &buffer,
const int st_idx);
187 int extract64BitLongAddr(
const std::vector<uint8_t> &buffer,
const int st_idx,
const uint8_t IS, uint64_t &value);
188 int extract32BitLongAddr(
const std::vector<uint8_t> &buffer,
const int st_idx,
const uint8_t IS, uint32_t &value);
189 int extractShortAddr(
const std::vector<uint8_t> &buffer,
const int st_idx,
const uint8_t IS, uint32_t &value,
int &bits);
195 struct _pkt_i_table_t {
200 void BuildIPacketTable();
202 void throwBadSequenceError(
const char *pszExtMsg);
213 #endif // ARM_TRC_PKT_PROC_ETMV4I_IMPL_H_INCLUDED
Interpreter class for etm v4 config structure.
std::vector< uint8_t > m_currPacketData
bool m_sent_notsync_packet
send one not sync packet if we see any unsynced data on the channel
virtual const bool isBadPacket() const
check if the current packet is an error / bad packet
virtual ocsd_datapath_resp_t onReset()
Implementation function for the OCSD_OP_RESET operation.
enum TrcPktProcEtmV4I::_process_state process_state
virtual ocsd_datapath_resp_t onEOT()
Implementation function for the OCSD_OP_EOT operation.
enum _ocsd_datapath_resp_t ocsd_datapath_resp_t
const bool isBadPacket() const
enum _ocsd_etmv4_i_pkt_type ocsd_etmv4_i_pkt_type
ocsd_trc_index_t m_update_on_unsync_packet_index
Packet Processor base class. Provides common infrastructure and interconnections for packet processor...
bool m_is_sync
seen first sync packet
enum _ocsd_err_t ocsd_err_t
void InitProcessorState()
ocsd_trc_index_t m_packet_index
virtual ~TrcPktProcEtmV4I()
virtual ocsd_err_t onProtocolConfig()
Called when the configuration object is passed to the decoder.
EtmV4ITrcPacket m_curr_packet
ocsd_trc_index_t m_blockIndex
virtual ocsd_datapath_resp_t onFlush()
Implementation function for the OCSD_OP_FLUSH operation.
process_state m_process_state
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.
uint32_t ocsd_trc_index_t
ETMv4 Instuction Trace Protocol Packet.This class represents a single ETMv4 data trace packet...
bool m_first_trace_info
seen first trace info packet after sync
OpenCSD : Trace packet processor base class.
unsigned m_dump_unsynced_bytes
number of unsynced bytes to send