aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Leach <mike.leach@linaro.org>2021-10-11 15:49:33 +0100
committerMike Leach <mike.leach@linaro.org>2021-10-11 16:00:29 +0100
commit169b3035da211922f5401c0ea0a5749907aa6daf (patch)
treeb9664d940dcb13192b559f2329b459f47ca695bb
parenta09b7011039cd3a87184a91ad7d2c0e485d04a16 (diff)
opencsd: etmv4: Add VMIDOpt enable call to config class
CONFIGR indicates selection of VMID options using bit 15, VMIDOpt and TRCIDR2.VMIDOPT values. Add function to ETMv4 / ETE config class to indicate the VMIDOpt selection. Signed-off-by: Mike Leach <mike.leach@linaro.org>
-rw-r--r--decoder/include/opencsd/etmv4/trc_cmp_cfg_etmv4.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/decoder/include/opencsd/etmv4/trc_cmp_cfg_etmv4.h b/decoder/include/opencsd/etmv4/trc_cmp_cfg_etmv4.h
index e46b71da9f1c..223dbda44510 100644
--- a/decoder/include/opencsd/etmv4/trc_cmp_cfg_etmv4.h
+++ b/decoder/include/opencsd/etmv4/trc_cmp_cfg_etmv4.h
@@ -153,6 +153,7 @@ public:
const bool enabledCCI() const;
const bool enabledCID() const;
const bool enabledVMID() const;
+ const bool enabledVMIDOpt() const;
typedef enum {
COND_TR_DIS,
@@ -436,6 +437,20 @@ inline const bool EtmV4Config::enabledVMID() const
return ((m_cfg.reg_configr & (0x1 << 7)) != 0);
}
+inline const bool EtmV4Config::enabledVMIDOpt() const
+{
+ bool vmidOptVal = ((m_cfg.reg_configr & (0x1 << 15)) != 0);
+ /* TRIDR2.VMIDOPT[30:29] determine value used */
+ if (!vmidOpt()) { /* [29] = 1'b0 */
+ vmidOptVal = false; /* res0 */
+ if (FullVersion() >= 0x45) {
+ /* umless version > 4.5 in which case [30] determines res val */
+ vmidOptVal = ((m_cfg.reg_idr2 & (0x1 << 30)) != 0);
+ }
+ }
+ return vmidOptVal;
+}
+
inline const EtmV4Config::CondITrace_t EtmV4Config::enabledCondITrace()
{
if(!m_condTraceCalc)