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.

The question about the using of syslink and mailbox

Hi,

Now, I using the syslink for communication of A8 and C674x DSP.

I have a question about the interrupt of A8.

I want to know if the syslink use the mailbox for communication between A8 and DSP, and  the interrupt id is 77.

If yes, I want to know how register the interrupt 77 on A8, and what's the interrupt callback function.

Where I can see the code about that?

Thank you.

Tianxing

  • Yes the interrupt number is 77 on A8 for mailbox interrupt. You need to call request_irq() function with interrupt number and your callback funtion. Look at implementation of syslink_x_xx_xx_xx\packages\ti\syslink\utils\hlos\knl\osal\Linux\OsalIsr.c. especially OsalIsr_install() also look at OsalIsr_create(), it creates the your callback as a kthread based  bottom half function where you can do rest of the processing (execution of callback) when scheduled.

     

  • Hi, Marathe

    Thank you for your reply, it's useful for us.

    I have another question.

    I find the callback function is the _Dm8168IpcInt_isr (Ptr ref), and the function _Dm8168IpcInt_checkAndClearFunc (Ptr arg). And I add the "Osal_printf" and "printk" in the functions as follow:

    However, it print nothing in the terminal.

    I do that to test and verify the interrupt to be executed.

  • I guess printk will not output to console directly. It dumps all prints in to a kernel allocated buffer. Can you try running 'dmesg' command on the console after these functions are executed.

  • Syslink  is not used for notify.Notify code is part of the kernel and can be found under <kernel>\drivers\dsp\syslink\notify_shmdriver

  • Hi, I running the 'dmesg' command, however, I can't see the functions are executed.

  • As Badri pointed out please check the notify driver in kernel and ensure if that is what you are using. In gereral, if you need your own funtion to be regiestered for mailbox interrupt on A8 you will have to call request_irq()

  • Hi, Badri

    I want to test and verify the executation of the 77 interrupt of A8.

    I generate a interrupt to A8 through write the MAILBOX_IRQSTATUS_RAW_0 register on the DSP side. 

    And I found the number of A8 77 interrupt incresed through 'cat /proc/interrupt' .

    However, I can't verify the executation of the callback function of A8.

    Could you give me some advices.

    Thank you.

    Tianxing

  • I didn't using the IPC_API to notify the A8, and I write the MAILBOX_IRQSTATUS_RAW_0 register to generate a interrupt to A8.

    However I want to verify the 77 interrupt of A8 to be executed.

  • Hi,

    The file path is ti_sdk\DVRRDK_03.00.00.00\ti_tools\syslink\syslink_2_10_02_17_patched\packages\ti\syslink\ipc\hlos\knl\notifyDrivers\arch\ti81xx\Dm8168IpcInt.c.

    In the file I found the function of _Dm8168IpcInt_checkAndClearFunc (Ptr arg).

    If it is the callback function of the 77 interrupt of A8?

    Thank you 

    Tianxing

  • I pointed you to Osal_Isr just to understand how to register your own funtion with mailbox interrupt from A8. If you are using RDK please look at Badri's post once again which says

    "Syslink  is not used for notify.Notify code is part of the kernel and can be found under <kernel>\drivers\dsp\syslink\notify_shmdriver"

    If you are specifically using syslink Notify for your own application then only look at OsalIsr.c. If you are manually writing to a mailbox from DSP side first please confirm which Notify you are using from A8 (kernel or syslink) and then put prints in callback accordingly (in notify_shmdrv_dsp_isr or_Dm8168IpcInt_checkAndClearFunc)

  • Hi, Marathe

    Thank you for your reply.

    I am using the DM816x DVR_RDK.

    Now, We are sure the communication of A8 and DSP in the RDK using the mailbox in hardware, and in the software, it using the syslink/ipc. I thought the RDK have registered the interrupt 77 and the callback/isr functionof A8 for the communication , is it?

    I want to know it can generate a interrupt to A8 if I write the register of MAILBOX_IRQSTATUS_RAW_0 on dsp side? And what is the callback function? Where can I find it?

    The interrupt is the 77 interrupt of A8. And A8 executed the interrupt isr function, not dsp.

    I thought the notify code in the "<kernel>\drivers\dsp\syslink\notify_shmdriver" is used for the dsp, is it? 

    Would you give me some advices in detail?

    Thank you.

    Tianxing


  • Hi, Marathe

    I have found the interrupt isr of mailbox in the file mailbox.c.

    I have a question about the mbox_interrupt() function.

    I add "printk" code in the mbox_interrupt() function.

    When I write the mailbox register once (I can see the interrupt generate count through the command "cat /proc/interrupt"), however, the mbox_interrupt would executed three times(it print information three times).

    What's the reason about that?

    Thank  you

    Tianxing