From f760f94246e990288d8441936781fc6fc5bc7859 Mon Sep 17 00:00:00 2001 From: rdiaz Date: Fri, 8 May 2026 01:15:59 +0000 Subject: [PATCH] The source and destination IDs look to be backwards via the FF-A specification for FFA_MSG_SEND_DIRECT_REQ2. The source is the upper 16 bits while the destination is the lower 16 bits. Flipped them to the correct order. --- odp-ffa/src/function/msg/direct_message.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/odp-ffa/src/function/msg/direct_message.rs b/odp-ffa/src/function/msg/direct_message.rs index 3368c5e..663432a 100644 --- a/odp-ffa/src/function/msg/direct_message.rs +++ b/odp-ffa/src/function/msg/direct_message.rs @@ -23,7 +23,7 @@ impl TryFrom for SmcParams { let (uuid_high, uuid_low) = msg.uuid.as_u64_pair(); SmcParams::try_from_iter( [ - combine_low_high_u16(msg.source_id, msg.destination_id), + combine_low_high_u16(msg.destination_id, msg.source_id), uuid_high.to_be(), uuid_low.to_be(), ] @@ -37,8 +37,8 @@ impl TryFrom for DirectMessage { type Error = Error; fn try_from(value: SmcParams) -> Result { - let source_id = (value.x1 & 0xFFFF) as u16; - let destination_id = (value.x1 >> 16) as u16; + let destination_id = (value.x1 & 0xFFFF) as u16; + let source_id = (value.x1 >> 16) as u16; let uuid_high = u64::from_be(value.x2); let uuid_low = u64::from_be(value.x3);