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.

How to parse the TI/BIOS Mailbox memory



Hi,

Can any one help me to what each of these BIOS variables refers to.

MBX_params

MBX_params$data

MBX_params$free

MBX_params$queElems

I am getting maibox full error so, I need to parse this contents and know what are the messages passed to mail box.

Thanks & Regards

Praveen Aruru

  • Praveen,

    Where are you getting those variable names with “params”?  I think you mean:

    mbx
    mbx$data
    mbx$free
    mbx$queElems

    I don’t know which version of DSP/BIOS you are using, but I think the below should work for you.  But note that what I’m showing is referencing internals that can (but usually don't) change between releases.  

    For this example I built the DSP/BIOS “mailbox” example and then ran to the point that the mailbox was full.   

    To see what messages have been submitted to the mailbox:

    1) Bring up the ROV tool (Tools->ROV) to look at DSP/BIOS state.

    2) Click on the MBX module:



    3) Note the mailbox handle (here 0x1180C85C) and open a memory browser window for that address


    Note that the addresses match what was shown in the .map file for the example

    1180c85c   mbx
    1180c86c   mbx$data
    1180c88c   mbx$free

    You can look in mbx.h to see the MBX_Obj structure that is being viewed in memory:

    typedef struct MBX_Obj {
        QUE_Obj     dataQue;        /* message queue */
        QUE_Obj     freeQue;        /* free queue */
        SEM_Obj     dataSem;        /* count = number of messages */
        SEM_Obj     freeSem;        /* count = number of free slots */


    The first element of the object is the mailbox message queue link pointers (next and prev).  The queue elements are described in que.h

    typedef struct QUE_Elem {
        struct QUE_Elem *next;
        struct QUE_Elem *prev;
    } QUE_Elem, *QUE_Handle;

    mbx$data refers to the dataSem semaphore object.

    mbx$free refers to the freeSem semaphore object.

    You can then traverse the dataQue queue elements to look at the messages that have been queued. 

    Looking at the first message at 0x118087DC, the message has some queue links, then the message “id” and “val”, which are “0” and “a” for this example (the “a” is 0x61 in memory).



    Similarly, looking at the second message at 0x118087EC, the contents are “0” and “b” (or 0x62) for this message.


    I think you should be able to do something similar for inspecting the full mailbox in your application...

    Scott