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.

DSPLink DBGCHK: WinCE on L138



Hello--
We have our application running successfully on the LogicPD L138 Experimenter's kit, with CE 6.0 R3.
To accelerate processing, we installed the DSPLink catalog item, as directed in the documentation for 1.65.00.03.
We are using bios 5.41.02.14, xdc 3.16.02.32.

The dsplink driver and message example builds completed successfully, both from CE command console and UI.

In both cases, running the Message sample resulted in a DBGCHK from ce, on a memory free, when
MPLIST tries to free its initial mapping on setup.

Copying the message application as a CE subproject, to gain debug access, it appears that in every case where
DRV_CallAPI  ( in  drv_pmgr.c ) is called with CMD_KERN_UNMAP_PHYS_TO_USER, the call to the CE api
VirtualFreeEx() fails, as the 2nd-level page table shows the page already freed... crashing the call.

We then rebuilt DSPLINK, providing component switches PNOS, in order to omit the MPLIST issue.
PROC and NOTIFY APIs are really all that are interesting for our application.

Next, we copied the MPCSxfer sample to a CE subproject.
The sample runs correctly.... until the end, where MPCSXFER_Delete() calls a POOL api that in turn calls
CMD_KERN_UNMAP_PHYS_TO_USER.

While our application will not necessarily need to return pages to the pool, it would be very helpful in development
to be able to clean up these mappings as intended without crashing the system.

The setup, allocation, DSP code load, DSP Exec, and  sync between GPP and DSP is functioning correctly.
It is just the cleanup that has a problem.

Speculation:  The symmetry between CMD_KERN_MAP_PHYS_TO_USER (which calls CE APIs
VirtualAllocEx and VirtualCopyEx) and CMD_KERN_UNMAP_PHYS_TO_USER (calling VirutalFreeEx )
gets broken somewhere in DSPLink.

Any suggestions would be greatly appreciated!
Thanks in advance.

  • Joe

    The speculation does seem to make sense. However, this problem has not been seen in earlier releases or builds. I am trying to understand if there is something different in your setup which might cause VirtualFreeEx failure?

    Rather than enabling a generic trace, I would request you to add prints in $(DSPLINK)/gpp/src/api/WinCE/drv_api.c This is the only file where CMD_KERN_MAP_PHYS_TO_USER and CMD_KERN_UNMAP_PHYS_TO_USER is being called. Can you add trace prints at these points and check if symmetry in the map and unmap calls is present?

    Deepali

  • Deepali--

    Thanks for the reply:  we will try this trace approach, but it might be a week or so before we can pursue this:
    since our application doesn't necessarily need to return buffers to the pool, we can work around this for now.
    However, I would like to resolve the cause of this, in case we run into any related problems.
    I will provide this trace report as soon as we get to a suitable point in development.
    Again, thanks for your suggestion --

    -- Joe