Hi all,
Recently, I'm going to port openamp to a new platfrom, other than the Xilinux board.
I'm consufing about triggering the IPI.
After creating the endpoint, the example -rpmsg-sample-echo- use rpmsg_send to send message to the remote core.
Then, it will enter "rpmsg_virtio_send_offchannel_raw" -> "virtqueue_kick".
if (vq_ring_must_notify(vq))
vq_ring_notify(vq);
In my opnion, these two lines of codes is to check whether we need to notify the remote core through interrupt.
(vq->vq_ring.used->flags & VRING_USED_F_NO_NOTIFY)
If the flag of avail buffer is set to VRING_USED_F_NO_NOTIFY, then it won't trigger an interrupt to the remote core.
The input ring buffer contains its own flags field, where only the 0th bit is used - if it is set, the “writer” side should not be notified, when the “reader” side consumes a buffer from the input or “avail” ring buffer.
By default the bit is not set, so after the reader consumes a buffer, the writer should be notified by triggering an interrupt.
The next field of the input ring buffer is the index of the head, which is updated by the writer, after a buffer index containing a new message is written in the ring[x] field.
If it is set, the master core should not be notified, when the remote side consumes a buffer.
According to the documentation, this bit is to mangage the interrupt to the master core.
The qestion is that where to notify the remote core after we enqueue an buffer to the avial buffer in send vring queue?
Best,
Chris