From 169b3035da211922f5401c0ea0a5749907aa6daf Mon Sep 17 00:00:00 2001 From: Mike Leach Date: Mon, 11 Oct 2021 15:49:33 +0100 Subject: 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 --- decoder/include/opencsd/etmv4/trc_cmp_cfg_etmv4.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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) -- cgit v1.2.3