feat(spmd): fail safe if SPM fails to initialize

The spmd_setup function is made fail safe in that a failure in the
SPMC manifest parsing, SPMD or SPMC initialization returns a success
code to the standard services initialization routine (std_svc_setup).
This permits continuing the boot process and initialize services
beyond the SPMD to succeed for the system to operate in the normal
world. It operates in a degraded mode for the secure world.

Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: Ida0ac91c17925279a79f112d190f9ad038f518e7
This commit is contained in:
Olivier Deprez 2022-11-16 16:46:23 +01:00
parent 1035e3a87a
commit 0d33649e3e

View file

@ -513,15 +513,15 @@ int spmd_setup(void)
rc = spmc_setup();
if (rc != 0) {
ERROR("SPMC initialisation failed 0x%x.\n", rc);
WARN("SPMC initialisation failed 0x%x.\n", rc);
}
return rc;
return 0;
}
spmc_ep_info = bl31_plat_get_next_image_ep_info(SECURE);
if (spmc_ep_info == NULL) {
WARN("No SPM Core image provided by BL2 boot loader.\n");
return -EINVAL;
return 0;
}
/* Under no circumstances will this parameter be 0 */
@ -533,8 +533,8 @@ int spmd_setup(void)
*/
spmc_manifest = (void *)spmc_ep_info->args.arg0;
if (spmc_manifest == NULL) {
ERROR("Invalid or absent SPM Core manifest.\n");
return -EINVAL;
WARN("Invalid or absent SPM Core manifest.\n");
return 0;
}
/* Load manifest, init SPMC */
@ -543,7 +543,7 @@ int spmd_setup(void)
WARN("Booting device without SPM initialization.\n");
}
return rc;
return 0;
}
/*******************************************************************************