From be075c3edf634a2df1065597266c3e41d284287b Mon Sep 17 00:00:00 2001 From: vallau01 Date: Mon, 8 Aug 2022 14:10:14 +0200 Subject: [PATCH] fix(el3-spmc): compute full FF-A V1.1 desc size This patch fixes an issue in spmc_ffa_fill_desc. In order to compute the spmc_shm_get_v1_1_descriptor_size, fragment_length which is a fraction of the descriptor size is used as desc_size parameter. It has to be replaced with the full V1.0 descriptor size(obj->desc_filled). Ran a subset of our tests and they are passing. Change-Id: Ia4bbc5dabf0b77fa53d923ff609ee48ecd5bf549 Signed-off-by: vallau01 Signed-off-by: Lukas Hanel --- services/std_svc/spm/el3_spmc/spmc_shared_mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/std_svc/spm/el3_spmc/spmc_shared_mem.c b/services/std_svc/spm/el3_spmc/spmc_shared_mem.c index eab2096cf..5a3fe94cd 100644 --- a/services/std_svc/spm/el3_spmc/spmc_shared_mem.c +++ b/services/std_svc/spm/el3_spmc/spmc_shared_mem.c @@ -1018,7 +1018,7 @@ static long spmc_ffa_fill_desc(struct mailbox *mbox, /* Calculate the size that the v1.1 descriptor will required. */ size_t v1_1_desc_size = spmc_shm_get_v1_1_descriptor_size((void *) &obj->desc, - fragment_length); + obj->desc_size); if (v1_1_desc_size == 0U) { ERROR("%s: cannot determine size of descriptor.\n", -- 2.39.5