Lines Matching full:message
97 /// This trait tells [`Cmdq::receive_msg`] how it can receive a given type of message.
99 /// Function identifying this message from the GSP.
105 /// Type containing the raw message to be read from the message queue.
106 type Message: FromBytes;
108 /// Method reading the message from the message queue and returning it.
110 /// From a `Self::Message` and a [`SBufferIter`], constructs an instance of `Self` and returns
113 msg: &Self::Message,
135 /// Unidirectional message queue.
137 /// Contains the data for a message queue, that either the driver or GSP writes to.
151 /// The message queue proper.
155 /// Structure shared between the driver and the GSP and containing the command and message queues.
192 /// * The driver owns (i.e. can write to) the part of the CPU message queue between the CPU write
194 /// * The driver owns (i.e. can read from) the part of the GSP message queue between the CPU read
223 /// Returns the region of the CPU message queue that the driver is currently allowed to write
226 /// As the message queue is a circular buffer, the region may be discontiguous in memory. In
258 /// Returns the region of the GSP message queue that the driver is currently allowed to read
261 /// As the message queue is a circular buffer, the region may be discontiguous in memory. In
326 // Returns the index of the memory page the GSP will write the next message to.
344 // Returns the index of the memory page the CPU can read the next message from.
353 // Informs the GSP that it can send `elem_count` new pages into the message queue.
384 /// A message ready to be processed from the message queue.
388 // Reference to the header of the message.
390 // Slices to the contents of the message. The second slice is zero unless the message loops
391 // over the message queue.
417 /// Offset of message queue ring buffer.
436 /// Computes the checksum for the message pointed to by `it`.
438 /// A message is made of several parts, so `it` is an iterator over byte slices representing
497 // Compute checksum now that the whole message is ready.
522 /// Wait for a message to become available on the message queue.
524 /// This works purely at the transport layer and does not interpret or validate the message
529 /// - A reference to the [`GspMsgElement`] of the message,
530 /// - Two byte slices with the contents of the message. The second slice is empty unless the
531 /// message loops across the message queue.
535 /// - `ETIMEDOUT` if `timeout` has elapsed before any message becomes available.
536 /// - `EIO` if there was some inconsistency (e.g. message shorter than advertised) on the
537 /// message queue.
539 /// Error codes returned by the message constructor are propagated as-is.
541 // Wait for a message to arrive from the GSP.
566 // Check that the driver read area is large enough for the message.
571 // Cut the message slices down to the actual length of the message.
605 /// Receive a message from the GSP.
607 /// `init` is a closure tasked with processing the message. It receives a reference to the
608 /// message in the message queue, and a [`SBufferIter`] pointing to its variable-length
611 /// The expected message is specified using the `M` generic parameter. If the pending message
612 /// is different, `EAGAIN` is returned and the unexpected message is dropped.
619 /// - `ETIMEDOUT` if `timeout` has elapsed before any message becomes available.
620 /// - `EIO` if there was some inconsistency (e.g. message shorter than advertised) on the
621 /// message queue.
622 /// - `EINVAL` if the function of the message was unrecognized.
628 let message = self.wait_for_msg(timeout)?;
629 let function = message.header.function().map_err(|_| EINVAL)?;
631 // Extract the message. Store the result as we want to advance the read pointer even in
634 let (cmd, contents_1) = M::Message::from_bytes_prefix(message.contents.0).ok_or(EIO)?;
635 let mut sbuffer = SBufferIter::new_reader([contents_1, message.contents.1]);
642 // Advance the read pointer past this message.
644 message.header.length().div_ceil(GSP_PAGE_SIZE),