This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

dm3730, linux 3.13.2, SGX SDK 5.1.1.1

Other Parts Discussed in Thread: DM3730

I built the SDK and installed on my system.  When I run the rc.pvr script, I get this output

        # /etc/init.d/rc.pvr start

        /etc/init.d/rc.pvr: line 110: /usr/local/bin/pvrsrvctl: not found

pvrsrvctl does exist in that location:

        # ls -l /usr/local/bin/pvrsrvctl

        -rwxr-xr-x 1 root root 5660 Apr 16 2014 /usr/local/bin/pvrsrvctl

Perhaps the error is printed by pvrsrvctl for some file that it wants.

As pvrsrvctl comes as a blob, I'm not sure how to proceed. Any suggestions?

  • Blaine,

    Are you able to directly run pvrsrvctl from /use/local/bin/? If you got the same '... no such file' error, I guess the toolchain used to compile pvrsrvctl is different from the one used to build the filesystem.

  • It is certain that the toolchains are different, both regarding glibc and the kernel (see some excerpts from the binary below).

    Yes, I can run it directly, and get exactly the same result.  If I run will just a request for help, I get

            # /usr/local/bin/pvrsrvctl --help
            /usr/bin/sh: /usr/local/bin/pvrsrvctl: not found

    When I run

            strings /usr/local/bin/pvrsrvctl

    some of the interesting output is

            /usr/local/XSGX/lib

            GLIBC_2.4

            /lib/modules/3.2.0-dirty/extra/pvrsrvkm.ko

            Failed to load /lib/modules/3.2.0-dirty/extra/pvrsrvkm.ko

            /lib/modules/3.2.0-dirty/extra/omaplfb.ko

            Failed to load /lib/modules/3.2.0-dirty/extra/omaplfb.ko

    Makes me wonder if there is a dependency on one or more.

    The program is provided as a blob.  Can the provider give a more useful message, or, better, provide the source so that it can be built for the actual kernel and glibc I am running?

    This has put a complete stop on my project.

  • Blaine,
    Let me point you to some resources in the meantime to help guide this discussion. I did notice that other users have ongoing discussion on similar issues, so I wanted to bring that to your attention. Please see the following 3 posts: 

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717/p/330088/1150805.aspx#1150805 http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/t/300031.aspx http://e2e.ti.com/support/arm/sitara_arm/f/791/t/326107.aspx

    The following wiki link is a good resource for SGX related questions (in case you haven't accessed it already):
    http://processors.wiki.ti.com/index.php/SGXDbg

     

  • I looked at the first three links and they all contained information the I knew and/or had tried.


    In looking at the SGXDbg page (which I have also looked at before), I decided rebuild for debug and then to try the "omap-demo".  (for reference, 'omap-demo', like 'pvrsrvctl', is delivered as a blob).  There seem to be two copies installed:

            # find / -name *demo
           /opt/gfxsdkdemos/omap-demo
           /etc/rc.d/init.d/omap-demo
           # cmp /opt/gfxsdkdemos/omap-demo /etc/rc.d/init.d/omap-demo
           /usr/bin/sh: cmp: not found
           # ls -la /opt/gfxsdkdemos/omap-demo /etc/rc.d/init.d/omap-demo
           -rwxr-xr-x    1 root     root          2159 Apr 28  2014 /etc/rc.d/init.d/omap-demo
           -rwxr-xr-x    1 root     root          2159 Apr 28  2014 /opt/gfxsdkdemos/omap-demo

    I ran both, getting different results

    Here's what I got:

           # /opt/gfxsdkdemos/omap-demo
           /dev/mem opened.
           Memory mapped at address 0xb6f11000.
           Value at address 0x48004B48 (0xb6f11b48): 0x3
           Written 0x2; readback 0x2
           /dev/mem opened.
           Memory mapped at address 0xb6fec000.
           Value at address 0x48004B10 (0xb6fecb10): 0x0
           Written 0x1; readback 0x1
           /dev/mem opened.
           Memory mapped at address 0xb6f9e000.
           Value at address 0x48004B00 (0xb6f9eb00): 0x0
           Written 0x2; readback 0x2
           0x10205
           debug5.x
           SGX Revision is 125...
           installing 5.x SGX debug user libraries
           
           Installing PowerVR Consumer/Embedded DDK 'sgxddk_1.10@2359475' on target
           
           File system installation root is /
           
           Uninstalling existing version sgxddk_1.10@2359475
           Uninstallation completed.
           boot script rc.pvr -> /etc/init.d/rc.pvr
           kernel module pvrsrvkm.ko -> /lib/modules//extra/pvrsrvkm.ko
           kernel module omaplfb.ko -> /lib/modules//extra/omaplfb.ko
           shared library libGLES_CM.so -> /usr/lib/libGLES_CM.so.1.10.2359475
           shared library libusc.so -> /usr/lib/libusc.so.1.10.2359475
           shared library libGLESv2.so -> /usr/lib/libGLESv2.so.1.10.2359475
           shared library libglslcompiler.so -> /usr/lib/libglslcompiler.so.1.10.2359475
           shared library libIMGegl.so -> /usr/lib/libIMGegl.so.1.10.2359475
           shared library libEGL.so -> /usr/lib/libEGL.so.1.10.2359475
           shared library libpvr2d.so -> /usr/lib/libpvr2d.so.1.10.2359475
           shared library libpvrPVR2D_BLITWSEGL.so -> /usr/lib/libpvrPVR2D_BLITWSEGL.so.1.10.2359475
           shared library libpvrPVR2D_FLIPWSEGL.so -> /usr/lib/libpvrPVR2D_FLIPWSEGL.so.1.10.2359475
           shared library libpvrPVR2D_FRONTWSEGL.so -> /usr/lib/libpvrPVR2D_FRONTWSEGL.so.1.10.2359475
           shared library libpvrPVR2D_LINUXFBWSEGL.so -> /usr/lib/libpvrPVR2D_LINUXFBWSEGL.so.1.10.2359475
           shared library libpvrEWS_WSEGL.so -> /usr/lib/libpvrEWS_WSEGL.so.1.10.2359475
           shared library libpvrEWS_REMWSEGL.so -> /usr/lib/libpvrEWS_REMWSEGL.so.1.10.2359475
           shared library libsrv_um.so -> /usr/lib/libsrv_um.so.1.10.2359475
           shared library libsrv_init.so -> /usr/lib/libsrv_init.so.1.10.2359475
           shared library libPVRScopeServices.so -> /usr/lib/libPVRScopeServices.so.1.10.2359475
           shared library libews.so -> /usr/lib/libews.so.1.10.2359475
           binary pvrsrvctl -> /usr/local/bin/pvrsrvctl
           binary sgx_init_test -> /usr/local/bin/sgx_init_test
           binary ews_server -> /usr/local/bin/ews_server
           binary ews_server_es2 -> /usr/local/bin/ews_server_es2
           binary services_test -> /usr/local/bin/services_test
           binary sgx_blit_test -> /usr/local/bin/sgx_blit_test
           binary sgx_clipblit_test -> /usr/local/bin/sgx_clipblit_test
           binary sgx_flip_test -> /usr/local/bin/sgx_flip_test
           binary sgx_render_flip_test -> /usr/local/bin/sgx_render_flip_test
           binary pvr2d_test -> /usr/local/bin/pvr2d_test
           binary gles1test1 -> /usr/local/bin/gles1test1
           binary gles1_texture_stream -> /usr/local/bin/gles1_texture_stream
           binary gles2test1 -> /usr/local/bin/gles2test1
           shader glsltest1_vertshader.txt -> /usr/local/bin/glsltest1_vertshader.txt
           shader glsltest1_fragshaderA.txt -> /usr/local/bin/glsltest1_fragshaderA.txt
           shader glsltest1_fragshaderB.txt -> /usr/local/bin/glsltest1_fragshaderB.txt
           binary gles2_texture_stream -> /usr/local/bin/gles2_texture_stream
           binary eglinfo -> /usr/local/bin/eglinfo
           binary ews_test_gles1 -> /usr/local/bin/ews_test_gles1
           binary ews_test_gles2 -> /usr/local/bin/ews_test_gles2
           shader ews_test_gles2_main.vert -> /usr/local/bin/ews_test_gles2_main.vert
           shader ews_test_gles2_main.frag -> /usr/local/bin/ews_test_gles2_main.frag
           shader ews_test_gles2_pp.vert -> /usr/local/bin/ews_test_gles2_pp.vert
           shader ews_test_gles2_pp.frag -> /usr/local/bin/ews_test_gles2_pp.frag
           binary ews_test_swrender -> /usr/local/bin/ews_test_swrender
           
           Installation complete!
           You may now reboot your target.
           
           ./rc.pvr: line 92: /usr/local/bin/pvrsrvctl: not found
           # # /opt/gfxsdkdemos/omap-demo/pt/gfxsdkdemos/omap-demot/gfxsdkdemos/omap-demo/gfxsdkdemos/omap-       demogfxsdkdemos/omap-demofxsdkdemos/omap-demoxsdkdemos/omap-demosdkdemos/omap-       demodkdemos/omap-demokdemos/omap-demodemos/omap-demoemos/omap-demomos/omap-       demoos/omap-demos/omap-demo/omap-demoe/omap-demo# /etc//omap-demor/omap-       democ/omap-demo# /etc/rc.d//omap-demo/omap-demo/omap-demo/omap-demo/omap-demo/omap-demoi/om       ap-demon/omap-demoi/omap-demo# /etc/init/omap-demo/omap-demo
           init.d/  inittab

           # /etc/init.d/omap# /etc/init.d/omap-demo
           /dev/mem opened.
           Memory mapped at address 0xb6f1a000.
           Value at address 0x48004B48 (0xb6f1ab48): 0x2
           Written 0x2; readback 0x2
           /dev/mem opened.
           Memory mapped at address 0xb6f86000.
           Value at address 0x48004B10 (0xb6f86b10): 0x1
           Written 0x1; readback 0x1
           /dev/mem opened.
           Memory mapped at address 0xb6f98000.
           Value at address 0x48004B00 (0xb6f98b00): 0x2
           Written 0x2; readback 0x2
           0x10205
           debug5.x
           SGX Revision is 125...
           installing 5.x SGX debug user libraries
           
           Installing PowerVR Consumer/Embedded DDK 'sgxddk_1.10@2359475' on target
           
           File system installation root is /
           
           Uninstalling existing version sgxddk_1.10@2359475
           Uninstallation completed.
           boot script rc.pvr -> /etc/init.d/rc.pvr
           kernel module pvrsrvkm.ko -> /lib/modules//extra/pvrsrvkm.ko
           kernel module omaplfb.ko -> /lib/modules//extra/omaplfb.ko
           shared library libGLES_CM.so -> /usr/lib/libGLES_CM.so.1.10.2359475
           shared library libusc.so -> /usr/lib/libusc.so.1.10.2359475
           shared library libGLESv2.so -> /usr/lib/libGLESv2.so.1.10.2359475
           shared library libglslcompiler.so -> /usr/lib/libglslcompiler.so.1.10.2359475
           shared library libIMGegl.so -> /usr/lib/libIMGegl.so.1.10.2359475
           shared library libEGL.so -> /usr/lib/libEGL.so.1.10.2359475
           shared library libpvr2d.so -> /usr/lib/libpvr2d.so.1.10.2359475
           shared library libpvrPVR2D_BLITWSEGL.so -> /usr/lib/libpvrPVR2D_BLITWSEGL.so.1.10.2359475
           shared library libpvrPVR2D_FLIPWSEGL.so -> /usr/lib/libpvrPVR2D_FLIPWSEGL.so.1.10.2359475
           shared library libpvrPVR2D_FRONTWSEGL.so -> /usr/lib/libpvrPVR2D_FRONTWSEGL.so.1.10.2359475
           shared library libpvrPVR2D_LINUXFBWSEGL.so -> /usr/lib/libpvrPVR2D_LINUXFBWSEGL.so.1.10.2359475
           shared library libpvrEWS_WSEGL.so -> /usr/lib/libpvrEWS_WSEGL.so.1.10.2359475
           shared library libpvrEWS_REMWSEGL.so -> /usr/lib/libpvrEWS_REMWSEGL.so.1.10.2359475
           shared library libsrv_um.so -> /usr/lib/libsrv_um.so.1.10.2359475
           shared library libsrv_init.so -> /usr/lib/libsrv_init.so.1.10.2359475
           shared library libPVRScopeServices.so -> /usr/lib/libPVRScopeServices.so.1.10.2359475
           shared library libews.so -> /usr/lib/libews.so.1.10.2359475
           binary pvrsrvctl -> /usr/local/bin/pvrsrvctl
           binary sgx_init_test -> /usr/local/bin/sgx_init_test
           binary ews_server -> /usr/local/bin/ews_server
           binary ews_server_es2 -> /usr/local/bin/ews_server_es2
           binary services_test -> /usr/local/bin/services_test
           binary sgx_blit_test -> /usr/local/bin/sgx_blit_test
           binary sgx_clipblit_test -> /usr/local/bin/sgx_clipblit_test
           binary sgx_flip_test -> /usr/local/bin/sgx_flip_test
           binary sgx_render_flip_test -> /usr/local/bin/sgx_render_flip_test
           binary pvr2d_test -> /usr/local/bin/pvr2d_test
           binary gles1test1 -> /usr/local/bin/gles1test1
           binary gles1_texture_stream -> /usr/local/bin/gles1_texture_stream
           binary gles2test1 -> /usr/local/bin/gles2test1
           shader glsltest1_vertshader.txt -> /usr/local/bin/glsltest1_vertshader.txt
           shader glsltest1_fragshaderA.txt -> /usr/local/bin/glsltest1_fragshaderA.txt
           shader glsltest1_fragshaderB.txt -> /usr/local/bin/glsltest1_fragshaderB.txt
           binary gles2_texture_stream -> /usr/local/bin/gles2_texture_stream
           binary eglinfo -> /usr/local/bin/eglinfo
           binary ews_test_gles1 -> /usr/local/bin/ews_test_gles1
           binary ews_test_gles2 -> /usr/local/bin/ews_test_gles2
           shader ews_test_gles2_main.vert -> /usr/local/bin/ews_test_gles2_main.vert
           shader ews_test_gles2_main.frag -> /usr/local/bin/ews_test_gles2_main.frag
           shader ews_test_gles2_pp.vert -> /usr/local/bin/ews_test_gles2_pp.vert
           shader ews_test_gles2_pp.frag -> /usr/local/bin/ews_test_gles2_pp.frag
           binary ews_test_swrender -> /usr/local/bin/ews_test_swrender
           
           Installation complete!
           You may now reboot your target.
           
           ./rc.pvr: line 92: /usr/local/bin/pvrsrvctl: not found

    The 'devmem2' parts are different, but I ran the '/opt' version again and it ended up with the same as the '/etc' version.  The first part:

            # /opt/gfxsdkdemos/omap-demo
           /dev/mem opened.
           Memory mapped at address 0xb6f54000.
           Value at address 0x48004B48 (0xb6f54b48): 0x2
           Written 0x2; readback 0x2
           /dev/mem opened.
           Memory mapped at address 0xb6f2e000.
           Value at address 0x48004B10 (0xb6f2eb10): 0x1
           Written 0x1; readback 0x1
           /dev/mem opened.
           Memory mapped at address 0xb6f22000.
           Value at address 0x48004B00 (0xb6f22b00): 0x2
           Written 0x2; readback 0x2
           0x10205
           debug5.x
           SGX Revision is 125...
           installing 5.x SGX debug user libraries
           

    Suggests to me some thing installed by the demo program changed the bits read back from the SGX device.

    Also, notice that the drivers are not installed correctly:

           kernel module pvrsrvkm.ko -> /lib/modules//extra/pvrsrvkm.ko
           kernel module omaplfb.ko -> /lib/modules//extra/omaplfb.ko

    There should be a kernel version between the '//'.  (As an aside, this, together with the (continuing) failure noted just below, suggests, to me, some kernel dependency that is not stated, or perhaps unknown or unrealized, in the SDK.)

    Anyway, notice that the failure is the same as I've noted before:

           ./rc.pvr: line 92: /usr/local/bin/pvrsrvctl: not found


    A lot of the stuff in SGXDbg assumes that the drivers have loaded, so it is not pertinent, in the presence of the above failure.

    The section titled, "Unable to install the kernel modules (pvrsrvkm.ko or omaplfb.ko)", point 5 points to, I think, the real problem, but the blob delivery of the user space programs, 'pvrsrvctl' and 'omap-demo', makes it impossible for me to fix.

  • I should also note that an associate of mine was told that "Graphics_SDK_5_01_00_01" (there are both hard and soft math versions; I'm using the hard one) is compatible with Linux 3.12.17, but the failures I noted above are from this pair.


    Additionally, I was originally (last Friday) getting failures loading 'pvrsvrkm" and when I modified the SDK to use 'devm_clk_get' rather than 'clk_get', the driver would load and there is a an item in the process list "pvr_timer".

  • Here's another interesting thing:  I wrote a little script that would try to execute each of the SDK-installed programs.  Here's the output:

            # ./exe-test.sh
    ==== sgx_init_test ====
    ./exe-test.sh: line 9: ./sgx_init_test: not found
    ==== ews_server ====
    ./ews_server: error while loading shared libraries: ld-linux-armhf.so.3: cannot open shared object file: No such file or directory
    ==== ews_server_es2 ====
    ./ews_server_es2: error while loading shared libraries: ld-linux-armhf.so.3: cannot open shared object file: No such file or directory
    ==== services_test ====
    ./exe-test.sh: line 9: ./services_test: not found
    ==== sgx_blit_test ====
    ./exe-test.sh: line 9: ./sgx_blit_test: not found
    ==== sgx_clipblit_test ====
    ./exe-test.sh: line 9: ./sgx_clipblit_test: not found
    ==== sgx_flip_test ====
    ./exe-test.sh: line 9: ./sgx_flip_test: not found
    ==== sgx_render_flip_test ====
    ./exe-test.sh: line 9: ./sgx_render_flip_test: not found
    ==== pvr2d_test ====
    ./exe-test.sh: line 9: ./pvr2d_test: not found
    ==== gles1test1 ====
    ./gles1test1: error while loading shared libraries: ld-linux-armhf.so.3: cannot open shared object file: No such file or directory
    ==== gles1_texture_stream ====
    ./gles1_texture_stream: error while loading shared libraries: ld-linux-armhf.so.3: cannot open shared object file: No such file or directory
    ==== gles2test1 ====
    ./gles2test1: error while loading shared libraries: ld-linux-armhf.so.3: cannot open shared object file: No such file or directory
    ==== gles2_texture_stream ====
    ./gles2_texture_stream: error while loading shared libraries: ld-linux-armhf.so.3: cannot open shared object file: No such file or directory
    ==== eglinfo ====
    ./eglinfo: error while loading shared libraries: ld-linux-armhf.so.3: cannot open shared object file: No such file or directory
    ==== ews_test_gles1 ====
    ./ews_test_gles1: error while loading shared libraries: ld-linux-armhf.so.3: cannot open shared object file: No such file or directory
    ==== ews_test_gles2 ====
    ./ews_test_gles2: error while loading shared libraries: ld-linux-armhf.so.3: cannot open shared object file: No such file or directory
    ==== ews_test_swrender ====
    ./ews_test_swrender: error while loading shared libraries: ld-linux-armhf.so.3: cannot open shared object file: No such file or directory

    So, there are two issues:

    - the 'not found' one we have been discussing.

    - missing 'ld-linux-armhf.so.3'

    This latter one indicates that I need to move to __at _least__ 'glibc-2.16, which I am doing now.

    Still, the first problem persists.

  • Back on Linux 3.13.2, glibc 2.18 (for the missing ld-linux-armhf.so.3) and SDK 5.1.1.1, with a bit of progress (show below), a different set of errors, but as predicted, the original problem (failure of pvrsvrctl) remains.

    # /tmp/exe-test.sh
    ==== sgx_init_test ====
    ./sgx_init_test: line 1: syntax error: unexpected word (expecting ")")
    ==== ews_server ====
    /tmp/exe-test.sh: line 9: ./ews_server: not found
    ==== ews_server_es2 ====
    /tmp/exe-test.sh: line 9: ./ews_server_es2: not found
    ==== services_test ====
    ./services_test: line 1: syntax error: unexpected word (expecting ")")
    ==== sgx_blit_test ====
    ./sgx_blit_test: line 1: syntax error: unexpected word (expecting ")")
    ==== sgx_clipblit_test ====
    ./sgx_clipblit_test: line 1: syntax error: unexpected word (expecting ")")
    ==== sgx_flip_test ====
    ./sgx_flip_test: line 1: syntax error: unexpected word (expecting ")")
    ==== sgx_render_flip_test ====
    ./sgx_render_flip_test: line 1: syntax error: unexpected word (expecting ")")
    ==== pvr2d_test ====
    ./pvr2d_test: line 1: syntax error: unexpected word (expecting ")")
    ==== gles1test1 ====
    /tmp/exe-test.sh: line 9: ./gles1test1: not found
    ==== gles1_texture_stream ====
    /tmp/exe-test.sh: line 9: ./gles1_texture_stream: not found
    ==== gles2test1 ====
    /tmp/exe-test.sh: line 9: ./gles2test1: not found
    ==== gles2_texture_stream ====
    /tmp/exe-test.sh: line 9: ./gles2_texture_stream: not found
    ==== eglinfo ====
    /tmp/exe-test.sh: line 9: ./eglinfo: not found
    ==== ews_test_gles1 ====
    /tmp/exe-test.sh: line 9: ./ews_test_gles1: not found
    ==== ews_test_gles2 ====
    /tmp/exe-test.sh: line 9: ./ews_test_gles2: not found
    ==== ews_test_swrender ====
    /tmp/exe-test.sh: line 9: ./ews_test_swrender: not found

  • I should have been more precise about pvrsrvctl.  Here's the actual output:

            # /etc/init.d/rc.pvr start
            /usr/local/bin/pvrsrvctl: line 1: syntax error: unexpected word (expecting ")")

    This matches the output of some of the other programs, show above.

    I'm not sure what to make of that error, though.

  • Check out this code from rc.pvr:

            # Delete the device for PVR services device and recreate with the
            # correct major number.
            #
            pvr_maj=`grep "pvrsrvkm$" /proc/devices | cut -b1,2,3`
            /bin/rm -f /dev/pvrsrvkm
            /bin/mknod /dev/pvrsrvkm c $pvr_maj 0
            /bin/chmod 666 /dev/pvrsrvkm

    This is something we did back at 2.2 kernel, and I might even have done it in the 2.4 kernel, but with 2.6, most drivers, or their parent, create the device file.  Is there any reason to be doing this in 2.6 and newer kernels?  Does the SDK support kernels earlier than 2.6?

    Just wondering.

  • I downloaded

             am335x-evm-sdk-src-07.00.00.00.tar.gz

    from

             http://software-dl.ti.com/sitara_linux/esd/AM335xSDK/latest/index_FDS.html

    and am using the contained 3.12.10 kernel and Graphics SDK.

    I ran readelf on the supplied pvrsrvctl (included at the end of this post).  This is the 'File Attributes' section:

         File Attributes
          Tag_CPU_name: "7-A"
          Tag_CPU_arch: v7
          Tag_CPU_arch_profile: Application
          Tag_ARM_ISA_use: Yes
          Tag_THUMB_ISA_use: Thumb-2
          Tag_FP_arch: VFPv3-D16
          Tag_ABI_PCS_wchar_t: 4
          Tag_ABI_FP_denormal: Needed
          Tag_ABI_FP_exceptions: Needed
          Tag_ABI_FP_number_model: IEEE 754
          Tag_ABI_align_needed: 8-byte
          Tag_ABI_align_preserved: 8-byte, except leaf SP
          Tag_ABI_enum_size: int
          Tag_ABI_HardFP_use: SP and DP
          Tag_ABI_VFP_args: VFP registers
          Tag_CPU_unaligned_access: v6
          Tag_DIV_use: Not allowed

    What is the interpretation of the line

            Tag_THUMB_ISA_use: Thumb-2

    I ask because I had to disable Thumb, in the kernel config, for the kernel to actually boot (it would Oops, which output I have also supplied at the end of this missive).

    ==== cut here ====

    ELF Header:
      Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
      Class:                             ELF32
      Data:                              2's complement, little endian
      Version:                           1 (current)
      OS/ABI:                            UNIX - System V
      ABI Version:                       0
      Type:                              EXEC (Executable file)
      Machine:                           ARM
      Version:                           0x1
      Entry point address:               0x8a41
      Start of program headers:          52 (bytes into file)
      Start of section headers:          4540 (bytes into file)
      Flags:                             0x5000002, has entry point, Version5 EABI
      Size of this header:               52 (bytes)
      Size of program headers:           32 (bytes)
      Number of program headers:         9
      Size of section headers:           40 (bytes)
      Number of section headers:         28
      Section header string table index: 27

    Section Headers:
      [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
      [ 0]                   NULL            00000000 000000 000000 00      0   0  0
      [ 1] .interp           PROGBITS        00008154 000154 000019 00   A  0   0  1
      [ 2] .note.ABI-tag     NOTE            00008170 000170 000020 00   A  0   0  4
      [ 3] .note.gnu.build-i NOTE            00008190 000190 000024 00   A  0   0  4
      [ 4] .gnu.hash         GNU_HASH        000081b4 0001b4 0000e0 04   A  5   0  4
      [ 5] .dynsym           DYNSYM          00008294 000294 0001e0 10   A  6   1  4
      [ 6] .dynstr           STRTAB          00008474 000474 00013b 00   A  0   0  1
      [ 7] .gnu.version      VERSYM          000085b0 0005b0 00003c 02   A  5   0  2
      [ 8] .gnu.version_r    VERNEED         000085ec 0005ec 000020 00   A  6   1  4
      [ 9] .rel.dyn          REL             0000860c 00060c 000010 08   A  5   0  4
      [10] .rel.plt          REL             0000861c 00061c 000090 08   A  5  12  4
      [11] .init             PROGBITS        000086ac 0006ac 00000a 00  AX  0   0  4
      [12] .plt              PROGBITS        000086b8 0006b8 0000f0 04  AX  0   0  4
      [13] .text             PROGBITS        000087a8 0007a8 000480 00  AX  0   0  4
      [14] .fini             PROGBITS        00008c28 000c28 000006 00  AX  0   0  4
      [15] .rodata           PROGBITS        00008c30 000c30 0001b8 00   A  0   0  4
      [16] .ARM.exidx        ARM_EXIDX       00008de8 000de8 000008 00  AL 13   0  4
      [17] .eh_frame         PROGBITS        00008df0 000df0 000004 00   A  0   0  4
      [18] .init_array       INIT_ARRAY      00010efc 000efc 000004 00  WA  0   0  4
      [19] .fini_array       FINI_ARRAY      00010f00 000f00 000004 00  WA  0   0  4
      [20] .jcr              PROGBITS        00010f04 000f04 000004 00  WA  0   0  4
      [21] .dynamic          DYNAMIC         00010f08 000f08 0000f8 08  WA  6   0  4
      [22] .got              PROGBITS        00011000 001000 000058 04  WA  0   0  4
      [23] .data             PROGBITS        00011058 001058 000008 00  WA  0   0  4
      [24] .bss              NOBITS          00011060 001060 000008 00  WA  0   0  8
      [25] .comment          PROGBITS        00000000 001060 00002a 01  MS  0   0  1
      [26] .ARM.attributes   ARM_ATTRIBUTES  00000000 00108a 000035 00      0   0  1
      [27] .shstrtab         STRTAB          00000000 0010bf 0000fa 00      0   0  1
    Key to Flags:
      W (write), A (alloc), X (execute), M (merge), S (strings)
      I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown)
      O (extra OS processing required) o (OS specific), p (processor specific)

    There are no section groups in this file.

    Program Headers:
      Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
      EXIDX          0x000de8 0x00008de8 0x00008de8 0x00008 0x00008 R   0x4
      PHDR           0x000034 0x00008034 0x00008034 0x00120 0x00120 R E 0x4
      INTERP         0x000154 0x00008154 0x00008154 0x00019 0x00019 R   0x1
          [Requesting program interpreter: /lib/ld-linux-armhf.so.3]
      LOAD           0x000000 0x00008000 0x00008000 0x00df4 0x00df4 R E 0x8000
      LOAD           0x000efc 0x00010efc 0x00010efc 0x00164 0x0016c RW  0x8000
      DYNAMIC        0x000f08 0x00010f08 0x00010f08 0x000f8 0x000f8 RW  0x4
      NOTE           0x000170 0x00008170 0x00008170 0x00044 0x00044 R   0x4
      GNU_STACK      0x000000 0x00000000 0x00000000 0x00000 0x00000 RW  0x4
      GNU_RELRO      0x000efc 0x00010efc 0x00010efc 0x00104 0x00104 R   0x1

     Section to Segment mapping:
      Segment Sections...
       00     .ARM.exidx
       01    
       02     .interp
       03     .interp .note.ABI-tag .note.gnu.build-id .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .plt .text .fini .rodata .ARM.exidx .eh_frame
       04     .init_array .fini_array .jcr .dynamic .got .data .bss
       05     .dynamic
       06     .note.ABI-tag .note.gnu.build-id
       07    
       08     .init_array .fini_array .jcr .dynamic

    Dynamic section at offset 0xf08 contains 26 entries:
      Tag        Type                         Name/Value
     0x00000001 (NEEDED)                     Shared library: [libsrv_init.so]
     0x00000001 (NEEDED)                     Shared library: [libc.so.6]
     0x0000000f (RPATH)                      Library rpath: [/usr/local/XSGX/lib]
     0x0000000c (INIT)                       0x86ad
     0x0000000d (FINI)                       0x8c29
     0x00000019 (INIT_ARRAY)                 0x10efc
     0x0000001b (INIT_ARRAYSZ)               4 (bytes)
     0x0000001a (FINI_ARRAY)                 0x10f00
     0x0000001c (FINI_ARRAYSZ)               4 (bytes)
     0x6ffffef5 (GNU_HASH)                   0x81b4
     0x00000005 (STRTAB)                     0x8474
     0x00000006 (SYMTAB)                     0x8294
     0x0000000a (STRSZ)                      315 (bytes)
     0x0000000b (SYMENT)                     16 (bytes)
     0x00000015 (DEBUG)                      0x0
     0x00000003 (PLTGOT)                     0x11000
     0x00000002 (PLTRELSZ)                   144 (bytes)
     0x00000014 (PLTREL)                     REL
     0x00000017 (JMPREL)                     0x861c
     0x00000011 (REL)                        0x860c
     0x00000012 (RELSZ)                      16 (bytes)
     0x00000013 (RELENT)                     8 (bytes)
     0x6ffffffe (VERNEED)                    0x85ec
     0x6fffffff (VERNEEDNUM)                 1
     0x6ffffff0 (VERSYM)                     0x85b0
     0x00000000 (NULL)                       0x0

    Relocation section '.rel.dyn' at offset 0x60c contains 2 entries:
     Offset     Info    Type            Sym.Value  Sym. Name
    00011054  00000115 R_ARM_GLOB_DAT    00000000   __gmon_start__
    00011060  00001414 R_ARM_COPY        00011060   stderr

    Relocation section '.rel.plt' at offset 0x61c contains 18 entries:
     Offset     Info    Type            Sym.Value  Sym. Name
    0001100c  00000c16 R_ARM_JUMP_SLOT   000086cc   fopen
    00011010  00000d16 R_ARM_JUMP_SLOT   000086d8   free
    00011014  00001916 R_ARM_JUMP_SLOT   000086e4   ftell
    00011018  00000816 R_ARM_JUMP_SLOT   000086f0   rewind
    0001101c  00001b16 R_ARM_JUMP_SLOT   000086fc   perror
    00011020  00001516 R_ARM_JUMP_SLOT   00008708   usleep
    00011024  00000416 R_ARM_JUMP_SLOT   00008714   fread
    00011028  00000516 R_ARM_JUMP_SLOT   00008720   SrvInit
    0001102c  00001d16 R_ARM_JUMP_SLOT   0000872c   malloc
    00011030  00001216 R_ARM_JUMP_SLOT   00008738   __libc_start_main
    00011034  00000116 R_ARM_JUMP_SLOT   00000000   __gmon_start__
    00011038  00001716 R_ARM_JUMP_SLOT   00008754   getopt_long
    0001103c  00001c16 R_ARM_JUMP_SLOT   00008760   syscall
    00011040  00001616 R_ARM_JUMP_SLOT   0000876c   __errno_location
    00011044  00000916 R_ARM_JUMP_SLOT   00008778   __fprintf_chk
    00011048  00001816 R_ARM_JUMP_SLOT   00008784   fclose
    0001104c  00000a16 R_ARM_JUMP_SLOT   00008790   fseek
    00011050  00000f16 R_ARM_JUMP_SLOT   0000879c   abort

    Unwind table index '.ARM.exidx' at offset 0xde8 contains 1 entries:

    0x8a40: 0x1 [cantunwind]


    Symbol table '.dynsym' contains 30 entries:
       Num:    Value  Size Type    Bind   Vis      Ndx Name
         0: 00000000     0 NOTYPE  LOCAL  DEFAULT  UND
         1: 00000000     0 NOTYPE  WEAK   DEFAULT  UND __gmon_start__
         2: 00000000     0 NOTYPE  WEAK   DEFAULT  UND _Jv_RegisterClasses
         3: 00011068     0 NOTYPE  GLOBAL DEFAULT  ABS _bss_end__
         4: 00008714     0 FUNC    GLOBAL DEFAULT  UND fread@GLIBC_2.4 (2)
         5: 00008720     0 FUNC    GLOBAL DEFAULT  UND SrvInit
         6: 00008c29     0 FUNC    GLOBAL DEFAULT   14 _fini
         7: 00011060     0 NOTYPE  GLOBAL DEFAULT  ABS __bss_start__
         8: 000086f0     0 FUNC    GLOBAL DEFAULT  UND rewind@GLIBC_2.4 (2)
         9: 00008778     0 FUNC    GLOBAL DEFAULT  UND __fprintf_chk@GLIBC_2.4 (2)
        10: 00008790     0 FUNC    GLOBAL DEFAULT  UND fseek@GLIBC_2.4 (2)
        11: 000086ad     0 FUNC    GLOBAL DEFAULT   11 _init
        12: 000086cc     0 FUNC    GLOBAL DEFAULT  UND fopen@GLIBC_2.4 (2)
        13: 000086d8     0 FUNC    GLOBAL DEFAULT  UND free@GLIBC_2.4 (2)
        14: 00011060     0 NOTYPE  GLOBAL DEFAULT  ABS __bss_start
        15: 0000879c     0 FUNC    GLOBAL DEFAULT  UND abort@GLIBC_2.4 (2)
        16: 00011068     0 NOTYPE  GLOBAL DEFAULT  ABS _end
        17: 00011068     0 NOTYPE  GLOBAL DEFAULT  ABS __end__
        18: 00008738     0 FUNC    GLOBAL DEFAULT  UND __libc_start_main@GLIBC_2.4 (2)
        19: 00011060     0 NOTYPE  GLOBAL DEFAULT  ABS _edata
        20: 00011060     4 OBJECT  GLOBAL DEFAULT   24 stderr@GLIBC_2.4 (2)
        21: 00008708     0 FUNC    GLOBAL DEFAULT  UND usleep@GLIBC_2.4 (2)
        22: 0000876c     0 FUNC    GLOBAL DEFAULT  UND __errno_location@GLIBC_2.4 (2)
        23: 00008754     0 FUNC    GLOBAL DEFAULT  UND getopt_long@GLIBC_2.4 (2)
        24: 00008784     0 FUNC    GLOBAL DEFAULT  UND fclose@GLIBC_2.4 (2)
        25: 000086e4     0 FUNC    GLOBAL DEFAULT  UND ftell@GLIBC_2.4 (2)
        26: 00011068     0 NOTYPE  GLOBAL DEFAULT  ABS __bss_end__
        27: 000086fc     0 FUNC    GLOBAL DEFAULT  UND perror@GLIBC_2.4 (2)
        28: 00008760     0 FUNC    GLOBAL DEFAULT  UND syscall@GLIBC_2.4 (2)
        29: 0000872c     0 FUNC    GLOBAL DEFAULT  UND malloc@GLIBC_2.4 (2)

    Histogram for `.gnu.hash' bucket list length (total of 17 buckets):
     Length  Number     % of total  Coverage
          0  4          ( 23.5%)
          1  7          ( 41.2%)     25.9%
          2  2          ( 11.8%)     40.7%
          3  1          (  5.9%)     51.9%
          4  2          ( 11.8%)     81.5%
          5  1          (  5.9%)    100.0%

    Version symbols section '.gnu.version' contains 30 entries:
     Addr: 00000000000085b0  Offset: 0x0005b0  Link: 5 (.dynsym)
      000:   0 (*local*)       0 (*local*)       0 (*local*)       1 (*global*)  
      004:   2 (GLIBC_2.4)     0 (*local*)       1 (*global*)      1 (*global*)  
      008:   2 (GLIBC_2.4)     2 (GLIBC_2.4)     2 (GLIBC_2.4)     1 (*global*)  
      00c:   2 (GLIBC_2.4)     2 (GLIBC_2.4)     1 (*global*)      2 (GLIBC_2.4) 
      010:   1 (*global*)      1 (*global*)      2 (GLIBC_2.4)     1 (*global*)  
      014:   2 (GLIBC_2.4)     2 (GLIBC_2.4)     2 (GLIBC_2.4)     2 (GLIBC_2.4) 
      018:   2 (GLIBC_2.4)     2 (GLIBC_2.4)     1 (*global*)      2 (GLIBC_2.4) 
      01c:   2 (GLIBC_2.4)     2 (GLIBC_2.4) 

    Version needs section '.gnu.version_r' contains 1 entries:
     Addr: 0x00000000000085ec  Offset: 0x0005ec  Link: 6 (.dynstr)
      000000: Version: 1  File: libc.so.6  Cnt: 1
      0x0010:   Name: GLIBC_2.4  Flags: none  Version: 2

    Displaying notes found at file offset 0x00000170 with length 0x00000020:
      Owner                 Data size    Description
      GNU                  0x00000010    NT_GNU_ABI_TAG (ABI version tag)
        OS: Linux, ABI: 2.6.31

    Displaying notes found at file offset 0x00000190 with length 0x00000024:
      Owner                 Data size    Description
      GNU                  0x00000014    NT_GNU_BUILD_ID (unique build ID bitstring)
        Build ID: 2f5554ed1a284d744dd879e8238db8f91a65a2bb
    Attribute Section: aeabi
    File Attributes
      Tag_CPU_name: "7-A"
      Tag_CPU_arch: v7
      Tag_CPU_arch_profile: Application
      Tag_ARM_ISA_use: Yes
      Tag_THUMB_ISA_use: Thumb-2
      Tag_FP_arch: VFPv3-D16
      Tag_ABI_PCS_wchar_t: 4
      Tag_ABI_FP_denormal: Needed
      Tag_ABI_FP_exceptions: Needed
      Tag_ABI_FP_number_model: IEEE 754
      Tag_ABI_align_needed: 8-byte
      Tag_ABI_align_preserved: 8-byte, except leaf SP
      Tag_ABI_enum_size: int
      Tag_ABI_HardFP_use: SP and DP
      Tag_ABI_VFP_args: VFP registers
      Tag_CPU_unaligned_access: v6
      Tag_DIV_use: Not allowed

    ==== cut here ====

    Unable to handle kernel NULL pointer dereference at virtual address 00000001
    pgd = c0004000
    [00000001] *pgd=00000000
    Internal error: Oops: 5 [#1] PREEMPT THUMB2
    Modules linked in:
    CPU: 0 PID: 0 Comm: swapper Not tainted 3.12.10+ #21
    task: c049e930 ti: c0494000 task.ti: c0494000
    PC is at prcm_clear_mod_irqs+0x4a/0xe4
    LR is at omap_sram_idle+0xf9/0x1a2
    pc : [<c001a202>]    lr : [<c001a41f>]    psr: 800001b3
    sp : c0495f20  ip : 00000010  fp : 00000000
    r10: c04a0d34  r9 : 00000000  r8 : 00000000
    r7 : 466abb90  r6 : c04e3d4c  r5 : 00000000  r4 : 00000001
    r3 : 00003430  r2 : 00000001  r1 : 00000000  r0 : 00000000
    Flags: Nzcv  IRQs off  FIQs on  Mode SVC_32  ISA Thumb  Segment kernel
    Control: 50c5387d  Table: 80004019  DAC: 00000015
    Process swapper (pid: 0, stack limit = 0xc0494240)
    Stack: (0xc0495f20 to 0xc0496000)
    5f20: 00000000 00000001 00000000 c001a41f 00000000 c04e3d68 00000001 00000003
    5f40: c04a0d34 c001aac3 860a3eb7 00000000 00000000 c04d2a50 c04a0d50 c04a0d50
    5f60: c0504da0 c01d9e07 860a3eb7 00000000 8609c781 c04d2a50 c0494000 c04d2a50
    5f80: 00000000 00000000 c04a0d50 c0504da0 00000000 c01d9eff c0494000 c0494000
    5fa0: ffffffff c046a938 c090eb40 413fc082 00000000 c000cef3 00000000 c003f17f
    5fc0: 00000000 c044e7f7 ffffffff ffffffff c044e423 00000000 00000000 c046a938
    5fe0: 50c53c7d c049c01c c046a934 c049f950 80004059 80008079 00000000 00000000
    [<c001a202>] (prcm_clear_mod_irqs+0x4a/0xe4) from [<c04d2a50>] (cpuidle_dev+0x0/0x138)
    Code: 4a27 4404 6812 4422 (6815) 4a24
    ---[ end trace 73ad51b2e92c8b17 ]---
    Kernel panic - not syncing: Attempted to kill the idle task!

  • May have made some progress.  I made this change:

            -CT_TARGET_CFLAGS="-mfpu=vfpv3-d16 -mfloat-abi=hard"
            +CT_TARGET_CFLAGS="-mfpu=vfpv3-d16 -mfloat-abi=hard -mthumb-interwork"

    but now I get

            # /etc/init.d/rc.pvr start
            ------------[ cut here ]------------
            WARNING: CPU: 0 PID: 176 at drivers/clk/clk.c:883 __clk_enable+0x24/0x98()
            Modules linked in: pvrsrvkm(O+)
            CPU: 0 PID: 176 Comm: modprobe Tainted: G           O 3.12.10 #1
            [<c0013314>] (unwind_backtrace+0x0/0xe0) from [<c0010db8>] (show_stack+0x10/0x14)
            [<c0010db8>] (show_stack+0x10/0x14) from [<c002fb60>] (warn_slowpath_common+0x60/0x80)
            [<c002fb60>] (warn_slowpath_common+0x60/0x80) from [<c002fc10>] (warn_slowpath_null+0x18/0x20)
            [<c002fc10>] (warn_slowpath_null+0x18/0x20) from [<c02e0b9c>] (__clk_enable+0x24/0x98)
            [<c02e0b9c>] (__clk_enable+0x24/0x98) from [<c02e0df0>] (clk_enable+0x18/0x2c)
            [<c02e0df0>] (clk_enable+0x18/0x2c) from [<bf019048>] (EnableSGXClocks+0x1c/0x8c [pvrsrvkm])
            [<bf019048>] (EnableSGXClocks+0x1c/0x8c [pvrsrvkm]) from [<bf01962c>] (SysInitialise+0x23c/0x2d8 [pvrsrvkm])
            [<bf01962c>] (SysInitialise+0x23c/0x2d8 [pvrsrvkm]) from [<bf00d644>] (PVRSRVDriverProbe+0x20/0x40 [pvrsrvkm])
            [<bf00d644>] (PVRSRVDriverProbe+0x20/0x40 [pvrsrvkm]) from [<c0232498>] (platform_drv_probe+0x14/0x18)
            [<c0232498>] (platform_drv_probe+0x14/0x18) from [<c02315ac>] (driver_probe_device+0xb0/0x210)
            [<c02315ac>] (driver_probe_device+0xb0/0x210) from [<c022fd9c>] (bus_for_each_drv+0x74/0x88)
            [<c022fd9c>] (bus_for_each_drv+0x74/0x88) from [<c02314bc>] (device_attach+0x64/0x88)
            [<c02314bc>] (device_attach+0x64/0x88) from [<c0230af0>] (bus_probe_device+0x28/0x98)
            [<c0230af0>] (bus_probe_device+0x28/0x98) from [<c022f180>] (device_add+0x4e8/0x5c8)
            [<c022f180>] (device_add+0x4e8/0x5c8) from [<c02327c4>] (platform_device_add+0x128/0x1bc)
            [<c02327c4>] (platform_device_add+0x128/0x1bc) from [<bf02c070>] (PVRCore_Init+0x70/0x160 [pvrsrvkm])
            [<bf02c070>] (PVRCore_Init+0x70/0x160 [pvrsrvkm]) from [<c0008954>] (do_one_initcall+0x94/0x130)
            [<c0008954>] (do_one_initcall+0x94/0x130) from [<c006e2b4>] (load_module+0x13d8/0x1544)
            [<c006e2b4>] (load_module+0x13d8/0x1544) from [<c006e554>] (SyS_finit_module+0x5c/0x6c)
            [<c006e554>] (SyS_finit_module+0x5c/0x6c) from [<c000ddc0>] (ret_fast_syscall+0x0/0x30)
            ---[ end trace cfcca4d18e673a2e ]---
            /usr/local/bin/pvrsrvctl: SrvInit failed (already initialized?) (err=4)

    I've posted above regarding the kernel trace.

    The interesting part is the error from /usr/local/bin/pvrsrvct.  Error 4 is, I believe, "interrupted system call"

            # /usr/local/bin/pvrsrvctl --start --no-module
            /usr/local/bin/pvrsrvctl: SrvInit failed (already initialized?) (err=4)

  • Here is where I've come to:

    - Linux 3.13.2 and Device Tree

       I pulled patches from ARCH Linux and TI so that I could use the reset support desired by the Graphics SDK.  I did have to extend the TI reset driver for the SGX PRM registers on the dm3730.  All of this required usage of device tree, which, in the end, has been pretty straightforward (thanks to DTs for similar processors).

    - Using Graphics_SDK_5_01_01_01_softfp

       I have some patches to work around older power management and what seem to be erroneous logic (controlled by some #defines) in module.c's PVRCore_Init() function (See output below).

    I am up to SGXInitialise (See output snippet below).  The first call is to SGXInitClocks.  This function attempts to write to a register in the SGX space, but below the range of "officially" defined registers (according to sprugn4r.pdf, the 37x TRM, p. 1969).  The README that came with the SDK (it actually says that it is for 5.01.00.01) indicates that drivers are included for SGX530, including 37x devices (which the SDK is compiling as 3630, which should be OK), but has only been sanity-tested on AM 335x and AM 43x EVMs.


    So, my questions:

    - do these registers actually exist for my device?

    - If so, what is the meaning of the interrupt that is generated when accessing them?

    - If not, is it safe to "drop" the writes to them?

    ===================== PVRCore_Init ===================

    This shows the PVRSRVDriverProbe function being called twice from PVRCore_Init, but with two different devices.  The first call __correctly__ succeeded since it is the real device.  The second call fails with a NULL pointer dereference because there are no struct omap_hwmod's for either pvrsrvkm or an reset associated reset.

    # /etc/init.d/rc.pvr start# ifocngf# /etc/init.d/rc.pvr start
    === load_pvr:  try 'modprobe -q pvrsrvkm' ===
    Module pvrsrvkm failed to load. Retrying.
    Running /sbin/depmod
    random: nonblocking pool is initialized
    === load_pvr: retry 'modprobe -q pvrsrvkm' ===
    PVRCore_Init: begin
    PVRCore_Init: call 'platform_driver_register' for 'powervr_driver'
    PVRSRVDriverProbe: begin; platform device '50000000.sgx', phys device '50000000.sgx'
    reset_control_get: begin; dev='50000000.sgx'
    reset_control_get: no reset id specified
    reset_control_get: call 'of_parse_phandle_with_args' for of_node 'sgx' (full='/ocp/sgx@50000000')
    reset_control_get: call 'of_parse_phandle_with_args' returns 0
    reset_control_get: check 'prcm' against '/ocp/prcm@48306800'
    reset_control_get: call 'try_module_get' for '/ocp/prcm@48306800' got '(null)'
    reset_control_get: set up and return rstc object
    _lookup_hardreset: reset gfx in hwmod gfx; rst 0 st 0
    _lookup_hardreset: reset gfx in hwmod gfx; rst 0 st 0
    PVRSRVDriverProbe: call 'PVRSRVIONClient'
    PVRSRVDriverProbe: call 'PVRSRVIONClient' returns 0
    PVRSRVDriverProbe: end, return 0
    PVRCore_Init: call 'platform_device_register' for 'powervr_device'
    PVRSRVDriverProbe: begin; platform device 'pvrsrvkm', phys device 'pvrsrvkm'
    reset_control_get: begin; dev='pvrsrvkm'
    reset_control_get: no reset id specified
    Unable to handle kernel NULL pointer dereference at virtual address 00000000

    =========== SGXInitialise ========

    # /etc/init.d/rc.pvr start
    === load_pvr:  try 'modprobe -q pvrsrvkm' ===
    Module pvrsrvkm failed to load. Retrying.
    Running /sbin/depmod
    === load_pvr: retry 'modprobe -q pvrsrvkm' ===
    PVRCore_Init: begin
    PVRCore_Init: call 'platform_driver_register' for 'powervr_driver'
    PVRSRVDriverProbe: begin; platform device '50000000.sgx', phys device '50000000.sgx'
    reset_control_get: begin; dev='50000000.sgx'
    reset_control_get: no reset id specified
    reset_control_get: call 'of_parse_phandle_with_args' for of_node 'sgx' (full='/ocp/sgx@50000000')
    reset_control_get: call 'of_parse_phandle_with_args' returns 0
    reset_control_get: check 'prcm' against '/ocp/prcm@48306800'
    reset_control_get: call 'try_module_get' for '/ocp/prcm@48306800' got '(null)'
    reset_control_get: set up and return rstc object
    ti_reset_clear_reset: base=fa306800, reg=00000358 -> addr=fa306b58
    ti_reset_deassert: base=fa306800, reg=00000358 -> addr=fa306b58
    SysLocateDevices: begin
    SysLocateDevices: setup for ! NO_HARDWARE; i.e. HAVE HARDWARE
    SysLocateDevices: setup for ! PVR_LINUX_DYNAMIC_SGX_RESOURCE_INFO
    SysLocateDevices: gsSGXDeviceMap.sRegsSysPBase.uiAddr=50000000, gsSGXDeviceMap.sRegsCpuPBase=50000000
    SysLocateDevices: end
    _lookup_hardreset: reset gfx in hwmod gfx; rst 0 st 0
    _lookup_hardreset: reset gfx in hwmod gfx; rst 0 st 0
    ti_reset_is_reset: base=fa306800, reg=00000358 -> addr=fa306b58
    PVRSRVDriverProbe: call 'PVRSRVIONClient'
    PVRSRVDriverProbe: call 'PVRSRVIONClient' returns 0
    PVRSRVDriverProbe: end, return 0
    PVRCore_Init: call 'register_chrdev' for 'pvrsrvkm'
    PVRCore_Init: call 'create_class' for 'pvr'
    PVRCore_Init: call 'device_create' for 'pvr' class, dev='251:0' with devname 'pvrsrvkm'
    === load_pvr: driver is loaded ===
    === load_pvr: create device node ===
    251 pvrsrvkm
    crw-rw----    1 root     root       10,   1 Mar 25 20:24 /dev/psaux
    crw-rw----    1 root     root        5,   2 Mar 25 20:24 /dev/ptmx
    crw-rw----    1 root     root      251,   0 Mar 25 20:24 /dev/pvrsrvkm

    /dev/pts:
    === load_pvr: call '/usr/local/bin/pvrsrvctl --start --no-module' ===
    DevInitSGXPart2KM: OSMapPhysToLin: base=0x50000000, size=0x00010000
    DevInitSGXPart2KM: OSMapPhysToLin: CPU Base 0x50000000 -> lin e0bc0000
    DevInitSGXPart2KM: phys base=0x50000000
    _lookup_hardreset: reset gfx in hwmod gfx; rst 0 st 0
    _lookup_hardreset: reset gfx in hwmod gfx; rst 0 st 0
    _lookup_hardreset: reset gfx in hwmod gfx; rst 0 st 0
    SGXInitialise: begin
    SGXInitialise: call 'SGXInitClocks'
    SGXInitClocks: begin
    SGXInitClocks: OSWriteHWReg: base=e0bc0000, ofs=0x00000000 (EUR_CR_CLKGATECTL), val=0x00222220
    OSWriteHWReg: base=e0bc0000, ofs=00000000, val=00222220
    omap3_l3_app_irq: irq=26, type=L3_APP_ERROR
    In-band Error seen by MPU  at address 0
    ------------[ cut here ]------------
    WARNING: CPU: 0 PID: 185 at drivers/bus/omap_l3_smx.c:162 omap3_l3_app_irq+0xfc/0x14c()
    Modules linked in: pvrsrvkm(O)
    CPU: 0 PID: 185 Comm: pvrsrvctl Tainted: G           O 3.13.2 #4
    [<c0017cf8>] (unwind_backtrace+0x0/0xe0) from [<c00157cc>] (show_stack+0x10/0x14)
    [<c00157cc>] (show_stack+0x10/0x14) from [<c0033724>] (warn_slowpath_common+0x60/0x80)
    [<c0033724>] (warn_slowpath_common+0x60/0x80) from [<c00337d4>] (warn_slowpath_null+0x18/0x20)
    [<c00337d4>] (warn_slowpath_null+0x18/0x20) from [<c01e9e2c>] (omap3_l3_app_irq+0xfc/0x14c)
    [<c01e9e2c>] (omap3_l3_app_irq+0xfc/0x14c) from [<c005f864>] (handle_irq_event_percpu+0x2c/0x188)
    [<c005f864>] (handle_irq_event_percpu+0x2c/0x188) from [<c005fa20>] (handle_irq_event+0x60/0x80)
    [<c005fa20>] (handle_irq_event+0x60/0x80) from [<c0061fe8>] (handle_level_irq+0xcc/0x10c)
    [<c0061fe8>] (handle_level_irq+0xcc/0x10c) from [<c005f170>] (generic_handle_irq+0x20/0x30)
    [<c005f170>] (generic_handle_irq+0x20/0x30) from [<c001370c>] (handle_IRQ+0x60/0x80)
    [<c001370c>] (handle_IRQ+0x60/0x80) from [<c0008630>] (omap3_intc_handle_irq+0x54/0x68)
    [<c0008630>] (omap3_intc_handle_irq+0x54/0x68) from [<c0016200>] (__irq_svc+0x40/0x70)
    Exception stack(0xdfb77d18 to 0xdfb77d60)
    7d00:                                                       bf01d0d4 bf01a1e1
    7d20: 600f0013 600f0013 dfb2c000 e0b7b120 dfb2c014 00000006 e0850000 00000000
    7d40: beb6eacc dfb3d1a0 00000000 dfb77d60 bf0113a8 c0406db0 600f0013 ffffffff
    [<c0016200>] (__irq_svc+0x40/0x70) from [<c0406db0>] (printk+0x0/0x3c)
    [<c0406db0>] (printk+0x0/0x3c) from [<dfabe080>] (0xdfabe080)
    ---[ end trace 73737888a7929edd ]---
    SGXInitClocks: end
    SGXInitialise: call 'PDUMPCOMMENTWITHFLAGS'
    SGXInitialise: call SGXRunScript, init part 1
    SGXRunScript: begin
    SGXRunScript: do SGX_INIT_OP_WRITE_HW_REG
    OSWriteHWReg: base=e0bc0000, ofs=00000a58, val=00000000
    omap3_l3_app_irq: irq=26, type=L3_APP_ERROR
    In-band Error seen by MPU  at address 0
    ------------[ cut here ]------------
    WARNING: CPU: 0 PID: 185 at drivers/bus/omap_l3_smx.c:162 omap3_l3_app_irq+0xfc/0x14c()
    Modules linked in: pvrsrvkm(O)
    CPU: 0 PID: 185 Comm: pvrsrvctl Tainted: G        W  O 3.13.2 #4
    [<c0017cf8>] (unwind_backtrace+0x0/0xe0) from [<c00157cc>] (show_stack+0x10/0x14)
    [<c00157cc>] (show_stack+0x10/0x14) from [<c0033724>] (warn_slowpath_common+0x60/0x80)
    [<c0033724>] (warn_slowpath_common+0x60/0x80) from [<c00337d4>] (warn_slowpath_null+0x18/0x20)
    [<c00337d4>] (warn_slowpath_null+0x18/0x20) from [<c01e9e2c>] (omap3_l3_app_irq+0xfc/0x14c)
    [<c01e9e2c>] (omap3_l3_app_irq+0xfc/0x14c) from [<c005f864>] (handle_irq_event_percpu+0x2c/0x188)
    [<c005f864>] (handle_irq_event_percpu+0x2c/0x188) from [<c005fa20>] (handle_irq_event+0x60/0x80)
    [<c005fa20>] (handle_irq_event+0x60/0x80) from [<c0061fe8>] (handle_level_irq+0xcc/0x10c)
    [<c0061fe8>] (handle_level_irq+0xcc/0x10c) from [<c005f170>] (generic_handle_irq+0x20/0x30)
    [<c005f170>] (generic_handle_irq+0x20/0x30) from [<c001370c>] (handle_IRQ+0x60/0x80)
    [<c001370c>] (handle_IRQ+0x60/0x80) from [<c0008630>] (omap3_intc_handle_irq+0x54/0x68)
    [<c0008630>] (omap3_intc_handle_irq+0x54/0x68) from [<c0016200>] (__irq_svc+0x40/0x70)
    Exception stack(0xdfb77d00 to 0xdfb77d48)
    7d00: 00000037 00000007 600f0013 600f0013 dfb2c110 00000001 dfb2c014 00000040
    7d20: dfb2c0f8 00000000 beb6eacc dfb3d1a0 000008d0 dfb77d48 bf00f328 bf010774
    7d40: 600f0013 ffffffff
    [<c0016200>] (__irq_svc+0x40/0x70) from [<bf010774>] (SGXRunScript.isra.1+0x24/0x140 [pvrsrvkm])
    [<bf010774>] (SGXRunScript.isra.1+0x24/0x140 [pvrsrvkm]) from [<bf0113d0>] (SGXInitialise+0x64/0x1a4 [pvrsrvkm])
    [<bf0113d0>] (SGXInitialise+0x64/0x1a4 [pvrsrvkm]) from [<bf014a48>] (SGXPostPowerState+0x4c/0xa8 [pvrsrvkm])
    [<bf014a48>] (SGXPostPowerState+0x4c/0xa8 [pvrsrvkm]) from [<bf001968>] (PVRSRVDevicePostPowerStateKM_AnyVaCb+0x6c/0x80 [pvrsrvkm])
    [<bf001968>] (PVRSRVDevicePostPowerStateKM_AnyVaCb+0x6c/0x80 [pvrsrvkm]) from [<bf009828>] (List_PVRSRV_POWER_DEV_PVRSRV_ERROR_Any_va+0x44/0x5c [pvrsrvkm])
    [<bf009828>] (List_PVRSRV_POWER_DEV_PVRSRV_ERROR_Any_va+0x44/0x5c [pvrsrvkm]) from [<bf001b24>] (PVRSRVSetDevicePowerStateKM+0x4c/0x68 [pvrsrvkm])
    [<bf001b24>] (PVRSRVSetDevicePowerStateKM+0x4c/0x68 [pvrsrvkm]) from [<bf012164>] (SGXScheduleCCBCommandKM+0x64/0xc0 [pvrsrvkm])
    [<bf012164>] (SGXScheduleCCBCommandKM+0x64/0xc0 [pvrsrvkm]) from [<bf010a98>] (SGXGetMiscInfoUkernel.isra.5+0x78/0xec [pvrsrvkm])
    [<bf010a98>] (SGXGetMiscInfoUkernel.isra.5+0x78/0xec [pvrsrvkm]) from [<bf010b90>] (SGXDevInitCompatCheck+0x84/0x29c [pvrsrvkm])
    [<bf010b90>] (SGXDevInitCompatCheck+0x84/0x29c [pvrsrvkm]) from [<bf0069cc>] (PVRSRVDevInitCompatCheck+0x14/0x20 [pvrsrvkm])
    [<bf0069cc>] (PVRSRVDevInitCompatCheck+0x14/0x20 [pvrsrvkm]) from [<bf009614>] (List_PVRSRV_DEVICE_NODE_PVRSRV_ERROR_Any+0x34/0x40 [pvrsrvkm])
    [<bf009614>] (List_PVRSRV_DEVICE_NODE_PVRSRV_ERROR_Any+0x34/0x40 [pvrsrvkm]) from [<bf016554>] (PVRSRVInitSrvDisconnectBW+0x48/0x74 [pvrsrvkm])
    [<bf016554>] (PVRSRVInitSrvDisconnectBW+0x48/0x74 [pvrsrvkm]) from [<bf017a60>] (BridgedDispatchKM+0xf4/0x14c [pvrsrvkm])
    [<bf017a60>] (BridgedDispatchKM+0xf4/0x14c [pvrsrvkm]) from [<bf00ff48>] (PVRSRV_BridgeDispatchKM+0xf0/0x1f8 [pvrsrvkm])
    [<bf00ff48>] (PVRSRV_BridgeDispatchKM+0xf0/0x1f8 [pvrsrvkm]) from [<c00bdd8c>] (do_vfs_ioctl+0x4e8/0x5a8)
    [<c00bdd8c>] (do_vfs_ioctl+0x4e8/0x5a8) from [<c00bde80>] (SyS_ioctl+0x34/0x60)
    [<c00bde80>] (SyS_ioctl+0x34/0x60) from [<c0012800>] (ret_fast_syscall+0x0/0x30)
    ---[ end trace 73737888a7929ede ]---
    .....

  • Blaine,

    We  haven't tried the Graphics  SDK with 3.13, so we haven't ran into the problems you are seeing. The kernel we support in the SDK is 2.6.37.

    Some of the graphics patches in our 3.12 git tree at git.ti.com might be helpful to you.

  • I did try the 3.12 tree at one point and it was not helpful.  The only significant part I found was for reset handling, plus some patches I picked up from Arch Linux.  I had to make by own reset patches for the 3730, and the Arch stuff was helpful for getting started into the SDK driver.

    This real problem for is the the driver in the SDK.  I have gotten very far down the initialization path, but I am to a point that I have not understood is the problem.  I have made several modifications to the driver (plus my own

    The problem I'm down to is __not__ with the kernel but with the driver from the SDK.

  • Sorry, my last reply was incomplete, when I did the attachment.

    If you scroll to the bottom of the log file I attached to that response, you will see, just before the Oops,

            OSWriteHWReg: base=e0ba0000, ofs=00000c00, val=00000008

    Here is what I have seen:

    - there is a slight delay before the Oops occurs, suggesting that the reset that this is doing might actually be working.  So what would give the Oops?  One cause I have seen in the past, which roughly corresponds to the stack trace, is a write to a memory region which has not been mapped (or enabled, or some such).  I also wonder, though I have no particular reason to suspect this except the slight delay I mentioned above, whether it might be an unhandled interrupt.

    - If you look a little further up the trace you'll see

            OSWriteHWReg: base=e0ba0000, ofs=00000c00, val=00000000

    This is a write to the same register, but with a different value.  So, what might the 0-th bit do?  Documentation would be helpful.  Alas, ...

    On a separate subject, but an area where I have had some problems with the driver:

    There are many defines in the driver that control many aspects of the build, but for which there seems to be no explanation.  Here's an example, tfour lines above the Oops:

            ! EUR_CR_BIF_CTRL_INVAL

    Darryl

  • We have SGX Graphics_SDK_5_01_01_02 working on 3.18.9 kernel with hardfloat compiler on Arch Linux ... but with a caveat:  we had to sign an NDA to get the sources to the Imagination Technologies libraries.  With this, we simply rebuilt the library blobs (no source code changes) and associated pvrsrvctl program (of course there is a lot of other stuff that gets built, too, mostly test programs and libraries).

    I would be remiss to not mention that there were some tweaks to the sources provided in the SDK, mostly related to build and install (unsurprisingly, we have to do this with every version of the SDK), reset control (mostly seems unnecessary, at least in our context, since removal from reset seems to take place by enabling the SGX clocks) and clocks (prepare/unprepare versions of clock functions).