[rtems commit] bsp/imx: Fix for RAM end at 4GiB

Sebastian Huber sebh at rtems.org
Thu Dec 20 13:22:35 UTC 2018


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Dec 20 14:21:40 2018 +0100

bsp/imx: Fix for RAM end at 4GiB

---

 bsps/arm/imx/start/bspstarthooks.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/bsps/arm/imx/start/bspstarthooks.c b/bsps/arm/imx/start/bspstarthooks.c
index 6a6b343..f4c5350 100644
--- a/bsps/arm/imx/start/bspstarthooks.c
+++ b/bsps/arm/imx/start/bspstarthooks.c
@@ -63,6 +63,11 @@ BSP_START_TEXT_SECTION static void setup_mmu_and_cache(void)
       begin = fdt32_to_cpu(((fdt32_t *) val)[0]);
       size = fdt32_to_cpu(((fdt32_t *) val)[1]);
 
+      /* The heap code does not like an end address of zero */
+      if (begin + size == 0) {
+        size -= 4;
+      }
+
       imx_mmu_config_table[WORKSPACE_ENTRY_INDEX].end = begin + size;
     }
   }



More information about the vc mailing list