Hello,
We are currently experiencing problems with the DSPLink kernel driver and library for Linux. The processor on which we are developing is the OMAP L-137. DSPLink is purely used for the DSPLink PROC component to LoadFirmware, Start and Stop the DSP. There is no DSP/Bios configured in the DSP Firmware, since we are not using DSP/BIOS. The version in $DSPLINK/gpp/config.bld is 1.61.03.
We have two DSP applications, a small test image which initializes interrupts, generates and receives ARM <-> DSP interrupts, toggles LEDs and writes to memory. This image is about 150 Kb. The second image is our final DSP image which has to run on our end-product. This image does more initialization of for example DMA, EMIF and GPIO. This image is debug about 600Kb and release 500Kb.
Both DSP images run without problems when they are sent to the board using CCS4, this also does not interfere with Linux (e.g. Serial console can still be used and SSH connections to the board can still be made). For this reason I assume there is nothing in the DSP Code that stops the ARM from executing.
When I use the DSPLink shared object in combination with the DSPLink kernel module this results in problems. The DSP Test image runs without problems, DSPLink can: setup, attach, load firmware, start, stop and shutdown. When I’m using the final DSP image DSPLink can; setup, attach and load firmware. Starting the DSP results in a hang of Linux and requires me to reboot the board. When I connect the debugger I can see that the PC of the ARM is still changing.
I’ve
added the complete tracing to DSPLink but this does not give me sufficient
information on where the root of the problem lies. As can been seen below
nothing happens after leaving DA8XXGEM_halPwrCtrl.
Test Image |
Final image |
… Entered DSP_start () dspId [0x0] dspAddr [0x11806f20] Entered DA8XXGEM_start () dspId [0x0] dspState [0xbf026e70] dspAddr [0x11806f20] Entered DA8XXGEM_addrConvert () dspId [0x0] dspState [0xbf026e70] addr [0xc3e00000] type [0x1] DA8XXGEM_addrConvert addr [0xc3e00000] convAddr [0xc387e000] Leaving DA8XXGEM_addrConvert () Entered DA8XXGEM_halBootCtrl () halObj [0xc3886000] cmd [0x0] arg [0xc3e00000] Leaving DA8XXGEM_halBootCtrl () status [0x8000] Entered DA8XXGEM_halPwrCtrl () halObj [0xc3886000] cmd [0x3] arg [0x0] Leaving DA8XXGEM_halPwrCtrl () status [0x8000] DSP started ! Leavin‡DA8XXGEM_start () status [0x8000] Leaving DSP_start () status [0x8000] Leaving PMGR_PROC_start () status [0x8000] Leaving DRV_CallAPI () status [0x8000] Leaving DRV_Ioctl () status [0x8000] Entered DRV_Ioctl () inode [0xc2988950] filp [0xc307b780] cmd [0x6c09] args [0xbe9bf9a8] Entered DRV_CallAPI () cmd [0x6c09] args [0xc2633ef4] Entered PMGR_PROC_getState () procId [0x0] status [0x8000] Leaving PMGR_PROC_getState () status [0x8000] … |
… Entered DSP_start () dspId [0x0] dspAddr [0x1181e780] Entered DA8XXGEM_start () dspId [0x0] dspState [0xbf026ed0] dspAddr [0x1181e780] Entered DA8XXGEM_addrConvert () dspId [0x0] dspState [0xbf026ed0] addr [0xc3e00000] type [0x1] DA8XXGEM_addrConvert addr [0xc3e00000] convAddr [0xc387e000] Leaving DA8XXGEM_addrConvert () Entered DA8XXGEM_halBootCtrl () halObj [0xc3886000] cmd [0x0] arg [0xc3e00000] Leaving DA8XXGEM_halBootCtrl () status [0x8000] Entered DA8XXGEM_halPwrCtrl () halObj [0xc3886000] cmd [0x3] arg [0x0] Leaving DA8XXGEM_halPwrCtrl () status [0x8000] |
I’ve
added some extra code to see if that gives me more information. The code and
logging is added below. This shows that after leaving DA8XXGEM_halPwrCtrl
no information is printed. For some reason the return in DA8XXGEM_halPwrCtrl
does not return to DA8XXGEM_start.
da8xxgem.c |
Logging |
NORMAL_API DSP_STATUS DA8XXGEM_start (IN ProcessorId dspId, IN DSP_Object * dspState, IN Uint32 dspAddr) { … dspCfg = LDRV_LinkCfgPtr->dspConfigs [dspId] ; dspObj = dspCfg->dspObject ; halObj = (DA8XXGEM_HalObj *) dspState->halObject ; linkDrv = &(dspCfg->linkDrvObjects [dspObj->linkDrvId]) ; ipsTable = &(dspCfg->ipsTables [linkDrv->ipsTableId][0]) ; PRINT_Printf("PD Crash Logging dspObj == 0x%08X\n", dspObj ); if ( (dspObj->doDspCtrl == DSP_BootMode_Boot_Pwr) || (dspObj->doDspCtrl == DSP_BootMode_NoLoad_NoPwr) || (dspObj->doDspCtrl == DSP_BootMode_NoLoad_Pwr) || (dspObj->doDspCtrl == DSP_BootMode_Boot_NoPwr)) { resetVector = dspObj->resetVector ; gppAddr = DA8XXGEM_addrConvert ( dspId, dspState, BYTE_TO_MADU (resetVector, dspObj->maduSize), DspToGpp) ; if (gppAddr != ADDRMAP_INVALID) { /* Specify the DSP boot address in the boot config register */ status = halObj->interface->bootCtrl ( (Pvoid) halObj, DSP_BootCtrlCmd_SetEntryPoint, (Pvoid) resetVector);
if (DSP_SUCCEEDED (status)) { /* Write the branch instruction to at the boot address to * branch to _c_int00 */ entryPtAddrHi = dspAddr >> 16 ; entryPtAddrLo = dspAddr & 0xFFFF ; startOpCodeHi |= (entryPtAddrHi << 7) ; startOpCodeLo |= (entryPtAddrLo << 7) ; REG (gppAddr) = startOpCodeLo ; gppAddr += 4 ; REG (gppAddr) = startOpCodeHi ; gppAddr += 4 ; REG (gppAddr) = branch ; gppAddr += 4 ;
/* Write 5 no-ops for pipeline flush */ REG (gppAddr) = noOp ; gppAddr += 4 ; REG (gppAddr) = noOp ; gppAddr += 4 ; REG (gppAddr) = noOp ; gppAddr += 4 ; REG (gppAddr) = noOp ; gppAddr += 4 ; REG (gppAddr) = noOp ; /* Release the DSP from reset */ status = halObj->interface->pwrCtrl ((Pvoid) halObj, DSP_PwrCtrlCmd_Release, NULL);
PRINT_Printf("PD Crash Logging LEFT PWR CTRL\n" ); if (DSP_FAILED (status)) { SET_FAILURE_REASON ; } PRINT_Printf("PD Crash Logging LEFT PWR CTRL\n" ); } … |
Entered DSP_start () dspId [0x0] dspAddr [0x1181e780] Entered DA8XXGEM_start () dspId [0x0] dspState [0xbf026ed0] dspAddr [0x1181e780] PD Crash Logging dspObj == 0xC386E000 Entered DA8XXGEM_addrConvert () dspId [0x0] dspState [0xbf026ed0] addr [0xc3e00000] type [0x1] DA8XXGEM_addrConvert addr [0xc3e00000] convAddr [0xc387e000] Leaving DA8XXGEM_addrConvert () Entered DA8XXGEM_halBootCtrl () halObj [0xc3886000] cmd [0x0] arg [0xc3e00000] Leaving DA8XXGEM_halBootCtrl () status [0x8000] Entered DA8XXGEM_halPwrCtrl () halObj [0xc3886000] cmd [0x3] arg [0x0] Leaving DA8XXGEM_halPwrCtrl () status [0x8000] |
Does anyone know what might be the source of this problem?