Hi Jeremy,
Please CC the coresight mailing list when asking questions.
On Thu, 6 Jun 2019 at 02:55, Student - Ng Yi Zher Jeremy
<jeremy_ng@mymail.sutd.edu.sg> wrote:
>
> Dear Sir,
>
> I have been looking at the documentations for Coresight to understand how I may be able to set parameters and options to tracing units through sysFS.
>
> Looking at the documentations for etm4x and tmc (
https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-bus-coresight-devices-etm4x and
https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-bus-coresight-devices-tmc respectively), I understand that the special files that I have access to read from registers directly are not writeable. However, in the coresight documentations,
What special files are you referring to?
(
https://static.docs.arm.com/ihi0064/f/etm_v4_4_architecture_specification_IHI0064F.pdf
and
http://infocenter.arm.com/help/topic/com.arm.doc.ddi0461b/DDI0461B_tmc_r0p1_trm.pdf
respectively), some of these registers are actually writeable.
Particularly, TRCCONFIGR in ETM drivers and MODE register in ETF
drivers are RW accessible. However, when I try to write to these
addresses directly from /dev/mem (or rather, mmap), I often get bus
errors (even for those that claims to be readable).
Register TRCCONFIGR has been set as RO because, from sysfs, there was
no use case to make it otherwise. That can be altered if you need to
use some of the functionality in that register. Simply get back to me
with the one you're looking for and we can discuss how it will be made
available.
The ETF's MODE register does not need to be configured by users - the
framework will place the ETF in the correct mode based on its role in
the trace session. If the ETF's "enable_sink" entry is selected, the
ETF is used as a sink and will be configured in circular buffer mode.
If another sink is selected and the ETF is part of the path from a
source to that sink, the framework will configure it in HW FIFO mode.
>
> I am using Hikey960 device on AOSP Android version R, Linux kernel 4.9. $ uname -a returns Linux localhost 4.9.176-12953-g7c09ed7b46a4-dirty #13 SMP PREEMPT Tue Jun 4 10:16:26 +08 2019 aarch64
>
> Hikey960 have 2 CPUs with 4 processors each: Cortex-A53 and Cortex-A73. Both have ETM4.0 r4 chips installed (this was derived from TRCIDR1, which yields 0x4100f404 when read).
>
> It will be a great help if you can assist me or point me to any link for reference.
I can't guide you to anything specific without a question.
Thanks,
Mathieu
>
> I look forward to your reply!
>
> Yours Sincerely,
> Jeremy
>
> This email may contain confidential and/or proprietary information that is exempt from disclosure under applicable law and is intended for receipt and use solely by the addressee(s) named above. If you are not the intended recipient, you are notified that
any use, dissemination, distribution, or copying of this email, or any attachment, is strictly prohibited. Please delete the email immediately and inform the sender. Thank You
>
> The above message may contain confidential and/or proprietary information that is exempt from disclosure under applicable law and is intended for receipt and use solely by the addressee(s) named above. If you are not the intended recipient, you are hereby
notified that any use, dissemination, distribution, or copying of this message, or any attachment, is strictly prohibited. If you have received this email in error, please inform the sender immediately by reply e-mail or telephone, reversing the charge if
necessary. Please delete the message thereafter. Thank you.