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
diff --git a/services/std_svc/spmd/spmd_main.c b/services/std_svc/spmd/spmd_main.c
index 3c207ad..e85109d 100644
--- a/services/std_svc/spmd/spmd_main.c
+++ b/services/std_svc/spmd/spmd_main.c
@@ -513,15 +513,15 @@
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 @@
*/
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 @@
WARN("Booting device without SPM initialization.\n");
}
- return rc;
+ return 0;
}
/*******************************************************************************