Browse Source

feat(spmc): enable parsing of messaging methods from manifest

Ensure that the `messaging-methods` entry is populated in
an SP's manifest. Currently only direct messaging is supported
so alert if this does not match the manifest entry.

Signed-off-by: Marc Bonnici <marc.bonnici@arm.com>
Change-Id: I67f1fad71a3507627993a004e0f8579388faf178
pull/1985/head
Marc Bonnici 3 years ago
parent
commit
3de378ff8c
  1. 17
      services/std_svc/spm/el3_spmc/spmc_main.c

17
services/std_svc/spm/el3_spmc/spmc_main.c

@ -544,6 +544,23 @@ static int sp_manifest_parse(void *sp_manifest, int offset,
sp->execution_state = config_32;
ret = fdt_read_uint32(sp_manifest, node,
"messaging-method", &config_32);
if (ret != 0) {
ERROR("Missing Secure Partition messaging method.\n");
return ret;
}
/* Validate this entry, we currently only support direct messaging. */
if ((config_32 & ~(FFA_PARTITION_DIRECT_REQ_RECV |
FFA_PARTITION_DIRECT_REQ_SEND)) != 0U) {
WARN("Invalid Secure Partition messaging method (0x%x)\n",
config_32);
return -EINVAL;
}
sp->properties = config_32;
ret = fdt_read_uint32(sp_manifest, node,
"execution-ctx-count", &config_32);

Loading…
Cancel
Save