From 6584eb2830b179e77da54f41388f57575315a2e8 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 8 Mar 2017 10:34:24 +0100 Subject: bsp/qoriq: Fix memory configuration Take nocache section into account which may reside after the workspace. --- c/src/lib/libbsp/powerpc/qoriq/startup/mmu-config.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/c/src/lib/libbsp/powerpc/qoriq/startup/mmu-config.c b/c/src/lib/libbsp/powerpc/qoriq/startup/mmu-config.c index 3c12be84fb..3f385aa999 100644 --- a/c/src/lib/libbsp/powerpc/qoriq/startup/mmu-config.c +++ b/c/src/lib/libbsp/powerpc/qoriq/startup/mmu-config.c @@ -179,7 +179,12 @@ static void TEXT config_fdt_adjust(void) size = MIN(size, 0x80000000U); - if (begin == 0 && size > (uintptr_t) bsp_section_work_end) { + if ( + begin == 0 + && size > (uintptr_t) bsp_section_work_end + && (uintptr_t) bsp_section_nocache_end + < (uintptr_t) bsp_section_work_end + ) { config[WORKSPACE_ENTRY_INDEX].size += (uintptr_t) size - (uintptr_t) bsp_section_work_end; } -- cgit v1.2.3