[rtems commit] bsps: Generalize .nocacheheap to .nocachenoload
Sebastian Huber
sebh at rtems.org
Wed Oct 28 12:08:08 UTC 2015
Module: rtems
Branch: master
Commit: 53c99b8ad131160cff9d62f8da6efdc354f364bb
Changeset: http://git.rtems.org/rtems/commit/?id=53c99b8ad131160cff9d62f8da6efdc354f364bb
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Wed Oct 28 10:18:05 2015 +0100
bsps: Generalize .nocacheheap to .nocachenoload
Add ability to place data in a non-loadable cache-inhibited area.
---
c/src/lib/libbsp/arm/shared/include/arm-cp15-start.h | 4 ++--
c/src/lib/libbsp/arm/shared/include/linker-symbols.h | 6 ++++++
c/src/lib/libbsp/arm/shared/startup/linkcmds.base | 6 +++++-
c/src/lib/libbsp/powerpc/qoriq/startup/mmu-config.c | 2 +-
c/src/lib/libbsp/powerpc/shared/include/linker-symbols.h | 6 ++++++
c/src/lib/libbsp/powerpc/shared/startup/linkcmds.base | 6 +++++-
6 files changed, 25 insertions(+), 5 deletions(-)
diff --git a/c/src/lib/libbsp/arm/shared/include/arm-cp15-start.h b/c/src/lib/libbsp/arm/shared/include/arm-cp15-start.h
index 4677bf9..01fdbb3 100644
--- a/c/src/lib/libbsp/arm/shared/include/arm-cp15-start.h
+++ b/c/src/lib/libbsp/arm/shared/include/arm-cp15-start.h
@@ -85,8 +85,8 @@ typedef struct {
.end = (uint32_t) bsp_section_nocache_end, \
.flags = ARMV7_MMU_DEVICE \
}, { \
- .begin = (uint32_t) bsp_section_nocacheheap_begin, \
- .end = (uint32_t) bsp_section_nocacheheap_end, \
+ .begin = (uint32_t) bsp_section_nocachenoload_begin, \
+ .end = (uint32_t) bsp_section_nocachenoload_end, \
.flags = ARMV7_MMU_DEVICE \
}
diff --git a/c/src/lib/libbsp/arm/shared/include/linker-symbols.h b/c/src/lib/libbsp/arm/shared/include/linker-symbols.h
index 7c966d5..a4df81a 100644
--- a/c/src/lib/libbsp/arm/shared/include/linker-symbols.h
+++ b/c/src/lib/libbsp/arm/shared/include/linker-symbols.h
@@ -119,6 +119,10 @@ LINKER_SYMBOL(bsp_section_nocache_size)
LINKER_SYMBOL(bsp_section_nocache_load_begin)
LINKER_SYMBOL(bsp_section_nocache_load_end)
+LINKER_SYMBOL(bsp_section_nocachenoload_begin)
+LINKER_SYMBOL(bsp_section_nocachenoload_end)
+LINKER_SYMBOL(bsp_section_nocachenoload_size)
+
LINKER_SYMBOL(bsp_section_nocacheheap_begin)
LINKER_SYMBOL(bsp_section_nocacheheap_end)
LINKER_SYMBOL(bsp_section_nocacheheap_size)
@@ -140,6 +144,8 @@ LINKER_SYMBOL(bsp_translation_table_end)
#define BSP_NOCACHE_SECTION __attribute__((section(".bsp_nocache")))
+#define BSP_NOCACHENOLOAD_SECTION __attribute__((section(".bsp_noload_nocache")))
+
LINKER_SYMBOL(bsp_processor_count)
/** @} */
diff --git a/c/src/lib/libbsp/arm/shared/startup/linkcmds.base b/c/src/lib/libbsp/arm/shared/startup/linkcmds.base
index cfa9073..6c17797 100644
--- a/c/src/lib/libbsp/arm/shared/startup/linkcmds.base
+++ b/c/src/lib/libbsp/arm/shared/startup/linkcmds.base
@@ -406,12 +406,16 @@ SECTIONS {
bsp_section_nocache_load_begin = LOADADDR (.nocache);
bsp_section_nocache_load_end = bsp_section_nocache_load_begin + bsp_section_nocache_size;
- .nocacheheap (NOLOAD) : ALIGN_WITH_INPUT {
+ .nocachenoload (NOLOAD) : ALIGN_WITH_INPUT {
+ bsp_section_nocachenoload_begin = .;
+ *(SORT(.bsp_noload_nocache*))
bsp_section_nocacheheap_begin = .;
. += ORIGIN (REGION_NOCACHE) + LENGTH (REGION_NOCACHE) - ABSOLUTE (.);
bsp_section_nocacheheap_end = .;
+ bsp_section_nocachenoload_end = .;
} > REGION_NOCACHE AT > REGION_NOCACHE
bsp_section_nocacheheap_size = bsp_section_nocacheheap_end - bsp_section_nocacheheap_begin;
+ bsp_section_nocachenoload_size = bsp_section_nocachenoload_end - bsp_section_nocachenoload_begin;
/* FIXME */
RamBase = ORIGIN (REGION_WORK);
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 550202e..a0b5845 100644
--- a/c/src/lib/libbsp/powerpc/qoriq/startup/mmu-config.c
+++ b/c/src/lib/libbsp/powerpc/qoriq/startup/mmu-config.c
@@ -111,7 +111,7 @@ static const entry DATA config [] = {
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),
+ ENTRY_IO(bsp_section_nocachenoload_begin, bsp_section_nocachenoload_size),
#if QORIQ_CHIP_IS_T_VARIANT(QORIQ_CHIP_VARIANT)
/* BMan Portals */
ENTRY_DEV_CACHED(0xf4000000, 0x01000000),
diff --git a/c/src/lib/libbsp/powerpc/shared/include/linker-symbols.h b/c/src/lib/libbsp/powerpc/shared/include/linker-symbols.h
index 4eb83be0..06f1165 100644
--- a/c/src/lib/libbsp/powerpc/shared/include/linker-symbols.h
+++ b/c/src/lib/libbsp/powerpc/shared/include/linker-symbols.h
@@ -99,6 +99,10 @@ LINKER_SYMBOL(bsp_section_nocache_size)
LINKER_SYMBOL(bsp_section_nocache_load_begin)
LINKER_SYMBOL(bsp_section_nocache_load_end)
+LINKER_SYMBOL(bsp_section_nocachenoload_begin)
+LINKER_SYMBOL(bsp_section_nocachenoload_end)
+LINKER_SYMBOL(bsp_section_nocachenoload_size)
+
LINKER_SYMBOL(bsp_section_nocacheheap_begin)
LINKER_SYMBOL(bsp_section_nocacheheap_end)
LINKER_SYMBOL(bsp_section_nocacheheap_size)
@@ -113,6 +117,8 @@ LINKER_SYMBOL(bsp_section_nvram_size)
#define BSP_NOCACHE_SECTION __attribute__((section(".bsp_nocache")))
+#define BSP_NOCACHENOLOAD_SECTION __attribute__((section(".bsp_noload_nocache")))
+
#define BSP_NVRAM_SECTION __attribute__((section(".bsp_nvram")))
/** @} */
diff --git a/c/src/lib/libbsp/powerpc/shared/startup/linkcmds.base b/c/src/lib/libbsp/powerpc/shared/startup/linkcmds.base
index d4f9007..7070cb0 100644
--- a/c/src/lib/libbsp/powerpc/shared/startup/linkcmds.base
+++ b/c/src/lib/libbsp/powerpc/shared/startup/linkcmds.base
@@ -342,12 +342,16 @@ SECTIONS {
bsp_section_nocache_load_begin = LOADADDR (.nocache);
bsp_section_nocache_load_end = bsp_section_nocache_load_begin + bsp_section_nocache_size;
- .nocacheheap (NOLOAD) : ALIGN_WITH_INPUT {
+ .nocachenoload (NOLOAD) : ALIGN_WITH_INPUT {
+ bsp_section_nocachenoload_begin = .;
+ *(SORT(.bsp_noload_nocache*))
bsp_section_nocacheheap_begin = .;
. += ORIGIN (REGION_NOCACHE) + LENGTH (REGION_NOCACHE) - ABSOLUTE (.);
bsp_section_nocacheheap_end = .;
+ bsp_section_nocachenoload_end = .;
} > REGION_NOCACHE AT > REGION_NOCACHE
bsp_section_nocacheheap_size = bsp_section_nocacheheap_end - bsp_section_nocacheheap_begin;
+ bsp_section_nocachenoload_size = bsp_section_nocachenoload_end - bsp_section_nocachenoload_begin;
.nvram (NOLOAD) : ALIGN_WITH_INPUT {
bsp_section_nvram_begin = .;
More information about the vc
mailing list