From 1a38aafbff93e478aa6f9e19af1ed76024062a73 Mon Sep 17 00:00:00 2001 From: Amit Nagal Date: Fri, 3 Nov 2023 13:24:56 +0530 Subject: [PATCH] fix(xlat): set MAX_PHYS_ADDR to total mapped physical region Currently some platforms set PLAT_XLAT_TABLES_DYNAMIC=0 and define it unconditionally also in platform Makefiles. Due to this when PLAT_XLAT_TABLES_DYNAMIC=0 the limits for MAX_PHYS_ADDR is wrongly set to the whole physical address space size. Instead of definition the value of PLAT_XLAT_TABLES_DYNAMIC is checked to set MAX_PHYS_ADDR to total mapped physical region. Reference: plat/nvidia/tegra/platform.mk Change-Id: I7bd786aaa4b039951341d0337f694074345f717f Signed-off-by: Amit Nagal --- lib/xlat_tables_v2/xlat_tables_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/xlat_tables_v2/xlat_tables_context.c b/lib/xlat_tables_v2/xlat_tables_context.c index 2fbbc788f..ae9244a5e 100644 --- a/lib/xlat_tables_v2/xlat_tables_context.c +++ b/lib/xlat_tables_v2/xlat_tables_context.c @@ -200,7 +200,7 @@ int xlat_make_tables_readonly(void) * region. Therefore, in this case we have to assume that the whole address * space size might be mapped. */ -#ifdef PLAT_XLAT_TABLES_DYNAMIC +#if PLAT_XLAT_TABLES_DYNAMIC #define MAX_PHYS_ADDR tf_xlat_ctx.pa_max_address #else #define MAX_PHYS_ADDR tf_xlat_ctx.max_pa