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.

DM368 IPNC blocked in ApproPollingMsg in system_server

Hi experts,

I'm making TI_IPNC_DM36x SDK work on DM368 IPNC. The product name is DM368IPNC-MT5. After compiling it with crosstool-ng compiler, and booting via tftpboot and nfsroot following the User Guide, I can load modules successfully, but when I run system_server, it blocked at ApproPollingMsg in InitAV_Server. It debugged ang found that msgrcv always return -1 in the fuction ApproPollingMsg(), though SemWait and msgsnd succeeded. Can anybody help it out? Any help will be appreciated.

Here is the log when running system_server:

Creat queue id:0

queue id:0

FileMngThread created

Creat queue id:32769

queue id:32769

AlramThread created

Share memory init success

IPNC_DM368_2.6.0 (root@zijing-vbox) (gcc version 4.3.2 (crossto

Creat queue id:65538

queue id:65538

Creat queue id:98307

queue id:98307

queue id:65538

queue id:32769

CPU is DM368

./av_server.out DM368 NTSC APPRO2A AEWB 720P H264 5000000 VBR AUTO MENUOFF &

Check_device_version : DEVICE VER = 1 !!

AVSERVER UI: Initializing.

ApproDrvInit: 7

Creat queue id:131076

queue id:131076

 

Here is the log of running av_capture_load.sh

# ./av_capture_load.sh

cmemk unregistered

irqk unregistered

CSL: Module install successful, device major num = 253

CSL: Module version 0.10.00, built on Jun 24 2011 14:52:41

I2C: Module install successful, device major num = 252

DMA: Module install successful, device major num = 251

DRV: Module install successful

DRV: Module built on Jun 24 2011 14:52:43

DRV: EDMACC.QUEPRI  = 00000777

DRV: SYSTEM.MSTPRI0 = 00440022

DRV: SYSTEM.MSTPRI1 = 00000244

DRV: ISP.BCR        = 00000002

DRV: SYSTEM.MISC    = 00000391

CMEMK module: built on Jun 24 2011 at 14:52:12

  Reference Linux version 2.6.18

  File /home/zijing/jeff/ti_ipnc_dm368/dvsdk_2_10_01_18/linuxutils_2_24_03/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c

allocated heap buffer 0xc4000000 of size 0x5000000

CMEM Range Overlaps Kernel Physical - allowing overlap

CMEM phys_start (0x1000) overlaps kernel (0x80000000 -> 0x83000000)

cmemk initialized

EDMAK module: built on Jun 24 2011 at 14:52:14

  Reference Linux version 2.6.18

  File /home/zijing/jeff/ti_ipnc_dm368/dvsdk_2_10_01_18/linuxutils_2_24_03/packages/ti/sdo/linuxutils/edma/src/module/edmak.c

IRQK module: built on Jun 24 2011 at 14:52:15

  Reference Linux version 2.6.18

  File /home/zijing/jeff/ti_ipnc_dm368/dvsdk_2_10_01_18/linuxutils_2_24_03/packages/ti/sdo/linuxutils/irq/src/module/irqk.c

irqk initialized

 

Here is the boot arguments:

 

setenv serverip 172.16.0.115

setenv ipaddr 172.16.0.180

setenv ethaddr 00:0C:0C:A0:05:97

setenv gatewayip 172.16.0.1

setenv netmask 255.255.255.0

setenv bootcmd 'tftpboot 0x80700000 uImage; bootm 0x80700000'

 

setenv bootargs 'mem=48M console=ttyS1,115200n8 noinitrd rw ip=172.16.0.180:172.16.0.115:172.16.0.1:255.255.255.0:::off eth=00:0C:0C:A0:05:97 root=/dev/nfs nfsroot=172.16.0.115:/home/nfsroot/filesys,nolock,proto=tcp'

 

Thanks in advance,

Jeff

  • from the log it is tough to say what could be the issue, your boot args/cmd looks fine to me.

     

    Can you please give a detailed log from botup to the hang situation.

     

    Have you modified any details in the code for this to happen? Was this a IRIS based lens? if yes, have you connected this.

     

    Looks like there is some hang in av_server for which system_server is pinging and getting -1 as an error response.

     

    Regards,

     

    Raghu

     

  • Raghu,

    Thank you for your reply, and sorry for my late response!!

    I finally find the root cause that there is a dead loop at the red marked region. I added the volatile keyword as the green marked part, and the system goes well. So it should be a compiler issue.

    Here is the code snippet:

    ===============================================================

    void DRV_SyncRst(Uint8 module, Uint8 domain, Uint8 state)

    {

    void *pMem_map;

    int dev_fp;

    unsigned long phyAddr= 0x01C41000;

    unsigned long length = 0xAE0;

    volatile unsigned int *pMDCTL = NULL;

    volatile unsigned int *pPTCMD = NULL;

    volatile unsigned int *pPTSTAT = NULL;

    volatile unsigned int *pMDSTAT = NULL;

     

    #ifdef DRV_VPSS_DEBUG

    OSA_printf("DRV_SyncRst: module = %d, domain = %d, state = %d\n", module, domain,state);

    #endif

     

    if ((dev_fp=open("/dev/mem",O_RDWR|O_SYNC))==-1)

    {

    OSA_ERROR("dev_fp Fail!! \n");

    return ;

    }

    pMem_map=mmap( (void *)phyAddr,length,

    PROT_READ|PROT_WRITE|PROT_EXEC,MAP_SHARED,

    dev_fp,phyAddr);

     

    if (pMem_map!=(void *)phyAddr)

    {

    OSA_ERROR("pMem_map Fail!! \n");

    return ;

    }

     

     

    pPTCMD = (unsigned int *)( (char *)pMem_map+0x120);

    pPTSTAT = (unsigned int *)( (char *)pMem_map+0x128);

    pMDSTAT = (unsigned int *)( (char *)pMem_map+0x800);

    pMDCTL = (unsigned int *)( (char *)pMem_map+0xA00);

     

    // Wait for any outstanding transition to complete

      while ( (*pPTSTAT) & (0x00000001 << domain) );

     

      // If we are already in that state, just return

      if (((pMDSTAT[module]) & 0x1F) == state) return;

     

      // Perform transition

      pMDCTL[module] = ((pMDCTL[module]) & (0xFFFFFFE0)) | (state);

      *pPTCMD |= (0x00000001 << domain);

     

      // Wait for transition to complete

      while ( (*pPTSTAT) & (0x00000001 << domain) );  // Will block here!!! 

     

      // Wait and verify the state

      while (((pMDSTAT[module]) & 0x1F) != state);

     

     

    if( pMem_map )

    munmap(pMem_map, length);

     

    if( dev_fp >= 0)

    close(dev_fp);

     

    return;

    }

     

    Jeff