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
>