[rtems commit] bsp/beagle: Add nocache section

Christian Mauderer christianm at rtems.org
Wed Aug 7 18:40:25 UTC 2019


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

Author:    Vijay Kumar Banerjee <vijaykumar9597 at gmail.com>
Date:      Sat Aug  3 02:45:01 2019 +0530

bsp/beagle: Add nocache section

Closes #3780

---

 bsps/arm/beagle/start/bspstart.c      | 5 +++++
 bsps/arm/beagle/start/linkcmds.beagle | 7 ++++---
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/bsps/arm/beagle/start/bspstart.c b/bsps/arm/beagle/start/bspstart.c
index 47db5cc..224f9ec 100644
--- a/bsps/arm/beagle/start/bspstart.c
+++ b/bsps/arm/beagle/start/bspstart.c
@@ -16,6 +16,7 @@
 #include <bsp/bootcard.h>
 #include <bsp/irq-generic.h>
 #include <bsp/fdt.h>
+#include <bsp/linker-symbols.h>
 
 #include "bspdebug.h"
 
@@ -30,6 +31,10 @@ void bsp_start(void)
   bsp_interrupt_initialize();
   printk("\nRTEMS Beagleboard: %s\n", type);
   printk("        ARM Debug: 0x%08x\n", (intptr_t) bbb_arm_debug_registers());
+  rtems_cache_coherent_add_area(
+      bsp_section_nocacheheap_begin,
+      (uintptr_t) bsp_section_nocacheheap_size
+  );
 }
 
 uint32_t bsp_fdt_map_intr(const uint32_t *intr, size_t icells)
diff --git a/bsps/arm/beagle/start/linkcmds.beagle b/bsps/arm/beagle/start/linkcmds.beagle
index 5ecd221..bb4047e 100644
--- a/bsps/arm/beagle/start/linkcmds.beagle
+++ b/bsps/arm/beagle/start/linkcmds.beagle
@@ -11,7 +11,8 @@ MEMORY {
    * have either 256M or 512M memory. We just
    * use 256M for all.
    */
-  RAM      : ORIGIN = 0x80000000, LENGTH = 256M - 4M
+  RAM      : ORIGIN = 0x80000000, LENGTH = 256M - 16M - 4M
+  NOCACHE  : ORIGIN = 0x80000000 + 256M - 16M - 4M, LENGTH = 16M
   RAM_MMU  : ORIGIN = 0x80000000 + 256M - 4M, LENGTH = 16k
 }
 
@@ -30,8 +31,8 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", RAM);
 REGION_ALIAS ("REGION_BSS",            RAM);
 REGION_ALIAS ("REGION_WORK",           RAM);
 REGION_ALIAS ("REGION_STACK",          RAM);
-REGION_ALIAS ("REGION_NOCACHE",        RAM);
-REGION_ALIAS ("REGION_NOCACHE_LOAD",   RAM);
+REGION_ALIAS ("REGION_NOCACHE",        NOCACHE);
+REGION_ALIAS ("REGION_NOCACHE_LOAD",   NOCACHE);
 
 bsp_stack_abt_size = DEFINED (bsp_stack_abt_size) ? bsp_stack_abt_size : 1024;
 



More information about the vc mailing list