[PATCH] bsp/altera-cyclone-v: fix the creation of reserved memory regions

Marcus Ritter marcus.ritter at lss-lighting.de
Wed Mar 2 06:33:25 UTC 2022


---
  bsps/arm/altera-cyclone-v/start/bspgetworkarea.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bsps/arm/altera-cyclone-v/start/bspgetworkarea.c 
b/bsps/arm/altera-cyclone-v/start/bspgetworkarea.c
index 87d512b0d2..db8c4c4ef6 100644
--- a/bsps/arm/altera-cyclone-v/start/bspgetworkarea.c
+++ b/bsps/arm/altera-cyclone-v/start/bspgetworkarea.c
@@ -136,7 +136,7 @@ static size_t remove_reserved_memory(

        area = find_area(areas, area_count, hole_begin);
        area_end = (uintptr_t) _Memory_Get_end(area);
-      _Memory_Set_end(area, (void *) hole_end);
+      _Memory_Set_end(area, (void *) hole_begin);

        if (hole_end <= area_end) {
          if (area_count >= AREA_COUNT_MAX) {
-- 
2.30.2




More information about the devel mailing list