mailbox_hal: revise mailbox protocol

Pages attached to a mailbox msg were used to send+recv large msg data but
that's not where they are needed. Instead treat them as an attachment
to the msg that is available for bulk data transfer in addition to the
rpc msg.

To that end the first word sent through the FIFO is still the message
size (bytes). If that word is tagged with HEADER_FLAG_LONG_MESSAGE
then a second word is read from the FIFO with the physical address of
the associated page. The page information is available through a new
get_message_page() method.

While here fix a bug in send_message_sync() whereby a partial last word
was not sent. This bug exists in get_message_sync() too, but will defer
the fix as the SecurityCoordinator currently always send word-aligned data.

Bug: 294433731

Change-Id: I4b89faecc999c2dbc3a1d4beafba0b3411b039ad
1 file changed