lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Tue, 18 Jun 2024 15:27:23 +0800
From: Jie Gan <quic_jiegan@...cinc.com>
To: Mathieu Poirier <mathieu.poirier@...aro.org>,
        Suzuki K Poulose
	<suzuki.poulose@....com>,
        Alexander Shishkin
	<alexander.shishkin@...ux.intel.com>,
        Konrad Dybcio <konradybcio@...il.com>,
        Mike Leach <mike.leach@...aro.org>, Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>
CC: Jinlong Mao <quic_jinlmao@...cinc.com>,
        Greg Kroah-Hartman
	<gregkh@...uxfoundation.org>,
        <coresight@...ts.linaro.org>, <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>, <devicetree@...r.kernel.org>,
        Tingwei Zhang <quic_tingweiz@...cinc.com>,
        Yuanfang Zhang <quic_yuanfang@...cinc.com>,
        Tao Zhang
	<quic_taozha@...cinc.com>,
        Trilok Soni <quic_tsoni@...cinc.com>,
        Song Chai
	<quic_songchai@...cinc.com>,
        <linux-arm-msm@...r.kernel.org>, <andersson@...nel.org>,
        <quic_yijiyang@...cinc.com>, <quic_yuanjiey@...cinc.com>,
        <quic_liuxin@...cinc.com>, <quic_yanzl@...cinc.com>,
        <quic_xinlon@...cinc.com>, <quic_xueqnie@...cinc.com>,
        <quic_sijiwu@...cinc.com>
Subject: [PATCH v1 0/3] Add coresight slave register driver to support data filter function

The Coresight Slave Register(CSR) device hosts miscellaneous configuration
registers to control various features related to TMC ETR device.

The CSR device works as a helper device physically connected to the TMC ETR device.
---------------------------------------------------------
             |ETR0|             |ETR1|
              . \                 / .
              .  \               /  .
              .   \             /   .
              .    \           /    .
---------------------------------------------------     
ETR0ATID0-ETR0ATID3     CSR     ETR1ATID0-ETR1ATID3
---------------------------------------------------
Each ETR has four ATID registers with 128 bits long in total.
e.g. ETR0ATID0-ETR0ATID3 registers are used by ETR0 device.

Based on the trace id which is programed in CSR ATID register of
specific ETR, trace data with that trace id can get into ETR's buffer
while other trace data gets ignored. CSR may contain several ATID registers. 
Each ATID register is associated with an ETR device.

To achieve this function, the trace id is obtained and stored in the related
ETR device's driver data just before enabling the CSR. Then, the CSR
device can easily obtain the trace ID from the ETR's driver data because the
ETR's driver data is passed to the CSR's enable/disable functions.

Ensure that every source device has already allocated a trace ID in its probe
session because the sink device should always be the first device to
enable when operating coresight_enable_path function. As a helper device of the
ETR, the CSR device will program the ATID register of a specific ETR according to
the trace id to enable data filter function at a very early stage. Without the
correct trace ID, the enablement session will not work.

Each CSR's enable session will set one bit in the ATID register.
Every CSR's disbale seesion will reset all bits of the ATID register.

This patch only supports sysfs mode. I will send the perf mode part patch
once it is ready.

Looking forward to receiving comments as this is a new driver.

Thanks!

Jie Gan (3):
  dt-bindings: arm: Add binding document for Coresight Slave Register
    device.
  coresight: Add coresight slave register driver to support data filter
    function in sysfs mode
  arm64: dts: qcom: Add CSR and ETR nodes for SA8775p

 .../bindings/arm/arm,coresight-tmc.yaml       |   8 +
 .../bindings/arm/qcom,coresight-csr.yaml      |  49 +++
 arch/arm64/boot/dts/qcom/sa8775p.dtsi         | 167 ++++++++++
 drivers/hwtracing/coresight/Kconfig           |   6 +
 drivers/hwtracing/coresight/Makefile          |   1 +
 drivers/hwtracing/coresight/coresight-core.c  |   6 +-
 drivers/hwtracing/coresight/coresight-csr.c   | 315 ++++++++++++++++++
 drivers/hwtracing/coresight/coresight-csr.h   |  24 ++
 .../coresight/coresight-etm4x-core.c          |   1 +
 drivers/hwtracing/coresight/coresight-stm.c   |  50 ---
 drivers/hwtracing/coresight/coresight-sysfs.c |  45 ++-
 .../hwtracing/coresight/coresight-tmc-core.c  |   1 +
 drivers/hwtracing/coresight/coresight-tmc.h   |   2 +
 include/linux/coresight-stm.h                 |  44 +++
 14 files changed, 665 insertions(+), 54 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/qcom,coresight-csr.yaml
 create mode 100644 drivers/hwtracing/coresight/coresight-csr.c
 create mode 100644 drivers/hwtracing/coresight/coresight-csr.h

-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ