fix(qemu): update rmmd_attest_get_platform_token()

Update the parameters to rmmd_attest_get_platform_token(), which can now
handle platform tokens larger than 4kB. Since the QEMU sample token is
smaller than 4kB, our implementation remains the same. Take the
opportunity to clean up the function slightly.

Change-Id: Id5a1d576968ebd160d2b79c1f38392d4ecc89421
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
diff --git a/plat/qemu/common/qemu_plat_attest_token.c b/plat/qemu/common/qemu_plat_attest_token.c
index 141ff57..72f427c 100644
--- a/plat/qemu/common/qemu_plat_attest_token.c
+++ b/plat/qemu/common/qemu_plat_attest_token.c
@@ -211,18 +211,21 @@
  * RSE.
  */
 int plat_rmmd_get_cca_attest_token(uintptr_t buf, size_t *len,
-				   uintptr_t hash, size_t hash_size)
+				   uintptr_t hash, size_t hash_size,
+				   size_t *remaining_len)
 {
+	const size_t token_size = sizeof(sample_platform_token);
 	(void)hash;
 	(void)hash_size;
 
-	if (*len < sizeof(sample_platform_token)) {
+	/* Shouldn't happen because RMM uses the whole 4kB shared buffer */
+	if (*len < token_size) {
 		return -EINVAL;
 	}
 
-	(void)memcpy((void *)buf, (const void *)sample_platform_token,
-		     sizeof(sample_platform_token));
-	*len = sizeof(sample_platform_token);
+	memcpy((void *)buf, sample_platform_token, token_size);
+	*len = token_size;
+	*remaining_len = 0;
 
 	return 0;
 }