Hi, I’ve recently acquired a ZedBoard with the Zynq-7000 SoC and was interested in finding out if I could use `perf` as described on https://github.com/Linaro/OpenCSD/blob/master/HOWTO.md to grab trace data.
Unfortunately, zynq-7000.dtsi on (recent) Linux kernels does not yet contain the necessary device definitions, and zynq-zed.dts wasn’t even syntactically correct (but it was just the syntax for the include-statement, so easy to fix).
Based on Muhammad Wahab’s patch floating around the interwebs and studying the Zynq manual, I enabled support for some more of the devices (like the tpiu) in the devicetree.
But most crucially (I guess), I can’t identify what “etr” in the HOWTO corresponds to on the Zynq. This means that the sample line from the HOWTO above
$ ./tools/perf/perf record -e cs_etm/(a)20070000.etr/ --per-thread uname
won’t work.
Does anyone have experience in configuring the devicetree correctly for the Zynq? Should the perf-incantation on the Zynq also use .etr, or is there some other mechanism that perf can use on the Zynq?
Sincerely,
Volker Stolz
Good day all,
The kernel branches on the openCSD repository[1] have been moved to
their new living quarters [2] and the HOWTO.md on [1] modified to
reflect that. All we need to do is remove the kernel branches from
[1], something I'm planning to do by end of business on Monday.
Please get back to me if you need more time so that we can sketch out
a plan.
Thanks,
Mathieu
[1]. https://github.com/Linaro/OpenCSD
[2]. https://github.com/Linaro/perf-opencsd
Good morning Reza,
As highlighted in yesterday's email the best way to get involved in
the CoreSight project is to subscribe to the mailing list [1] and
attend the meeting we hold every two weeks in the #linaro-coresight
channel on freenode. The next meeting is scheduled for October 18th @
4PM (UTC).
As for STM, Chunyan wrote documentation that is available in the
kernel tree [2].
It would be interesting if you guys could come up with a list of items
that you want to see addressed. From there we could post them to the
perf-opencsd wiki (to be officially published imminently) and have
some sort of a tick list for items that are currently being worked on
and those up for grab.
Best regards,
Mathieu
[1]. https://lists.linaro.org/mailman/listinfo/coresight
[2]. http://elixir.free-electrons.com/linux/latest/source/Documentation/trace/st…
Modifyting instructions to point to the new kernel repository on
gitHub so that kernel related branches in the openCSD repository
can be delete.
Signed-off-by: Mathieu Poirier <mathieu.poirier(a)linaro.org>
---
HOWTO.md | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/HOWTO.md b/HOWTO.md
index 835def5765e6..dd4fe2057548 100644
--- a/HOWTO.md
+++ b/HOWTO.md
@@ -7,8 +7,8 @@ This HOWTO explains how to use the perf cmd line tools and the openCSD
library to collect and extract program flow traces generated by the
CoreSight IP blocks on a Linux system. The examples have been generated using
an aarch64 Juno-r0 platform. All information is considered accurate and tested
-using library version v0.6 and the `perf-opencsd-master` branch on the
-[OpenCSD github repository][1].
+using the latest version of the library and the `master` branch on the
+[perf-opencsd github repository][1].
On Target Trace Acquisition - Perf Record
@@ -280,7 +280,7 @@ As stated above not all the pieces of the solution have been upstreamed. To
get all the components the latest `perf-opencsd-master` needs to be
obtained:
- linaro@t430:~/linaro/coresight$ git clone -b perf-opencsd-master https://github.com/Linaro/OpenCSD.git perf-opencsd-master
+ linaro@t430:~/linaro/coresight$ git clone -b perf-opencsd-master https://github.com/Linaro/perf-opencsd.git perf-opencsd-master
...
...
@@ -586,7 +586,7 @@ Best regards,
*The Linaro CoreSight Team*
--------------------------------------
-[1]: https://github.com/Linaro/OpenCSD "OpenCSD Github"
+[1]: https://github.com/Linaro/perf-opencsd "perf-opencsd Github"
[2]: http://people.linaro.org/~mathieu.poirier/openCSD/uname.v4.user.sept20.tgz
--
2.7.4
RTFM to me :)
Solution was easy:
echo 1 > /sys/kernel/debug/coresight_cpu_debug/enable
Regards
Marek
W dniu 2017-10-02 19:16:12 użytkownik Mathieu Poirier <mathieu.poirier(a)linaro.org> napisał:
> On 2 October 2017 at 09:41, marekzmyslowski
> <marekzmyslowski(a)poczta.onet.pl> wrote:
> > Hello Mathieu,
> >
> > I'm trying to use CSAL for DragonBoard. The fisrt thing there is rom_init. According to the docs, the rom that needs to be mmaped is 0x800000. Is there any way to check if the power domain or clock turned om?
>
> There is no way to check from user space. When using the CSAL people
> will typically connect to the board using a Dstream (or another Jtag
> solution). That typically switch on the power domain and the required
> clock, given the initialisation script for the board has done that
> correctly.
>
> The dragonboard is popular and ubiquitous, it shouldn't be hard to
> find a Jtag init script on the internet somewhere. If you don't have
> a Jtag you can read the Jtag init script for that board and enact the
> same operations by mmap'ing memory areas and flipping bits.
>
> >
> > Regards
> > Marek
> >
> > W dniu 2017-10-02 16:50:08 użytkownik Mathieu Poirier <mathieu.poirier(a)linaro.org> napisał:
> >> On 2 October 2017 at 02:15, marekzmyslowski
> >> <marekzmyslowski(a)poczta.onet.pl> wrote:
> >> > Hello,
> >> >
> >> > I'm trying to get access to Qualcomm Debug Subsystem on my DragonBoard 410c by using the mmap. Just want to read data available in DQSS_DAPROM. However when I try to do that, the system is rebooting. Any idea why I can't do that?
> >> >
> >> > int size = 4096;
> >> > off_t addr_to_map = 0x00800000; //according to docs this is an address of QDSS_DAPROM
> >> >
> >> > int mem_fd = open("/dev/mem", O_RDWR);
> >> > localv = mmap(0, size, PROT_READ, MAP_SHARED, mem_fd, addr_to_map);
> >> > printf ("mmap completed %p.\n", localv);
> >> > tab = (unsigned int *)localv;
> >> > printf ("%u\n", tab[0]);
> >> >
> >> > Result of my application execution:
> >> > mmap completed 0x7fa29f0000.[ 484.585864] Synchronous External Abort: synchronous external abort (0x92000010) at 0x0000007fa29f0000
> >>
> >>
> >> This is usually an indication the memory area you are trying to reach
> >> is not accessible - either the power domain hasn't been switched on or
> >> the clock(s) aren't enabled. Is there a device driver specific to the
> >> DQSS_DAPROM?
> >>
> >> >
> >> > Regards
> >> > Marek
> >> >
> >> > Linux linaro-developer 4.14.0-rc1+ #2 SMP PREEMPT Thu Sep 21 10:39:33 CEST 2017 aarch64 GNU/Linux
> >> >
> >> > _______________________________________________
> >> > CoreSight mailing list
> >> > CoreSight(a)lists.linaro.org
> >> > https://lists.linaro.org/mailman/listinfo/coresight
> >>
> >
> >
> >
>
Hello Mathieu,
I'm trying to use CSAL for DragonBoard. The fisrt thing there is rom_init. According to the docs, the rom that needs to be mmaped is 0x800000. Is there any way to check if the power domain or clock turned om?
Regards
Marek
W dniu 2017-10-02 16:50:08 użytkownik Mathieu Poirier <mathieu.poirier(a)linaro.org> napisał:
> On 2 October 2017 at 02:15, marekzmyslowski
> <marekzmyslowski(a)poczta.onet.pl> wrote:
> > Hello,
> >
> > I'm trying to get access to Qualcomm Debug Subsystem on my DragonBoard 410c by using the mmap. Just want to read data available in DQSS_DAPROM. However when I try to do that, the system is rebooting. Any idea why I can't do that?
> >
> > int size = 4096;
> > off_t addr_to_map = 0x00800000; //according to docs this is an address of QDSS_DAPROM
> >
> > int mem_fd = open("/dev/mem", O_RDWR);
> > localv = mmap(0, size, PROT_READ, MAP_SHARED, mem_fd, addr_to_map);
> > printf ("mmap completed %p.\n", localv);
> > tab = (unsigned int *)localv;
> > printf ("%u\n", tab[0]);
> >
> > Result of my application execution:
> > mmap completed 0x7fa29f0000.[ 484.585864] Synchronous External Abort: synchronous external abort (0x92000010) at 0x0000007fa29f0000
>
>
> This is usually an indication the memory area you are trying to reach
> is not accessible - either the power domain hasn't been switched on or
> the clock(s) aren't enabled. Is there a device driver specific to the
> DQSS_DAPROM?
>
> >
> > Regards
> > Marek
> >
> > Linux linaro-developer 4.14.0-rc1+ #2 SMP PREEMPT Thu Sep 21 10:39:33 CEST 2017 aarch64 GNU/Linux
> >
> > _______________________________________________
> > CoreSight mailing list
> > CoreSight(a)lists.linaro.org
> > https://lists.linaro.org/mailman/listinfo/coresight
>