diff --git a/services/std_svc/rmmd/rmmd_main.c b/services/std_svc/rmmd/rmmd_main.c index 6ccb00385..15b3724af 100644 --- a/services/std_svc/rmmd/rmmd_main.c +++ b/services/std_svc/rmmd/rmmd_main.c @@ -202,19 +202,23 @@ int rmmd_setup(void) int rc; /* Make sure RME is supported. */ - assert(is_feat_rme_present()); + if (is_feat_rme_present() == 0U) { + /* Mark the RMM boot as failed for all the CPUs */ + rmm_boot_failed = true; + return -ENOTSUP; + } rmm_ep_info = bl31_plat_get_next_image_ep_info(REALM); - if (rmm_ep_info == NULL) { + if ((rmm_ep_info == NULL) || (rmm_ep_info->pc == 0)) { WARN("No RMM image provided by BL2 boot loader, Booting " "device without RMM initialization. SMCs destined for " "RMM will return SMC_UNK\n"); + + /* Mark the boot as failed for all the CPUs */ + rmm_boot_failed = true; return -ENOENT; } - /* Under no circumstances will this parameter be 0 */ - assert(rmm_ep_info->pc == RMM_BASE); - /* Initialise an entrypoint to set up the CPU context */ ep_attr = EP_REALM; if ((read_sctlr_el3() & SCTLR_EE_BIT) != 0U) { @@ -239,6 +243,8 @@ int rmmd_setup(void) rc = plat_rmmd_load_manifest(manifest); if (rc != 0) { ERROR("Error loading RMM Boot Manifest (%i)\n", rc); + /* Mark the boot as failed for all the CPUs */ + rmm_boot_failed = true; return rc; } flush_dcache_range((uintptr_t)shared_buf_base, shared_buf_size); diff --git a/services/std_svc/std_svc_setup.c b/services/std_svc/std_svc_setup.c index e782d09d2..5cfe5f9d5 100644 --- a/services/std_svc/std_svc_setup.c +++ b/services/std_svc/std_svc_setup.c @@ -66,7 +66,7 @@ static int32_t std_svc_setup(void) #if ENABLE_RME if (rmmd_setup() != 0) { - ret = 1; + WARN("RMMD setup failed. Continuing boot.\n"); } #endif