[rtems commit] bsp/qoriq: Fix memory configuration

Sebastian Huber sebh at rtems.org
Wed Mar 8 09:36:16 UTC 2017


Module:    rtems
Branch:    master
Commit:    6584eb2830b179e77da54f41388f57575315a2e8
Changeset: http://git.rtems.org/rtems/commit/?id=6584eb2830b179e77da54f41388f57575315a2e8

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Mar  8 10:34:24 2017 +0100

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 3c12be8..3f385aa 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;
 		}



More information about the vc mailing list