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
>
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
Regards
Marek
Linux linaro-developer 4.14.0-rc1+ #2 SMP PREEMPT Thu Sep 21 10:39:33 CEST 2017 aarch64 GNU/Linux
Hi Leo,
Busybox gives the same results:
root@linaro-developer:~# busybox devmem 0x00800000
[ 1713.501755] Synchronous External Abort: synchronous external abort (0x92000010) at 0x0000007fbb6eb000
How this clock can be enabled? I though it is already enabled. I used default configuration for db410c and it includes the msm8916.dtsi file.
Regards
Marek
W dniu 2017-10-02 12:02:55 użytkownik Leo Yan <leo.yan(a)linaro.org> napisał:
> On Mon, Oct 02, 2017 at 11:15:27AM +0200, marekzmyslowski 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
>
> Seems this external exception relate with clock, so need enable
> RPM_QDSS_CLK clock firstly?
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arc…
>
> Thanks,
> Leo Yan
>
Good day all,
As discussed in the meeting yesterday I have started a new gitHub
repository [1] to host the perf-opencsd kernel. Right now it has all
the same kernel branches as found on the openCSD repository. I have
also added a small wiki that gives people a little bit of information
on the repository itself. Note that the openCSD repository hasn't
been modified yet and that *everything* in the perf-opencsd is
currently considered experimental. I am sharing this early to give
people a chance to comment on the structure, naming and whatever they
want to see modified.
Regards,
Mathieu
[1]. https://github.com/Linaro/perf-opencsd
Hi,
This patchset adds support for user space decoding of CoreSight traces [1]
of the ARM architecture. Kernel support for configuring CoreSight tracers
and collect the hardware trace data in the auxtrace section of the
perf.data file is already integrated [2]. The user space implementation
mirrors to a large degree that of the Intel Processor Trace (PT) [3]
implementation, except that the decoder library itself is separate from the
perf tool sources, and is built and maintained as a separate open source
project [4]. Instead, this patch set includes the necessary code and build
settings to interfaces to the decoder library, as well as a "stub" or "null"
library for the case when the perf tool is built without the library.
The decoder library interface code in this patch set only supports ETMv4
trace decoding, though the library itself supports a broader range. Future
patches will add support for more versions of the ARM ETM trace encoding.
Changes from v2:
Changed patch sequence to enable packet dump (-D or --dump-raw-trace
option) first. Then build up to full packet decode. Also added functions
to the trace decoder library interface as they are referenced by the
functions in the main coresight processing file and combined them in those
patches.
Changes from v3:
Introduced functions in cs-etm-decoder.c at the same time they are
referenced in cs-etm.c, and not waiting until the very end to change the
build script to compile the full decoder library interface.
Changes from v4:
Removed function to directly read vmlinux file text section, instead
relying on perf dso access functions.
Changes from v5:
Refactored cs-etm-decoder-stub.c so that the different parts are
introduced when the corresponding parts in cs-etm-decoder.c are added.
Changed error returns in cs-etm-decoder.c to use enums as opposed to
literals.
Changed handling of how memory access function is added to decoder
library. Now, instead of adding for each MMAP2 entry and the kernel only
one entry is added for the entire address space. The functionality is
equivalent to the previous, except the code is simpler.
Changes from v6:
Removed stub library, instead replaced by conditionally using a static
inline function in cs-etm.h when the decoder library is not available.
Tor Jeremiassen (22):
perf tools: Add initial hooks for decoding coresight traces
perf tools: Add processing of coresight metadata
perf tools: Add coresight trace decoder library interface
perf tools: Add data block processing function
perf tools: Add etmv4i packet printing capability
perf tools: Add decoder new and free
perf tools: Add trace packet print for dump_trace option
perf tools: Add code to process the auxtrace perf event
perf tools: Add function to read data from dsos
perf tools: Add mapping from cpu to cs_etm_queue
perf tools: Add functions to allocate and free queues
perf tools: Add functions to setup and initialize queues
perf tools: Add functions to allocate and free queues
perf tools: Add function to get trace data from aux buffer
perf tools: Add function to run the trace decoder and process samples
perf tools: Add functions to process queues and run the trace decoder
perf tools: Add perf event processing
perf tools: Add processing of queues when events are flushed
perf tools: Add synth_events and supporting functions
perf tools: Add function to clear the decoder packet buffer
perf tools: Add functions for full etmv4i packet decode
MAINTAINERS: Adding entry for CoreSight trace decoding
MAINTAINERS | 3 +-
tools/perf/Makefile.config | 26 +
tools/perf/util/Build | 6 +
tools/perf/util/auxtrace.c | 2 +
tools/perf/util/cs-etm-decoder/Build | 2 +
tools/perf/util/cs-etm-decoder/cs-etm-decoder.c | 526 ++++++++++
tools/perf/util/cs-etm-decoder/cs-etm-decoder.h | 133 +++
tools/perf/util/cs-etm.c | 1179 +++++++++++++++++++++++
tools/perf/util/cs-etm.h | 50 +
9 files changed, 1926 insertions(+), 1 deletion(-)
create mode 100644 tools/perf/util/cs-etm-decoder/Build
create mode 100644 tools/perf/util/cs-etm-decoder/cs-etm-decoder.c
create mode 100644 tools/perf/util/cs-etm-decoder/cs-etm-decoder.h
create mode 100644 tools/perf/util/cs-etm.c
--
2.7.4