OpenCSD - CoreSight Trace Decode Library
1.3.3
|
Interface to target memory access. More...
#include <trc_tgt_mem_access_i.h>
Public Member Functions | |
ITargetMemAccess () | |
virtual | ~ITargetMemAccess () |
virtual ocsd_err_t | ReadTargetMemory (const ocsd_vaddr_t address, const uint8_t cs_trace_id, const ocsd_mem_space_acc_t mem_space, uint32_t *num_bytes, uint8_t *p_buffer)=0 |
virtual void | InvalidateMemAccCache (const uint8_t cs_trace_id)=0 |
Interface to target memory access.
Read Target memory call is used by the decoder to access the memory location in the target memory space for the next instruction(s) to be traced.
Memory data returned is to be little-endian.
The implementator of this interface could either use file(s) containing dumps of memory locations from the target, be an elf file reader extracting code, or a live target connection, depending on the tool execution context.
Definition at line 56 of file trc_tgt_mem_access_i.h.
|
inline |
Definition at line 59 of file trc_tgt_mem_access_i.h.
|
inlinevirtual |
default interface constructor
Definition at line 60 of file trc_tgt_mem_access_i.h.
|
pure virtual |
Invalidate any caching that the memory accessor functions are using. Generally called when a memory context changes in the trace.
cs_trace_id | : protocol source trace ID. |
Implemented in TrcMemAccMapper.
|
pure virtual |
default interface destructor
Read a block of target memory into supplied buffer.
Bytes read set less than bytes required, along with a success return code indicates full memory location not accessible. Function will return all accessible bytes from the address up to the point where the first inaccessible location appears.
The cs_trace_id associates a memory read with a core. Different cores may have different memory spaces, the memory access may take this into account. Access will first look in the registered memory areas associated with the ID, failing that will look into any global memory spaces.
address | : Address to access. |
cs_trace_id | : protocol source trace ID. |
mem_space | : Memory space to access, (secure, non-secure, optionally with EL, or any). |
num_bytes | : [in] Number of bytes required. [out] Number of bytes actually read. |
*p_buffer | : Buffer to fill with the bytes. |
Implemented in TrcMemAccMapper.