Bug 321396 - Add Support for Freescale e500v2 SPE Architecture.
Summary: Add Support for Freescale e500v2 SPE Architecture.
Status: REPORTED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-19 16:35 UTC by Anmol P. Paralkar
Modified: 2015-09-01 14:54 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anmol P. Paralkar 2013-06-19 16:35:42 UTC
Freescale plans to contribute back its port of Valgrind-3.8.1 to its
  e500v2 SPE Architecture. We are currently working on making the 
  patches available here:

  http://git.freescale.com/git/cgit.cgi/ppc/sdk/
 
  Meanwhile, the work will be available via the upcoming SDK-1.4 release
Comment 1 Julian Seward 2013-07-03 10:43:12 UTC
>   http://git.freescale.com/git/cgit.cgi/ppc/sdk/

Where exactly in this tree?
Comment 2 Anmol P. Paralkar 2013-07-26 15:58:10 UTC
Hello Julian,

 My apologies, I had missed reading your message.
 
 The patches will be posted to: http://git.freescale.com/git/cgit.cgi/ppc/sdk/
 once they clear the internal reviews (technical and legal).

 Would you like to see the 3.8.1 based tarball in the meanwhile?

 Thank you.

Regards,
Anmol.
Comment 3 Julian Seward 2013-09-19 16:32:24 UTC
Please attach the patch(es) here for review.
Comment 4 Anmol P. Paralkar 2013-09-19 17:35:04 UTC
ACK.
Comment 5 Anmol P. Paralkar 2013-09-19 17:35:31 UTC
ACK.
Comment 6 Anmol P. Paralkar 2014-04-09 17:37:31 UTC
To obtain the port:

 Please download the QorIQ Linux SDK V1.5 Yocto Source ISO from:

 http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=SDKLINUX

 Click the Downloads tab, then click:

 > Operating System Software-Board Support Packages(16)

 and then click on: QorIQ Linux SDK V1.5 Yocto Source ISO

 To get the Valgrind with e500v2 support:

 $ mkdir sdk-1.5
 $ sudo mount -o loop QorIQ-SDK-V1.5-SOURCE-20131219-yocto.iso sdk-1.5/  
 $ cd sdk-1.5
 $ ./install
 $ cd ~/QorIQ-SDK-V1.5-20131219-yocto/
 $ ./scripts/host-prepare.sh
 $  find . -name '*valgrind*'
   ...
 $ cd meta-fsl-networking/recipes-devtools/valgrind/files/
 $ ls valgrind-3.8.1.tar.gz # Unzip and untar

 Please see: FSL-SPE-README.txt
Comment 7 Anmol P. Paralkar 2014-07-21 23:15:46 UTC
To verify; build test_spe which has at least one unit-test per SPE insn:

root@p1022ds:~/valgrind-3.8.1/memcheck/tests/ppc32# make test_spe

then,

root@p1022ds:~/valgrind-3.8.1# perl tests/vg_regtest memcheck/tests/ppc32/test_spe.vgtest
test_spe:        valgrind   --leak-check=full ./test_spe

== 1 test, 0 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==
Comment 8 Anmol P. Paralkar 2014-11-12 20:49:33 UTC
SDK-1.6  Instructions:
-----------------------------

 Download SDK-1.6 from: http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=SDKLINUX

[b07584@salvator Downloads]$ mkdir sdk-1.6
[b07584@salvator Downloads]$ sudo mount -o loop QorIQ-SDK-V1.6-SOURCE-20140619-yocto.iso sdk-1.6/
mount: /dev/loop0 is write-protected, mounting read-only
[b07584@salvator Downloads]$ cd sdk-1.6/
[b07584@salvator sdk-1.6]$ ./install

[b07584@salvator ~]$ cd /home/b07584/QorIQ-SDK-V1.6-20140619-yocto
[b07584@salvator QorIQ-SDK-V1.6-20140619-yocto]$ ./scripts/host-prepare.sh -f
...
[b07584@salvator QorIQ-SDK-V1.6-20140619-yocto]$ find . -name '*valgrind*'
./meta/recipes-devtools/valgrind
./meta/recipes-devtools/valgrind/valgrind_3.9.0.bb
./meta/recipes-devtools/valgrind/valgrind
./meta-fsl-networking/recipes-append/valgrind
./meta-fsl-networking/recipes-append/valgrind/valgrind_3.9.0.bbappend
./meta-fsl-networking/recipes-devtools/valgrind
./meta-fsl-networking/recipes-devtools/valgrind/files/valgrind-3.8.1.tar.gz <------------------------ Valgrind 3.8.1 with SPE port. (Please see: FSL-SPE-README.txt)
./meta-fsl-networking/recipes-devtools/valgrind/files/valgrind-3.8.1-Bug-308573.patch
./meta-fsl-networking/recipes-devtools/valgrind/files/valgrind-3.8.1-sepbuildfix.patch
./meta-fsl-networking/recipes-devtools/valgrind/valgrind_fsl.bb <------------------------------------ See this file for the patches to apply.
./sources/valgrind-3.8.1-sepbuildfix.patch.done
./sources/valgrind-3.9.0.tar.bz2.done
./sources/valgrind-3.9.0.tar.bz2
./sources/valgrind-3.8.1.tar.gz.done
./sources/valgrind-3.8.1-Bug-308573.patch.done
[b07584@salvator QorIQ-SDK-V1.6-20140619-yocto]$
Comment 9 Santosh 2015-04-08 10:17:15 UTC
Hello,

I get the following error on e500v2 cpu when I'm trying to use Valgrind from 
http://git.freescale.com/git/cgit.cgi/ppc/sdk/meta-fsl-networking.git

root@ppc52:~# valgrind -v netconf
==3166== Memcheck, a memory error detector
==3166== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==3166== Using Valgrind-3.8.1-FSL-SDK-1.4-spe-Fri-May-24-080638-PDT-2013 and LibVEX; rerun with -h for copyright info
==3166== Command: netconf
==3166==
--3166-- Valgrind options:
--3166--    -v
--3166-- Contents of /proc/version:
--3166--   Linux version 3.4.43-WR5.0.1.10_standard (hubjenkins@esekilx5098) (gcc version 4.6.3 (Wind River Linux Sourcery CodeBench 4.6a-116) ) #1 SMP PREEMPT Mon Mar 9 08:11:14 CET 2015
--3166-- Arch and hwcaps: PPC32, INVALID
--3166-- Page sizes: currently 4096, max supported 65536
--3166-- Valgrind library directory: /usr/lib/valgrind
--3166-- Reading syms from /lib/ld-2.15.so
--3166--   Considering /lib/ld-2.15.so ..
--3166--   .. CRC mismatch (computed 65fe4371 wanted 63de6e35)
--3166--   Considering /lib/.debug/ld-2.15.so ..
--3166--   .. CRC is valid
--3166-- Reading syms from /opt/com/bin/netconf
--3166--   Considering /opt/com/bin/netconf ..
--3166--   .. CRC mismatch (computed 1348a102 wanted 1abb35b1)
--3166--    object doesn't have a symbol table
--3166-- Reading syms from /usr/lib/valgrind/memcheck-ppc32-linux
--3166--   Considering /usr/lib/valgrind/memcheck-ppc32-linux ..
--3166--   .. CRC mismatch (computed b6d306c9 wanted 239f3ffe)
--3166--    object doesn't have a symbol table
--3166--    object doesn't have a dynamic symbol table
--3166-- Scheduler: using generic scheduler lock implementation.
--3166-- Reading suppressions file: /usr/lib/valgrind/default.supp
==3166== embedded gdbserver: reading from /tmp/vgdb-pipe-from-vgdb-to-3166-by-root-on-???
==3166== embedded gdbserver: writing to   /tmp/vgdb-pipe-to-vgdb-from-3166-by-root-on-???
==3166== embedded gdbserver: shared mem   /tmp/vgdb-pipe-shared-mem-vgdb-3166-by-root-on-???
==3166==
==3166== TO CONTROL THIS PROCESS USING vgdb (which you probably
==3166== don't want to do, unless you know exactly what you're doing,
==3166== or are doing some strange experiment):
==3166==   /usr/lib/valgrind/../../bin/vgdb --pid=3166 ...command...
==3166==
==3166== TO DEBUG THIS PROCESS USING GDB: start GDB like this
==3166==   /path/to/gdb netconf
==3166== and then give GDB the following command
==3166==   target remote | /usr/lib/valgrind/../../bin/vgdb --pid=3166
==3166== --pid is optional if only one valgrind process is running
==3166==

vex: priv/main_main.c:339 (LibVEX_Translate): Assertion `are_valid_hwcaps(VexArchPPC32, vta->archinfo_host.hwcaps)' failed.
vex storage: T total 0 bytes allocated
vex storage: P total 0 bytes allocated

valgrind: the 'impossible' happened:
   LibVEX called failure_exit().
==3166==    at 0x3806872C: ??? (in /usr/lib/valgrind/memcheck-ppc32-linux)
==3166==    by 0x380687A7: ??? (in /usr/lib/valgrind/memcheck-ppc32-linux)
==3166==    by 0x3806896F: ??? (in /usr/lib/valgrind/memcheck-ppc32-linux)
==3166==    by 0x38068983: ??? (in /usr/lib/valgrind/memcheck-ppc32-linux)
==3166==    by 0x3808456B: ??? (in /usr/lib/valgrind/memcheck-ppc32-linux)
==3166==    by 0x381195DF: ??? (in /usr/lib/valgrind/memcheck-ppc32-linux)
==3166==    by 0x381174A7: ??? (in /usr/lib/valgrind/memcheck-ppc32-linux)
==3166==    by 0x38086C83: ??? (in /usr/lib/valgrind/memcheck-ppc32-linux)
==3166==    by 0x380B7B9F: ??? (in /usr/lib/valgrind/memcheck-ppc32-linux)
==3166==    by 0x380CB01B: ??? (in /usr/lib/valgrind/memcheck-ppc32-linux)

sched status:
  running_tid=1

Thread 1: status = VgTs_Runnable
==3166==    at 0xFFD7C9C: _start (in /lib/ld-2.15.so)


Note: see also the FAQ in the source distribution.
It contains workarounds to several common problems.
In particular, if Valgrind aborted or crashed after
identifying problems in your program, there's a good chance
that fixing those problems will prevent Valgrind aborting or
crashing, especially if it happened in m_mallocfree.c.

If that doesn't help, please report this bug to: www.valgrind.org

In the bug report, send all the above text, the valgrind
version, and what OS and version you are using.  Thanks.