summaryrefslogtreecommitdiffstats
path: root/decoder/include/opencsd/ete
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 07:24:57 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 07:24:57 +0000
commit070852d8604cece0c31f28ff3eb8d21d9ba415fb (patch)
tree9097175a6a5b8b7e37af9a96269ac0b61a0189cd /decoder/include/opencsd/ete
parentInitial commit. (diff)
downloadlibopencsd-070852d8604cece0c31f28ff3eb8d21d9ba415fb.tar.xz
libopencsd-070852d8604cece0c31f28ff3eb8d21d9ba415fb.zip
Adding upstream version 1.3.3.upstream/1.3.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--decoder/include/opencsd/ete/ete_decoder.h47
-rw-r--r--decoder/include/opencsd/ete/trc_cmp_cfg_ete.h81
-rw-r--r--decoder/include/opencsd/ete/trc_dcd_mngr_ete.h58
-rw-r--r--decoder/include/opencsd/ete/trc_pkt_types_ete.h66
4 files changed, 252 insertions, 0 deletions
diff --git a/decoder/include/opencsd/ete/ete_decoder.h b/decoder/include/opencsd/ete/ete_decoder.h
new file mode 100644
index 0000000..ba0d718
--- /dev/null
+++ b/decoder/include/opencsd/ete/ete_decoder.h
@@ -0,0 +1,47 @@
+/*
+* \file ete_decoder.h
+* \brief OpenCSD : Top level header file for ETE decoder.
+*
+* \copyright Copyright (c) 2019, ARM Limited. All Rights Reserved.
+*/
+
+/*
+* Redistribution and use in source and binary forms, with or without modification,
+* are permitted provided that the following conditions are met:
+*
+* 1. Redistributions of source code must retain the above copyright notice,
+* this list of conditions and the following disclaimer.
+*
+* 2. Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following disclaimer in the documentation
+* and/or other materials provided with the distribution.
+*
+* 3. Neither the name of the copyright holder nor the names of its contributors
+* may be used to endorse or promote products derived from this software without
+* specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND
+* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef ARM_ETE_DECODER_H_INCLUDED
+#define ARM_ETE_DECODER_H_INCLUDED
+
+// ETE actually uses extended ETMv4 packet processor and decode
+// ETE specifics limited to configuration
+//
+#include "trc_cmp_cfg_ete.h"
+#include "trc_pkt_types_ete.h"
+
+#endif // ARM_ETE_DECODER_H_INCLUDED
+
+/* End of File ete_decoder.h */
+
diff --git a/decoder/include/opencsd/ete/trc_cmp_cfg_ete.h b/decoder/include/opencsd/ete/trc_cmp_cfg_ete.h
new file mode 100644
index 0000000..8365ffa
--- /dev/null
+++ b/decoder/include/opencsd/ete/trc_cmp_cfg_ete.h
@@ -0,0 +1,81 @@
+/*
+* \file trc_cmp_cfg_ete.h
+* \brief OpenCSD : ETE configuration
+*
+* \copyright Copyright (c) 2019, ARM Limited. All Rights Reserved.
+*/
+
+/*
+* Redistribution and use in source and binary forms, with or without modification,
+* are permitted provided that the following conditions are met:
+*
+* 1. Redistributions of source code must retain the above copyright notice,
+* this list of conditions and the following disclaimer.
+*
+* 2. Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following disclaimer in the documentation
+* and/or other materials provided with the distribution.
+*
+* 3. Neither the name of the copyright holder nor the names of its contributors
+* may be used to endorse or promote products derived from this software without
+* specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND
+* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef ARM_TRC_CMP_CFG_ETE_H_INCLUDED
+#define ARM_TRC_CMP_CFG_ETE_H_INCLUDED
+
+#include "trc_pkt_types_ete.h"
+#include "opencsd/etmv4/trc_cmp_cfg_etmv4.h"
+
+/** @addtogroup ocsd_protocol_cfg
+@{*/
+
+/** @name ETE configuration
+@{*/
+
+/*!
+ * @class ETEConfig
+ * @brief Interpreter class for ETE config structure
+ *
+ * ETE trace and config are a superset of ETMv4 trace and config - hence
+ * use the EtmV4Config class as a base.
+ */
+class ETEConfig : public EtmV4Config
+{
+public:
+ ETEConfig();
+ ETEConfig(const ocsd_ete_cfg *cfg_regs);
+ ~ETEConfig();
+
+ //! copy assignment operator for base structure into class.
+ ETEConfig & operator=(const ocsd_ete_cfg *p_cfg);
+
+ //! cast operator returning struct const reference
+ operator const ocsd_ete_cfg &() const { return m_ete_cfg; };
+ //! cast operator returning struct const pointer
+ operator const ocsd_ete_cfg *() const { return &m_ete_cfg; };
+
+private:
+ void copyV4(); // copy relevent config to underlying structure.
+
+ ocsd_ete_cfg m_ete_cfg;
+};
+
+
+/** @}*/
+/** @}*/
+
+#endif // ARM_TRC_CMP_CFG_ETE_H_INCLUDED
+
+/* End of File trc_cmp_cfg_ete.h */
diff --git a/decoder/include/opencsd/ete/trc_dcd_mngr_ete.h b/decoder/include/opencsd/ete/trc_dcd_mngr_ete.h
new file mode 100644
index 0000000..7b0c134
--- /dev/null
+++ b/decoder/include/opencsd/ete/trc_dcd_mngr_ete.h
@@ -0,0 +1,58 @@
+/*
+* \file trc_dcd_mngr_ete.h
+* \brief OpenCSD : ETE decoder creation.
+*
+* \copyright Copyright (c) 2019, ARM Limited. All Rights Reserved.
+*/
+
+/*
+* Redistribution and use in source and binary forms, with or without modification,
+* are permitted provided that the following conditions are met:
+*
+* 1. Redistributions of source code must retain the above copyright notice,
+* this list of conditions and the following disclaimer.
+*
+* 2. Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following disclaimer in the documentation
+* and/or other materials provided with the distribution.
+*
+* 3. Neither the name of the copyright holder nor the names of its contributors
+* may be used to endorse or promote products derived from this software without
+* specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND
+* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef ARM_TRC_DCD_MNGR_ETE_H_INCLUDED
+#define ARM_TRC_DCD_MNGR_ETE_H_INCLUDED
+
+#include "common/ocsd_dcd_mngr.h"
+#include "trc_cmp_cfg_ete.h"
+#include "opencsd/etmv4/trc_pkt_decode_etmv4i.h"
+#include "opencsd/etmv4/trc_pkt_proc_etmv4.h"
+
+class DecoderMngrETE : public DecodeMngrFullDcdExCfg< EtmV4ITrcPacket,
+ ocsd_etmv4_i_pkt_type,
+ EtmV4Config,
+ ETEConfig,
+ ocsd_ete_cfg,
+ TrcPktProcEtmV4I,
+ TrcPktDecodeEtmV4I>
+{
+public:
+ DecoderMngrETE(const std::string &name) : DecodeMngrFullDcdExCfg(name, OCSD_PROTOCOL_ETE) {};
+ virtual ~DecoderMngrETE() {};
+};
+
+#endif // ARM_TRC_DCD_MNGR_ETE_H_INCLUDED
+
+/* End of File trc_dcd_mngr_ete.h */
diff --git a/decoder/include/opencsd/ete/trc_pkt_types_ete.h b/decoder/include/opencsd/ete/trc_pkt_types_ete.h
new file mode 100644
index 0000000..f87d454
--- /dev/null
+++ b/decoder/include/opencsd/ete/trc_pkt_types_ete.h
@@ -0,0 +1,66 @@
+/*
+ * \file trc_pkt_types_ete.h
+ * \brief OpenCSD : ETE types
+ *
+ * \copyright Copyright (c) 2019, ARM Limited. All Rights Reserved.
+ */
+
+/*
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. Neither the name of the copyright holder nor the names of its contributors
+ * may be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ARM_TRC_PKT_TYPES_ETE_H_INCLUDED
+#define ARM_TRC_PKT_TYPES_ETE_H_INCLUDED
+
+#include "opencsd/trc_pkt_types.h"
+#include "opencsd/etmv4/trc_pkt_types_etmv4.h"
+ /** @addtogroup trc_pkts
+ @{*/
+
+ /** @name ETE config Types
+ @{*/
+
+
+typedef struct _ocsd_ete_cfg
+{
+ uint32_t reg_idr0; /**< ID0 register */
+ uint32_t reg_idr1; /**< ID1 register */
+ uint32_t reg_idr2; /**< ID2 register */
+ uint32_t reg_idr8; /**< ID8 - maxspec */
+ uint32_t reg_devarch; /**< DevArch register */
+ uint32_t reg_configr; /**< Config Register */
+ uint32_t reg_traceidr; /**< Trace Stream ID register */
+ ocsd_arch_version_t arch_ver; /**< Architecture version */
+ ocsd_core_profile_t core_prof; /**< Core Profile */
+} ocsd_ete_cfg;
+
+
+/** @}*/
+/** @}*/
+
+#endif // ARM_TRC_PKT_TYPES_ETE_H_INCLUDED
+
+/* End of File trc_pkt_types_ete.h */