On 14 June 2016 at 05:42, Mike Leach mike.leach@linaro.org wrote:
Hi Mathieu,
Thanks for looking at this, a few comments inline....
Mike
On 12 June 2016 at 18:49, Mathieu Poirier mathieu.poirier@linaro.org wrote:
On 3 June 2016 at 02:26, Mike Leach mike.leach@linaro.org wrote:
Please provide a description of the changes presented this patch.
Signed-off-by: Mike Leach mike.leach@linaro.org
.../ref_trace_decode_lib.vcxproj | 2 + .../ref_trace_decode_lib.vcxproj.filters | 6 + decoder/include/common/ocsd_code_follower.h | 225 +++++++++++++++++++++ decoder/include/common/ocsd_pe_context.h | 4 +- decoder/include/ocsd_if_types.h | 2 + decoder/source/ocsd_code_follower.cpp | 155 ++++++++++++++ 6 files changed, 392 insertions(+), 2 deletions(-) create mode 100644 decoder/include/common/ocsd_code_follower.h create mode 100644 decoder/source/ocsd_code_follower.cpp
[...]
@@ -330,6 +331,7 @@ typedef enum _ocsd_sec_level */ typedef enum _ocsd_ex_level {
- ocsd_EL_unknown = -1, /**< EL unknown / unsupported in trace */
Can I suggest ocsd_ELERR ?
EL unknown is most appropriate here - this is a genuine unknown, not an error situation.
Ok, I get it.
ETMv4 traces ELs explicitly - EL will be unknown until we see the first context packet. ETMv3.5 traces hyp bit - EL will be EL2 if hyp bit active, unknown otherwise. ETMv3.4 and below, PTM - no explicit EL tracing - EL unknown all the time.
ocsd_EL0 = 0, /**< EL0 */ ocsd_EL1, /**< EL1 */ ocsd_EL2, /**< EL2 */
[...]
+ocsd_err_t OcsdCodeFollower::decodeSingleOpCode() +{
- ocsd_err_t err = OCSD_OK;
- uint32_t bytesReq = 4;
This initialisation isn't necessary.
It really rather is - it is the buffer size passed into ReadTargetMemory(). A comment will be added though
I thought is was a return value only - yes, it needs to stay as it is.
- uint32_t opcode;
- err =
m_pMemAccess->first()->ReadTargetMemory(m_instr_info.instr_addr,m_mem_space_csid,m_mem_acc_rule,&bytesReq,(uint8_t *)&opcode);
- if(err == OCSD_OK)
- {
if(bytesReq == 4) // got memory.
Please explain the hard coded value.
Check on number of bytes returned by memory access - will add comment
{
m_instr_info.opcode = opcode;
err =
m_pIDecode->first()->DecodeInstruction(&m_instr_info);
}
else // memory unavailable.
{
m_b_nacc_err = true;
m_nacc_address = m_instr_info.instr_addr;
err = OCSD_ERR_MEM_NACC;
}
- }
- return err;
+}
+/* End of File ocsd_code_follower.cpp */
1.9.1
CoreSight mailing list CoreSight@lists.linaro.org https://lists.linaro.org/mailman/listinfo/coresight
-- Mike Leach Principal Engineer, ARM Ltd. Blackburn Design Centre. UK