diff options
author | Dimitris Papastamos <dimitris.papastamos@arm.com> | 2018-10-08 17:34:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-08 17:34:59 +0100 |
commit | 3d3619c6dfcfd79685b92eb1190fbb1968a7d217 (patch) | |
tree | 6b78519dfe336dbbdd9cd4b860fea48d5e48472a /lib | |
parent | 5634a493e7182d0f8abd184a7fe23d0182545b84 (diff) | |
parent | a5fa5658e846ee00338dd90c2959b460e9aa54e6 (diff) | |
download | platform_external_arm-trusted-firmware-3d3619c6dfcfd79685b92eb1190fbb1968a7d217.tar.gz platform_external_arm-trusted-firmware-3d3619c6dfcfd79685b92eb1190fbb1968a7d217.tar.bz2 platform_external_arm-trusted-firmware-3d3619c6dfcfd79685b92eb1190fbb1968a7d217.zip |
Merge pull request #1617 from antonio-nino-diaz-arm/an/bugfix
xlat: Fix checks in mmap_add() and mmap_add_ctx()
Diffstat (limited to 'lib')
-rw-r--r-- | lib/xlat_tables/xlat_tables_common.c | 2 | ||||
-rw-r--r-- | lib/xlat_tables_v2/xlat_tables_core.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/xlat_tables/xlat_tables_common.c b/lib/xlat_tables/xlat_tables_common.c index a9aaeee8d..2ee77c7ae 100644 --- a/lib/xlat_tables/xlat_tables_common.c +++ b/lib/xlat_tables/xlat_tables_common.c @@ -176,7 +176,7 @@ void mmap_add(const mmap_region_t *mm) { const mmap_region_t *mm_cursor = mm; - while (mm_cursor->attr != 0U) { + while ((mm_cursor->size != 0U) || (mm_cursor->attr != 0U)) { mmap_add_region(mm_cursor->base_pa, mm_cursor->base_va, mm_cursor->size, mm_cursor->attr); mm_cursor++; diff --git a/lib/xlat_tables_v2/xlat_tables_core.c b/lib/xlat_tables_v2/xlat_tables_core.c index 3b6c6bcb2..8ced76e43 100644 --- a/lib/xlat_tables_v2/xlat_tables_core.c +++ b/lib/xlat_tables_v2/xlat_tables_core.c @@ -815,7 +815,7 @@ void mmap_add_ctx(xlat_ctx_t *ctx, const mmap_region_t *mm) { const mmap_region_t *mm_cursor = mm; - while (mm_cursor->attr != 0U) { + while (mm_cursor->granularity != 0U) { mmap_add_region_ctx(ctx, mm_cursor); mm_cursor++; } |