Fix memory handle encoding.

We were sending handles as a single register in some cases, rather than
breaking them into two 32-bit registers as the FF-A spec requires.

Bug: 132420445
Change-Id: Ieb327ded2ad72f5332a1d001452176c8edbe0f08
diff --git a/src/arch/aarch64/hypervisor/handler.c b/src/arch/aarch64/hypervisor/handler.c
index 6ad8616..8eb580c 100644
--- a/src/arch/aarch64/hypervisor/handler.c
+++ b/src/arch/aarch64/hypervisor/handler.c
@@ -379,8 +379,8 @@
 		return true;
 	case FFA_MEM_RECLAIM_32:
 		*args = api_ffa_mem_reclaim(
-			(args->arg1 & 0xffffffff) | args->arg2 << 32,
-			args->arg3, current());
+			ffa_assemble_handle(args->arg1, args->arg2), args->arg3,
+			current());
 		return true;
 	}
 
diff --git a/src/ffa_memory.c b/src/ffa_memory.c
index 8def572..d31750d 100644
--- a/src/ffa_memory.c
+++ b/src/ffa_memory.c
@@ -1319,7 +1319,7 @@
 		return (struct ffa_value){.func = FFA_SUCCESS_32};
 	}
 
-	return (struct ffa_value){.func = FFA_SUCCESS_32, .arg2 = handle};
+	return ffa_mem_success(handle);
 }
 
 struct ffa_value ffa_memory_retrieve(struct vm_locked to_locked,