New Revision: https://docs.blackfin.uclinux.org/doku.php?id=protocols:icc
Old Revision: https://docs.blackfin.uclinux.org/doku.php?id=protocols:icc&rev=1386125529
Edit Summary: [Dispatch packet]
@@ -1389,8 +1389,34 @@
Bare metal application is loaded by user space loader into core B memory space. The main and disatch entries in application and its dsp_bridge library are figured out by the loader. The loader informs the dsp_driver of these entry address.
==== Dispatch packet ====
+
+ **icc session layer manage the user space packet send/recv session**
+
+ the sm_session data structure:
+
+ <code>
+ struct sm_session {
+ struct list_head rx_messages; /*rx queue sm message*/
+ struct list_head tx_messages;
+ uint32_t n_avail;
+ uint32_t n_uncompleted;
+ uint32_t local_ep;
+ uint32_t remote_ep; /*remote ep*/
+ uint32_t type;
+ pid_t pid;
+ uint32_t flags;
+ int (*handle)(struct sm_message *msg, struct sm_session *session);
+ struct sm_proto *proto_ops;
+ uint32_t queue_priority;
+ wait_queue_head_t rx_wait;
+ } __attribute__((__aligned__(4)));
+ </code>
+
+
+ **message_queue_thread**
+
**On core running Linux**
* To send a packet in application , the packet buffer should be allocated in user space first. Its pointer then is passed to the kernel system call. Kernel code also allocates a buffer in kernel space and copies the user data in. After that, the dsp bridge driver appends a packet ready message with packet address and length to the shared message queue in L2 memory and link the packet buffer to the sent list.
|