You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Replace the SOF mailbox.h interface with a higher-level abstraction to send/receive IPCs from host, or some other higher level interface that can be moved to Zephyr.
Part of #5794
Currently each SOF platform needs to implement mailbox.h and memory.h. Mailbox.h implements following functions:
mailbox_sw_reg_write() and mailbox_sw_reg_write64()
mailbox_sw_reg_read() and mailbox_sw_reg_read64()
mailbox_sw_regs_write()
The common sof/lib/mailbox.h uses platform memory.h to additionally define:
mailbox_dspbox_*()
mailbox_hostbox_*()
mailbox_stream_*()
This is a hardware specific interface that needs to be implemented on SOF side. I.e. something we really want to move over to Zephyr, just like all other driver code.
Possible solutions / IPC driver abstraction
The mailbox.h interfaces are primarily used in SOF IPC code to send and receive messages to the host. Main users:
src/platform - platform files typically use this mailbox interfacea to send the initial FW_READY on boot
src/ipc3/handler.c - IPC3 implementation
src/ipc4/handler.c - IPC4 implementation
src/ipc/ipc-zephyr.c common IPC code
src/audio/copier - one specialized use (IPC4) to write position/delay data directly to a memory mapped register window
src/include/sof/debug/debug.h - one example (there are some more similar) of non-functional debug use (writing debug info to shared memory)
and a few other minor users
The primary user is still for IPC. So one option to remove this layer from SOF src/platform/ is to move everybody over to a common IPC driver interface. For Intel platforms, Zephyr now provides zephyr/soc/intel/intel_adsp/common/include/intel_adsp_ipc.h that essentially moves most of the platform functionality over to Zephyr. To make this more generally applicable, this interface would have to be extended to other vendors, and we'd need a solution how to tackle the extra memory-mapped I/O ops that are part of IPC4 (copier, telemetry, coredumps).
Early on Zephyr IPM (ipm.h) was considered for SOF IPC, but limitations were hit and IPM not used. Another look at the available interfaces is in order.
Possible solutions / Move mailbox abstraction to Zephyr
Details are open, but given simplicity of the interface, using available Zephyr tools (DT, sys_read/write() and perhaps device_mmio.h) to implement a c generic mailbox handler code should be doable.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Replace the SOF mailbox.h interface with a higher-level abstraction to send/receive IPCs from host, or some other higher level interface that can be moved to Zephyr.
Part of #5794
Currently each SOF platform needs to implement mailbox.h and memory.h. Mailbox.h implements following functions:
The common sof/lib/mailbox.h uses platform memory.h to additionally define:
This is a hardware specific interface that needs to be implemented on SOF side. I.e. something we really want to move over to Zephyr, just like all other driver code.
Possible solutions / IPC driver abstraction
The mailbox.h interfaces are primarily used in SOF IPC code to send and receive messages to the host. Main users:
The primary user is still for IPC. So one option to remove this layer from SOF src/platform/ is to move everybody over to a common IPC driver interface. For Intel platforms, Zephyr now provides zephyr/soc/intel/intel_adsp/common/include/intel_adsp_ipc.h that essentially moves most of the platform functionality over to Zephyr. To make this more generally applicable, this interface would have to be extended to other vendors, and we'd need a solution how to tackle the extra memory-mapped I/O ops that are part of IPC4 (copier, telemetry, coredumps).
Early on Zephyr IPM (ipm.h) was considered for SOF IPC, but limitations were hit and IPM not used. Another look at the available interfaces is in order.
Possible solutions / Move mailbox abstraction to Zephyr
Details are open, but given simplicity of the interface, using available Zephyr tools (DT, sys_read/write() and perhaps device_mmio.h) to implement a c generic mailbox handler code should be doable.
The text was updated successfully, but these errors were encountered: