Loading...
Searching...
No Matches
TrcMemAccMapper Class Referenceabstract

`#include <trc_mem_acc_mapper.h>`

Inheritance diagram for TrcMemAccMapper:
[legend]
Collaboration diagram for TrcMemAccMapper:
[legend]

## Public Member Functions

| TrcMemAccMapper ()
| TrcMemAccMapper (bool using_trace_id)
virtual | ~TrcMemAccMapper ()
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)
virtual void | InvalidateMemAccCache (const uint8_t cs_trace_id)
virtual ocsd_err_t | AddAccessor (TrcMemAccessorBase *p_accessor, const uint8_t cs_trace_id)=0
virtual ocsd_err_t | RemoveAccessor (const TrcMemAccessorBase *p_accessor)=0
void | RemoveAllAccessors ()
ocsd_err_t | RemoveAccessorByAddress (const ocsd_vaddr_t st_address, const ocsd_mem_space_acc_t mem_space, const uint8_t cs_trace_id=0)
void | setErrorLog (ITraceErrorLog *err_log_i)
virtual void | logMappedRanges ()=0
Public Member Functions inherited from ITargetMemAccess
| ITargetMemAccess ()
virtual | ~ITargetMemAccess ()

## Protected Member Functions

virtual bool | findAccessor (const ocsd_vaddr_t address, const ocsd_mem_space_acc_t mem_space, const uint8_t cs_trace_id)=0
virtual bool | readFromCurrent (const ocsd_vaddr_t address, const ocsd_mem_space_acc_t mem_space, const uint8_t cs_trace_id)=0
virtual TrcMemAccessorBase * | getFirstAccessor ()=0
virtual TrcMemAccessorBase * | getNextAccessor ()=0
virtual void | clearAccessorList ()=0
void | LogMessage (const std::string &msg)
void | LogWarn (const ocsd_err_t err, const std::string &msg)

## Protected Attributes

TrcMemAccessorBase * | m_acc_curr
uint8_t | m_trace_id_curr
const bool | m_using_trace_id
ITraceErrorLog * | m_err_log
TrcMemAccCache | m_cache

## Detailed Description

Definition at line 50 of file trc_mem_acc_mapper.h.

## Constructor & Destructor Documentation

## TrcMemAccMapper() [1/2]

TrcMemAccMapper::TrcMemAccMapper | ( |  | ) |

## TrcMemAccMapper() [2/2]

TrcMemAccMapper::TrcMemAccMapper | ( | bool | using_trace_id | ) |

## ~TrcMemAccMapper()

virtual TrcMemAccMapper::~TrcMemAccMapper | ( |  | ) |

virtual

## Member Function Documentation

## AddAccessor()

virtual ocsd_err_t TrcMemAccMapper::AddAccessor | ( | TrcMemAccessorBase * | p_accessor,
|  | const uint8_t | cs_trace_id
| ) |  |

pure virtual

Implemented in TrcMemAccMapGlobalSpace.

## clearAccessorList()

virtual void TrcMemAccMapper::clearAccessorList | ( |  | ) |

protected pure virtual

Implemented in TrcMemAccMapGlobalSpace.

## findAccessor()

virtual bool TrcMemAccMapper::findAccessor | ( | const ocsd_vaddr_t | address,
|  | const ocsd_mem_space_acc_t | mem_space,
|  | const uint8_t | cs_trace_id
| ) |  |

protected pure virtual

Implemented in TrcMemAccMapGlobalSpace.

## getFirstAccessor()

virtual TrcMemAccessorBase * TrcMemAccMapper::getFirstAccessor | ( |  | ) |

protected pure virtual

Implemented in TrcMemAccMapGlobalSpace.

## getNextAccessor()

virtual TrcMemAccessorBase * TrcMemAccMapper::getNextAccessor | ( |  | ) |

protected pure virtual

Implemented in TrcMemAccMapGlobalSpace.

## InvalidateMemAccCache()

virtual void TrcMemAccMapper::InvalidateMemAccCache | ( | const uint8_t | cs_trace_id | ) |

virtual

Invalidate any caching that the memory accessor functions are using. Generally called when a memory context changes in the trace.

Parameters

  cs_trace_id | : protocol source trace ID.

Implements ITargetMemAccess.

## logMappedRanges()

virtual void TrcMemAccMapper::logMappedRanges | ( |  | ) |

pure virtual

Implemented in TrcMemAccMapGlobalSpace.

## LogMessage()

void TrcMemAccMapper::LogMessage | ( | const std::string & | msg | ) |

protected

## LogWarn()

void TrcMemAccMapper::LogWarn | ( | const ocsd_err_t | err,
|  | const std::string & | msg
| ) |  |

protected

## readFromCurrent()

virtual bool TrcMemAccMapper::readFromCurrent | ( | const ocsd_vaddr_t | address,
|  | const ocsd_mem_space_acc_t | mem_space,
|  | const uint8_t | cs_trace_id
| ) |  |

protected pure virtual

Implemented in TrcMemAccMapGlobalSpace.

## ReadTargetMemory()

virtual ocsd_err_t TrcMemAccMapper::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
| ) |  |

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.

Parameters

  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.

Returns
  ocsd_err_t : OCSD_OK on successful access (including memory not available)

Implements ITargetMemAccess.

## RemoveAccessor()

virtual ocsd_err_t TrcMemAccMapper::RemoveAccessor | ( | const TrcMemAccessorBase * | p_accessor | ) |

pure virtual

Implemented in TrcMemAccMapGlobalSpace.

## RemoveAccessorByAddress()

ocsd_err_t TrcMemAccMapper::RemoveAccessorByAddress | ( | const ocsd_vaddr_t | st_address,
|  | const ocsd_mem_space_acc_t | mem_space,
|  | const uint8_t | cs_trace_id = `0`
| ) |  |

## RemoveAllAccessors()

void TrcMemAccMapper::RemoveAllAccessors | ( |  | ) |

## setErrorLog()

void TrcMemAccMapper::setErrorLog | ( | ITraceErrorLog * | err_log_i | ) |

## Member Data Documentation

## m_acc_curr

TrcMemAccessorBase* TrcMemAccMapper::m_acc_curr

protected

Definition at line 97 of file trc_mem_acc_mapper.h.

## m_cache

TrcMemAccCache TrcMemAccMapper::m_cache

protected

Definition at line 101 of file trc_mem_acc_mapper.h.

## m_err_log

ITraceErrorLog* TrcMemAccMapper::m_err_log

protected

Definition at line 100 of file trc_mem_acc_mapper.h.

## m_trace_id_curr

uint8_t TrcMemAccMapper::m_trace_id_curr

protected

Definition at line 98 of file trc_mem_acc_mapper.h.

## m_using_trace_id

const bool TrcMemAccMapper::m_using_trace_id

protected

Definition at line 99 of file trc_mem_acc_mapper.h.

The documentation for this class was generated from the following file:

- /build/libopencsd-16huoW/libopencsd-1.4.1/decoder/include/mem_acc/trc_mem_acc_mapper.h