diff --git a/services/std_svc/spm/spm_xlat.c b/services/std_svc/spm/spm_xlat.c index 57ad742453a2f7493977f377ecfb607c30ccd4fa..5f83096507c9b68ce9861000d64174acb24aadd9 100644 --- a/services/std_svc/spm/spm_xlat.c +++ b/services/std_svc/spm/spm_xlat.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -159,6 +159,11 @@ static void map_rdmem(sp_context_t *sp_ctx, struct sp_rd_sect_mem_region *rdmem) unsigned int memtype = rdmem->attr & RD_MEM_MASK; + if (rd_size == 0U) { + VERBOSE("Memory region '%s' is empty. Ignored.\n", rdmem->name); + return; + } + VERBOSE("Adding memory region '%s'\n", rdmem->name); mmap.granularity = REGION_DEFAULT_GRANULARITY;