[rtems commit] bsp/qoriq: Add nocache heap
Sebastian Huber
sebh at rtems.org
Thu Oct 8 13:48:38 UTC 2015
Module: rtems
Branch: master
Commit: cf8e03388b4d67e92c9598cb963b983a3594c7b6
Changeset: http://git.rtems.org/rtems/commit/?id=cf8e03388b4d67e92c9598cb963b983a3594c7b6
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Thu Oct 8 13:35:27 2015 +0200
bsp/qoriq: Add nocache heap
---
c/src/lib/libbsp/powerpc/qoriq/startup/bspstart.c | 5 +++++
.../lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_t2080rdb | 11 ++++++-----
c/src/lib/libbsp/powerpc/qoriq/startup/mmu-config.c | 9 +++++++++
3 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/c/src/lib/libbsp/powerpc/qoriq/startup/bspstart.c b/c/src/lib/libbsp/powerpc/qoriq/startup/bspstart.c
index 6d121ea..5f8f25b 100644
--- a/c/src/lib/libbsp/powerpc/qoriq/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/qoriq/startup/bspstart.c
@@ -141,6 +141,11 @@ void bsp_start(void)
/* Initalize interrupt support */
bsp_interrupt_initialize();
+ rtems_cache_coherent_add_area(
+ bsp_section_nocacheheap_begin,
+ (uintptr_t) bsp_section_nocacheheap_size
+ );
+
/* Disable boot page translation */
#if QORIQ_CHIP_IS_T_VARIANT(QORIQ_CHIP_VARIANT)
qoriq.lcc.bstar &= ~LCC_BSTAR_EN;
diff --git a/c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_t2080rdb b/c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_t2080rdb
index 951a0ee..50881a0 100644
--- a/c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_t2080rdb
+++ b/c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_t2080rdb
@@ -5,9 +5,10 @@
*/
MEMORY {
- LOW : ORIGIN = 0x4000, LENGTH = 16M - 16k
- HIGH : ORIGIN = 0x1000000, LENGTH = 2048M - 16M
- EMPTY : ORIGIN = 0x0, LENGTH = 0
+ LOW : ORIGIN = 0x00004000, LENGTH = 16M - 16k
+ NOCACHE : ORIGIN = 0x01000000, LENGTH = 16M
+ HIGH : ORIGIN = 0x02000000, LENGTH = 2048M - 32M
+ EMPTY : ORIGIN = 0x00000000, LENGTH = 0
}
REGION_ALIAS ("REGION_START", LOW);
@@ -25,8 +26,8 @@ REGION_ALIAS ("REGION_BSS", HIGH);
REGION_ALIAS ("REGION_RWEXTRA", HIGH);
REGION_ALIAS ("REGION_WORK", HIGH);
REGION_ALIAS ("REGION_STACK", HIGH);
-REGION_ALIAS ("REGION_NOCACHE", EMPTY);
-REGION_ALIAS ("REGION_NOCACHE_LOAD", EMPTY);
+REGION_ALIAS ("REGION_NOCACHE", NOCACHE);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", LOW);
REGION_ALIAS ("REGION_NVRAM", EMPTY);
bsp_section_robarrier_align = 0x1000000;
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 cab37b9..550202e 100644
--- a/c/src/lib/libbsp/powerpc/qoriq/startup/mmu-config.c
+++ b/c/src/lib/libbsp/powerpc/qoriq/startup/mmu-config.c
@@ -63,6 +63,13 @@ typedef struct {
.mas3 = FSL_EIS_MAS3_SR | FSL_EIS_MAS3_SW \
}
+#define ENTRY_IO(b, s) { \
+ .begin = (uint32_t) b, \
+ .size = (uint32_t) s, \
+ .mas2 = FSL_EIS_MAS2_I | FSL_EIS_MAS2_G, \
+ .mas3 = FSL_EIS_MAS3_SR | FSL_EIS_MAS3_SW \
+}
+
#define ENTRY_DEV(b, s) { \
.begin = (uint32_t) b, \
.size = (uint32_t) s, \
@@ -103,6 +110,8 @@ static const entry DATA config [] = {
ENTRY_RW(bsp_section_rwextra_begin, bsp_section_rwextra_size),
ENTRY_RW(bsp_section_work_begin, bsp_section_work_size),
ENTRY_RW(bsp_section_stack_begin, bsp_section_stack_size),
+ ENTRY_IO(bsp_section_nocache_begin, bsp_section_nocache_size),
+ ENTRY_IO(bsp_section_nocacheheap_begin, bsp_section_nocacheheap_size),
#if QORIQ_CHIP_IS_T_VARIANT(QORIQ_CHIP_VARIANT)
/* BMan Portals */
ENTRY_DEV_CACHED(0xf4000000, 0x01000000),
More information about the vc
mailing list