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.

Desktop SDK PCIE script dspreset.sh segfaults

I am trying to adapt filetestdemo from the Desktop SDK to my own code.

1) When I run desktop-linux-sdk_01_00_00_07/demos/scripts/dspreset.sh it crashes and does a core dump.  Is there another way to perform a reset that will work?

jim@hunter:~/ti/desktop-linux-sdk_01_00_00_07/demos/scripts$ ./dspreset.sh 1
Segmentation fault (core dumped)

2) After dspreset core dumps, the TI device is no longer available. 

jim@hunter:~/ti/desktop-linux-sdk_01_00_00_07/demos/scripts$ ./init_evmc6678l_1000.sh
pciedrv: ERROR: No TI PCI devices found
ERROR: pciedrv could not opened

Even rebooting does not fix the problem (after a reboot, lspci does not list the TI EVM anymore).  Reseating the board is the only thing that seems to work.  Is there any method to make it available again without reseating the board?  

3) Are these reset and init routines necessary?  From the host-side code appears to load without it.  (Edit: removed problem I think is unrelated).

Thanks

  • Segmentation fault with dsp reset is not expected.

    I suspect you are having hardware issues or issues related to secure seating of the board.

    Can you check lspci | grep exas, to see if the card is enumerated, before running any of the tests.?

    Also if you are still seeing core dumps, do you see anything in the dmesg log, about the core dump reason?

    Actually, the very first time you execute, you don't need to do a dsp reset, You do need the init_evm6678l_1000.sh to initialize the DSP DDR.

  • Bad connection would make sense if the occurrence of the problem was not so closely tied to running the one specific command, and if it wasn't so 100% repeatable.  I don't think it is possible it is losing a connection.  It may be possible that the connection is sufficient for enumeration but insufficient for basic use (if that even is plausible).

    I added some debugging statements to dsp_utils to try and localize it (I did not get far with GDB because the crash left it in a symbol-less state - Edit to add: I rebuilt the execs with debugging but still it gets so corrupted the stack is obliterated).

    jim@hunter:~/ti/desktop-linux-sdk_01_00_00_07/demos/scripts$ lspci | grep exas ; ./dspreset.sh 1
    03:00.0 Multimedia controller: Texas Instruments Device b005 (rev 01)

    Found 1 TI PCI devices
    pci device probe complete 0
    DEBUG: beginning check 1 .0x88a8b68. 0x88a8d88
    DEBUG: Use count set ..
    DEBUG: beginning check 1 .0x88a8b68. 0x88a8d88
    DEBUG: Use count set ..
    DEBUG: beginning check 1 .0x88a8b68. 0x88a8d88
    DEBUG: Use count set ..
    DEBUG: beginning check 1 .0x88a8b68. 0x88a8d88
    DEBUG: Use count set ..
    DEBUG: beginning check 1 .0x88a8b68. 0x88a8d88
    DEBUG: Use count set ..
    Setup memory regions complete
    Setup bar region complete
    malloc complete for bar_sem
    Allocation of semaphores complete
    Open Driver done

    Resetting DSP : 0
    Start local reset assert for core dsp_id 0, (module id): 15 ...
    Start local reset assert for core dsp_id 0, (module id): 16 ...
    Start local reset assert for core dsp_id 0, (module id): 17 ...
    Start local reset assert for core dsp_id 0, (module id): 18 ...
    Start local reset assert for core dsp_id 0, (module id): 19 ...
    Start local reset assert for core dsp_id 0, (module id): 20 ...
    Start local reset assert for core dsp_id 0, (module id): 21 ...
    Start local reset assert for core dsp_id 0, (module id): 22 ...
    LPSC_MODRST0
    LPSC_EMIF16_SPI
    LPSC_TSIP
    LPSC_DEBUG
    LPSC_TETB_TRC
    LPSC_SRIO
    LPSC_HYPER
    LPSC_MSMCRAM
    SA state

    which indicates failure somewhere in this code in dnldmgr.c

    /* Put Netcp components in safe state for reset */
    set_SA_state_to_reset(dsp_id);
    set_PA_state_to_reset(dsp_id);

    I don't see anything in dmesg.

  • Can you please comment out: set_SA_state_to_reset(dsp_id); and check?

    Can you also check on the very first time after boot up, the demo works with just the ./init_evmc6678l_1000.sh ? ( no reset) and run the demo using the instructions.