fix: partition message total size check
FFA_MSG_SEND2 ABI compares the partition message total size (partition
message header size + partition message payload size) with a macro which
already accounts for the partition message header size
(FFA_PARTITION_MSG_PAYLOAD_MAX).
Fix it by using a macro comparing with the maximum header + payload size
that can be held in a TX buffer (FFA_MSG_PAYLOAD_MAX).
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: I1a1d9018ea8e8e33a45207721ea880a396ae094e
diff --git a/src/api.c b/src/api.c
index d57edea..f952c07 100644
--- a/src/api.c
+++ b/src/api.c
@@ -2037,7 +2037,7 @@
/* Check the size of transfer. */
msg_size = FFA_RXTX_HEADER_SIZE + header.size;
- if ((msg_size > FFA_PARTITION_MSG_PAYLOAD_MAX) ||
+ if ((msg_size > FFA_MSG_PAYLOAD_MAX) ||
(header.size > FFA_PARTITION_MSG_PAYLOAD_MAX)) {
dlog_error("Message is too big.\n");
ret = ffa_error(FFA_INVALID_PARAMETERS);