[Sound-open-firmware] SOF: Where is the purpose of host_msg ?

Daniel Baluta daniel.baluta at gmail.com
Wed Jan 23 15:42:45 CET 2019


Please s/Where/What/ in the title. :))

On Wed, Jan 23, 2019 at 4:41 PM Daniel Baluta <daniel.baluta at gmail.com> wrote:
>
> Hi Pierre/Liam,
>
> In src/include/sof/ipc.h there is:
>
> struct ipc {
>      uint32_t host_msg;»     »       /* current message from host */
> //
> }
>
> This keeps the message received from IA core. Anyhow, DSP core
> doesn't seem to use it at all.
>
> Except maybe for some logging:
>
> src/drivers/intel/baytrail/ipc.c:                       _ipc->host_msg = msg;
> src/drivers/intel/baytrail/ipc.c:       trace_ipc("ipc: msg rx ->
> 0x%x", ipc->host_msg);
> src/drivers/intel/cavs/ipc.c:                   _ipc->host_msg = msg;
> src/drivers/intel/cavs/ipc.c:   trace_ipc("ipc: msg rx -> 0x%x", ipc->host_msg);
> src/drivers/intel/cavs/sue-ipc.c:       trace_ipc("ipc: msg rx ->
> 0x%x", ipc->host_msg);
> src/drivers/intel/haswell/ipc.c:                        _ipc->host_msg = msg;
> src/drivers/intel/haswell/ipc.c:        trace_ipc("ipc: msg rx ->
> 0x%x", ipc->host_msg);
> src/include/sof/ipc.h:  uint32_t host_msg;              /* current
> message from host */
>
> I am asking this because initially I thought the communication between
> IA core and DSP involves:
>
> - sending cmd using shim layer
> - sending actual data using mailbox.
>
> But it seems that all the information is exchanged via the mailbox memory. So,
> going back to my question will host_msg be used in the future?
>
> If not, I think it is best to remove it because it is confusing.
>
> The same happens when DSP tries to send something to IA.
>
> For example it writes msg->header. But this is never used on the other side.
>
> ipc_platform_send_msg
>
> »       /* now interrupt host to tell it we have message sent */
> »       shim_write(SHIM_IPCDL, msg->header);
> »       shim_write(SHIM_IPCDH, SHIM_IPCDH_BUSY);
>
> Also, would be easier for me on the ARM side to only send info via mailbox and
> notification via what you call shim layer.
>
> thanks,
> Daniel.


More information about the Sound-open-firmware mailing list