[PATCH 2/2] bsps/arm: Add .nocache section
Sebastian Huber
sebastian.huber at embedded-brains.de
Tue Nov 25 16:28:42 UTC 2014
This section can be use to provide a cache coherent memory area via
rtems_cache_coherent_add_area().
---
c/src/lib/libbsp/arm/altera-cyclone-v/Makefile.am | 2 -
.../arm/altera-cyclone-v/include/nocache-heap.h | 55 -------------
.../libbsp/arm/altera-cyclone-v/network/network.c | 14 +---
.../lib/libbsp/arm/altera-cyclone-v/preinstall.am | 4 -
.../libbsp/arm/altera-cyclone-v/startup/bspstart.c | 7 +-
.../arm/altera-cyclone-v/startup/linkcmds.altcycv | 2 +
.../startup/linkcmds.altcycv_devkit | 11 ---
.../arm/altera-cyclone-v/startup/mmu-config.c | 9 +--
.../arm/altera-cyclone-v/startup/nocache-heap.c | 89 ----------------------
.../lib/libbsp/arm/beagle/startup/linkcmds.beagle | 2 +
c/src/lib/libbsp/arm/csb336/startup/linkcmds | 2 +
.../lib/libbsp/arm/csb337/startup/linkcmds.csb337 | 2 +
.../lib/libbsp/arm/csb337/startup/linkcmds.csb637 | 2 +
c/src/lib/libbsp/arm/edb7312/startup/linkcmds | 2 +
c/src/lib/libbsp/arm/gdbarmsim/startup/linkcmds | 2 +
c/src/lib/libbsp/arm/gp32/startup/linkcmds | 2 +
c/src/lib/libbsp/arm/gumstix/startup/linkcmds | 2 +
.../libbsp/arm/lm3s69xx/startup/linkcmds.lm3s3749 | 2 +
.../libbsp/arm/lm3s69xx/startup/linkcmds.lm3s6965 | 2 +
.../arm/lm3s69xx/startup/linkcmds.lm3s6965_qemu | 2 +
.../libbsp/arm/lm3s69xx/startup/linkcmds.lm4f120 | 2 +
.../arm/lpc176x/startup/linkcmds.lpc1768_mbed | 2 +
.../lpc176x/startup/linkcmds.lpc1768_mbed_ahb_ram | 2 +
.../startup/linkcmds.lpc1768_mbed_ahb_ram_eth | 2 +
.../arm/lpc24xx/startup/linkcmds.lpc17xx_ea_ram | 2 +
.../lpc24xx/startup/linkcmds.lpc17xx_ea_rom_int | 2 +
.../lpc24xx/startup/linkcmds.lpc17xx_plx800_ram | 2 +
.../startup/linkcmds.lpc17xx_plx800_rom_int | 2 +
.../libbsp/arm/lpc24xx/startup/linkcmds.lpc2362 | 2 +
.../arm/lpc24xx/startup/linkcmds.lpc23xx_tli800 | 2 +
.../libbsp/arm/lpc24xx/startup/linkcmds.lpc24xx_ea | 2 +
.../arm/lpc24xx/startup/linkcmds.lpc24xx_ncs_ram | 2 +
.../lpc24xx/startup/linkcmds.lpc24xx_ncs_rom_ext | 2 +
.../lpc24xx/startup/linkcmds.lpc24xx_ncs_rom_int | 2 +
.../lpc24xx/startup/linkcmds.lpc24xx_plx800_ram | 2 +
.../startup/linkcmds.lpc24xx_plx800_rom_int | 2 +
.../arm/lpc32xx/startup/linkcmds.lpc32xx_mzx | 2 +
.../lpc32xx/startup/linkcmds.lpc32xx_mzx_stage_1 | 2 +
.../lpc32xx/startup/linkcmds.lpc32xx_mzx_stage_2 | 2 +
.../arm/lpc32xx/startup/linkcmds.lpc32xx_phycore | 2 +
c/src/lib/libbsp/arm/nds/startup/linkcmds | 2 +
c/src/lib/libbsp/arm/raspberrypi/startup/linkcmds | 2 +
.../startup/linkcmds.realview_pbx_a9_qemu | 2 +
c/src/lib/libbsp/arm/rtl22xx/startup/linkcmds | 2 +
.../lib/libbsp/arm/shared/include/arm-cp15-start.h | 4 +
.../lib/libbsp/arm/shared/include/linker-symbols.h | 14 +++-
c/src/lib/libbsp/arm/shared/startup/linkcmds.base | 13 ++++
c/src/lib/libbsp/arm/smdk2410/startup/linkcmds | 2 +
.../arm/stm32f4/startup/linkcmds.stm32f105rc | 2 +
.../libbsp/arm/stm32f4/startup/linkcmds.stm32f4 | 2 +
.../arm/tms570/startup/linkcmds.tms570ls3137_hdk | 2 +
.../startup/linkcmds.tms570ls3137_hdk_intram | 2 +
.../tms570/startup/linkcmds.tms570ls3137_hdk_sdram | 2 +
c/src/lib/libbsp/arm/xilinx-zynq/configure.ac | 4 +
.../lib/libbsp/arm/xilinx-zynq/startup/bspstart.c | 5 ++
.../lib/libbsp/arm/xilinx-zynq/startup/linkcmds.in | 5 +-
56 files changed, 136 insertions(+), 184 deletions(-)
delete mode 100644 c/src/lib/libbsp/arm/altera-cyclone-v/include/nocache-heap.h
delete mode 100644 c/src/lib/libbsp/arm/altera-cyclone-v/startup/nocache-heap.c
diff --git a/c/src/lib/libbsp/arm/altera-cyclone-v/Makefile.am b/c/src/lib/libbsp/arm/altera-cyclone-v/Makefile.am
index 3e02200..6afe681 100644
--- a/c/src/lib/libbsp/arm/altera-cyclone-v/Makefile.am
+++ b/c/src/lib/libbsp/arm/altera-cyclone-v/Makefile.am
@@ -47,7 +47,6 @@ include_bsp_HEADERS += ../shared/include/arm-gic-regs.h
include_bsp_HEADERS += ../shared/include/arm-gic-tm27.h
include_bsp_HEADERS += ../shared/include/arm-release-id.h
include_bsp_HEADERS += include/irq.h
-include_bsp_HEADERS += include/nocache-heap.h
# Altera hwlib
include_bsp_HEADERS += hwlib/include/alt_16550_uart.h
@@ -171,7 +170,6 @@ libbsp_a_SOURCES += ../shared/arm-cp15-set-ttb-entries.c
libbsp_a_SOURCES += startup/bspreset.c
libbsp_a_SOURCES += startup/bspstart.c
libbsp_a_SOURCES += startup/bspstarthooks.c
-libbsp_a_SOURCES += startup/nocache-heap.c
libbsp_a_SOURCES += startup/mmu-config.c
if HAS_SMP
libbsp_a_SOURCES += ../shared/arm-a9mpcore-smp.c
diff --git a/c/src/lib/libbsp/arm/altera-cyclone-v/include/nocache-heap.h b/c/src/lib/libbsp/arm/altera-cyclone-v/include/nocache-heap.h
deleted file mode 100644
index 73f56f3..0000000
--- a/c/src/lib/libbsp/arm/altera-cyclone-v/include/nocache-heap.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * @file
- *
- * @brief Heap handling for uncached RAM
- */
-
-/*
- * Copyright (c) 2013 embedded brains GmbH. All rights reserved.
- *
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems at embedded-brains.de>
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
- */
-
-#ifndef NOCACHE_HEAP_H_
-#define NOCACHE_HEAP_H_
-
-#include <stddef.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/** @brief Initialize nocache heap.
- *
- * Initializes a heap for uncached RAM
- */
-void altera_cyclone_v_nocache_init_heap( void );
-
-/** @brief Nocache alloc.
- *
- * Allocate memory from uncached heap.
- * @param size Number of bytes to be allocated.
- * @returns Pointer to the allocated memory.
- */
-void *altera_cyclone_v_nocache_malloc( const size_t size );
-
-/** @brief Nocache free.
- *
- * Release memory from uncached heap.
- * @param ptr Address of the memory to be released.
- */
-void altera_cyclone_v_nocache_free( void *ptr );
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* NOCACHE_HEAP_H_ */
diff --git a/c/src/lib/libbsp/arm/altera-cyclone-v/network/network.c b/c/src/lib/libbsp/arm/altera-cyclone-v/network/network.c
index 43c95cd..28596cf 100644
--- a/c/src/lib/libbsp/arm/altera-cyclone-v/network/network.c
+++ b/c/src/lib/libbsp/arm/altera-cyclone-v/network/network.c
@@ -38,7 +38,6 @@
#include <bsp/hwlib.h>
#include <bsp/alt_clock_manager.h>
#include <bsp/alt_generalpurpose_io.h>
-#include <bsp/nocache-heap.h>
#include "socal/alt_rstmgr.h"
#include "socal/alt_sysmgr.h"
#include "socal/hps.h"
@@ -1032,7 +1031,7 @@ static int network_if_mem_alloc_nocache(
assert( memory != NULL );
if ( memory != NULL ) {
- *memory = altera_cyclone_v_nocache_malloc( size );
+ *memory = rtems_cache_coherent_allocate( size, 0, 0 );
if ( *memory != NULL ) {
eno = 0;
@@ -1057,18 +1056,11 @@ static int network_if_mem_free_nocache(
void *arg,
void *memory )
{
- int eno = EINVAL;
-
(void) arg;
- assert( memory != NULL );
+ free( memory );
- if ( memory != NULL ) {
- altera_cyclone_v_nocache_free( memory );
- eno = 0;
- }
-
- return eno;
+ return 0;
}
/**
diff --git a/c/src/lib/libbsp/arm/altera-cyclone-v/preinstall.am b/c/src/lib/libbsp/arm/altera-cyclone-v/preinstall.am
index 8fe547e..8ed1b5e 100644
--- a/c/src/lib/libbsp/arm/altera-cyclone-v/preinstall.am
+++ b/c/src/lib/libbsp/arm/altera-cyclone-v/preinstall.am
@@ -135,10 +135,6 @@ $(PROJECT_INCLUDE)/bsp/irq.h: include/irq.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq.h
-$(PROJECT_INCLUDE)/bsp/nocache-heap.h: include/nocache-heap.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/nocache-heap.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/nocache-heap.h
-
$(PROJECT_INCLUDE)/bsp/alt_16550_uart.h: hwlib/include/alt_16550_uart.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/alt_16550_uart.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/alt_16550_uart.h
diff --git a/c/src/lib/libbsp/arm/altera-cyclone-v/startup/bspstart.c b/c/src/lib/libbsp/arm/altera-cyclone-v/startup/bspstart.c
index 85eadbf..52e535c 100644
--- a/c/src/lib/libbsp/arm/altera-cyclone-v/startup/bspstart.c
+++ b/c/src/lib/libbsp/arm/altera-cyclone-v/startup/bspstart.c
@@ -15,11 +15,14 @@
#include <bsp/bootcard.h>
#include <bsp/arm-a9mpcore-clock.h>
#include <bsp/irq-generic.h>
-#include <bsp/nocache-heap.h>
+#include <bsp/linker-symbols.h>
void bsp_start( void )
{
a9mpcore_clock_initialize_early();
bsp_interrupt_initialize();
- altera_cyclone_v_nocache_init_heap();
+ rtems_cache_coherent_add_area(
+ bsp_nocache_heap_begin,
+ (uintptr_t) bsp_nocache_heap_size
+ );
}
diff --git a/c/src/lib/libbsp/arm/altera-cyclone-v/startup/linkcmds.altcycv b/c/src/lib/libbsp/arm/altera-cyclone-v/startup/linkcmds.altcycv
index da4275f..bea6df1 100644
--- a/c/src/lib/libbsp/arm/altera-cyclone-v/startup/linkcmds.altcycv
+++ b/c/src/lib/libbsp/arm/altera-cyclone-v/startup/linkcmds.altcycv
@@ -13,6 +13,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", NOCACHE);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", NOCACHE);
bsp_stack_irq_size = DEFINED (bsp_stack_irq_size) ? bsp_stack_irq_size : 4096;
bsp_stack_abt_size = DEFINED (bsp_stack_abt_size) ? bsp_stack_abt_size : 1024;
diff --git a/c/src/lib/libbsp/arm/altera-cyclone-v/startup/linkcmds.altcycv_devkit b/c/src/lib/libbsp/arm/altera-cyclone-v/startup/linkcmds.altcycv_devkit
index 0e0c38e..c36b3ce 100644
--- a/c/src/lib/libbsp/arm/altera-cyclone-v/startup/linkcmds.altcycv_devkit
+++ b/c/src/lib/libbsp/arm/altera-cyclone-v/startup/linkcmds.altcycv_devkit
@@ -4,15 +4,4 @@ MEMORY {
RAM : ORIGIN = 0x00300000, LENGTH = 1024M - 1M - 1M - 1M
}
-SECTIONS {
- .nocache (NOLOAD) : {
- bsp_section_nocache_begin = .;
- *(SORT(.bsp_nocache*))
- bsp_section_nocache_end = .;
- } > NOCACHE AT > NOCACHE
- bsp_section_nocache_size = bsp_section_nocache_end - bsp_section_nocache_begin;
- bsp_section_nocache_load_begin = LOADADDR (.nocache);
- bsp_section_nocache_load_end = bsp_section_nocache_load_begin + bsp_section_nocache_size;
-}
-
INCLUDE linkcmds.altcycv
diff --git a/c/src/lib/libbsp/arm/altera-cyclone-v/startup/mmu-config.c b/c/src/lib/libbsp/arm/altera-cyclone-v/startup/mmu-config.c
index 98b4ac8..9d56e5c 100644
--- a/c/src/lib/libbsp/arm/altera-cyclone-v/startup/mmu-config.c
+++ b/c/src/lib/libbsp/arm/altera-cyclone-v/startup/mmu-config.c
@@ -14,16 +14,9 @@
#include <bsp/arm-cp15-start.h>
-LINKER_SYMBOL(bsp_section_nocache_end);
-LINKER_SYMBOL(bsp_section_nocache_begin);
-
const arm_cp15_start_section_config arm_cp15_start_mmu_config_table[] = {
ARMV7_CP15_START_DEFAULT_SECTIONS,
- {
- .begin = (uint32_t) bsp_section_nocache_begin,
- .end = (uint32_t) bsp_section_nocache_end,
- .flags = ARMV7_MMU_DATA_READ_WRITE
- }, { /* Periphery area */
+ { /* Periphery area */
.begin = 0xFC000000U,
.end = 0x00000000U,
.flags = ARMV7_MMU_DEVICE
diff --git a/c/src/lib/libbsp/arm/altera-cyclone-v/startup/nocache-heap.c b/c/src/lib/libbsp/arm/altera-cyclone-v/startup/nocache-heap.c
deleted file mode 100644
index ae2faef..0000000
--- a/c/src/lib/libbsp/arm/altera-cyclone-v/startup/nocache-heap.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/**
- * @file
- *
- * @brief Heap handling for uncached RAM
- */
-
-/*
- * Copyright (c) 2013 embedded brains GmbH. All rights reserved.
- *
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems at embedded-brains.de>
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
- */
-
-#include <assert.h>
-#include <bsp/linker-symbols.h>
-#include <bsp/nocache-heap.h>
-#include <rtems/score/heapimpl.h>
-#include <rtems/score/apimutex.h>
-
-/** @brief Uncached RAM pool
- *
- * Allocate the whole bsp_nocache for the nocache heap */
-static char nocache_pool[1024 * 1024]
- __attribute__( ( section( ".bsp_nocache" ) ) );
-
-/** @brief Nocache heap
- *
- * Heap control for the uncached RAM heap */
-static Heap_Control nocache_heap;
-
-/** @brief Init nocache heap
- *
- * Constructor for the uncached RAM heap
- * @returns 0 on succuss, error code from errno.h on failure
- */
-void altera_cyclone_v_nocache_init_heap( void )
-{
- uintptr_t heap_status = 0;
-
- heap_status = _Heap_Initialize(
- &nocache_heap,
- &nocache_pool[0],
- sizeof( nocache_pool ),
- 0
- );
- assert( heap_status != 0 );
-}
-
-/** @brief Allocate uncached RAM
- *
- * Allocates RAM from the uncached heap
- * @param size Number of bytes to be allocated
- * @returns Pointer to the allocated RAM
- */
-void *altera_cyclone_v_nocache_malloc( const size_t size )
-{
- void* ret = NULL;
-
- _RTEMS_Lock_allocator();
- ret = _Heap_Allocate( &nocache_heap, size );
- _RTEMS_Unlock_allocator();
-
- return ret;
-}
-
-/** @brief Free uncached RAM
- *
- * Releases RAM from the uncached heap
- * @param ptr Address of the RAM to be released
- */
-void altera_cyclone_v_nocache_free( void *ptr )
-{
- if ( ptr != NULL ) {
- bool ok;
-
- _RTEMS_Lock_allocator();
- ok = _Heap_Free( &nocache_heap, ptr );
- _RTEMS_Unlock_allocator();
-
- assert( ok );
- }
-}
diff --git a/c/src/lib/libbsp/arm/beagle/startup/linkcmds.beagle b/c/src/lib/libbsp/arm/beagle/startup/linkcmds.beagle
index 93f1a49..20ea3eb 100644
--- a/c/src/lib/libbsp/arm/beagle/startup/linkcmds.beagle
+++ b/c/src/lib/libbsp/arm/beagle/startup/linkcmds.beagle
@@ -30,6 +30,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);
bsp_stack_irq_size = DEFINED (bsp_stack_irq_size) ? bsp_stack_irq_size : 4096;
bsp_stack_abt_size = DEFINED (bsp_stack_abt_size) ? bsp_stack_abt_size : 1024;
diff --git a/c/src/lib/libbsp/arm/csb336/startup/linkcmds b/c/src/lib/libbsp/arm/csb336/startup/linkcmds
index 040619a..2f6f8bd 100644
--- a/c/src/lib/libbsp/arm/csb336/startup/linkcmds
+++ b/c/src/lib/libbsp/arm/csb336/startup/linkcmds
@@ -19,6 +19,8 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", SDRAM);
REGION_ALIAS ("REGION_BSS", SDRAM);
REGION_ALIAS ("REGION_WORK", SDRAM);
REGION_ALIAS ("REGION_STACK", SDRAM);
+REGION_ALIAS ("REGION_NOCACHE", SDRAM);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", SDRAM);
_ttbl_base = ORIGIN (SDRAM_MMU);
diff --git a/c/src/lib/libbsp/arm/csb337/startup/linkcmds.csb337 b/c/src/lib/libbsp/arm/csb337/startup/linkcmds.csb337
index 727e49c..f59a33c 100644
--- a/c/src/lib/libbsp/arm/csb337/startup/linkcmds.csb337
+++ b/c/src/lib/libbsp/arm/csb337/startup/linkcmds.csb337
@@ -19,6 +19,8 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", SDRAM);
REGION_ALIAS ("REGION_BSS", SDRAM);
REGION_ALIAS ("REGION_WORK", SDRAM);
REGION_ALIAS ("REGION_STACK", SDRAM);
+REGION_ALIAS ("REGION_NOCACHE", SDRAM);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", SDRAM);
_ttbl_base = ORIGIN (SDRAM_MMU);
diff --git a/c/src/lib/libbsp/arm/csb337/startup/linkcmds.csb637 b/c/src/lib/libbsp/arm/csb337/startup/linkcmds.csb637
index 32c199e..91a34b7 100644
--- a/c/src/lib/libbsp/arm/csb337/startup/linkcmds.csb637
+++ b/c/src/lib/libbsp/arm/csb337/startup/linkcmds.csb637
@@ -19,6 +19,8 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", SDRAM);
REGION_ALIAS ("REGION_BSS", SDRAM);
REGION_ALIAS ("REGION_WORK", SDRAM);
REGION_ALIAS ("REGION_STACK", SDRAM);
+REGION_ALIAS ("REGION_NOCACHE", SDRAM);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", SDRAM);
_ttbl_base = ORIGIN (SDRAM_MMU);
diff --git a/c/src/lib/libbsp/arm/edb7312/startup/linkcmds b/c/src/lib/libbsp/arm/edb7312/startup/linkcmds
index f0a12a7..a0afc0a 100644
--- a/c/src/lib/libbsp/arm/edb7312/startup/linkcmds
+++ b/c/src/lib/libbsp/arm/edb7312/startup/linkcmds
@@ -17,6 +17,8 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", SDRAM);
REGION_ALIAS ("REGION_BSS", SDRAM);
REGION_ALIAS ("REGION_WORK", SDRAM);
REGION_ALIAS ("REGION_STACK", SDRAM);
+REGION_ALIAS ("REGION_NOCACHE", SDRAM);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", SDRAM);
bsp_vector_table_in_start_section = 1;
diff --git a/c/src/lib/libbsp/arm/gdbarmsim/startup/linkcmds b/c/src/lib/libbsp/arm/gdbarmsim/startup/linkcmds
index 45b0f75..536dbf5 100644
--- a/c/src/lib/libbsp/arm/gdbarmsim/startup/linkcmds
+++ b/c/src/lib/libbsp/arm/gdbarmsim/startup/linkcmds
@@ -17,5 +17,7 @@ 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);
INCLUDE linkcmds.armv4
diff --git a/c/src/lib/libbsp/arm/gp32/startup/linkcmds b/c/src/lib/libbsp/arm/gp32/startup/linkcmds
index d705a2b..6fcbe1a 100644
--- a/c/src/lib/libbsp/arm/gp32/startup/linkcmds
+++ b/c/src/lib/libbsp/arm/gp32/startup/linkcmds
@@ -18,6 +18,8 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", SDRAM);
REGION_ALIAS ("REGION_BSS", SDRAM);
REGION_ALIAS ("REGION_WORK", SDRAM);
REGION_ALIAS ("REGION_STACK", SDRAM);
+REGION_ALIAS ("REGION_NOCACHE", SDRAM);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", SDRAM);
_ttbl_base = ORIGIN (SDRAM_MMU);
diff --git a/c/src/lib/libbsp/arm/gumstix/startup/linkcmds b/c/src/lib/libbsp/arm/gumstix/startup/linkcmds
index 84c5cca..08cb2fc 100644
--- a/c/src/lib/libbsp/arm/gumstix/startup/linkcmds
+++ b/c/src/lib/libbsp/arm/gumstix/startup/linkcmds
@@ -19,6 +19,8 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", SDRAM);
REGION_ALIAS ("REGION_BSS", SDRAM);
REGION_ALIAS ("REGION_WORK", SDRAM);
REGION_ALIAS ("REGION_STACK", SDRAM);
+REGION_ALIAS ("REGION_NOCACHE", SDRAM);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", SDRAM);
_ttbl_base = ORIGIN (SDRAM_MMU);
diff --git a/c/src/lib/libbsp/arm/lm3s69xx/startup/linkcmds.lm3s3749 b/c/src/lib/libbsp/arm/lm3s69xx/startup/linkcmds.lm3s3749
index acfddc7..ff165c7 100644
--- a/c/src/lib/libbsp/arm/lm3s69xx/startup/linkcmds.lm3s3749
+++ b/c/src/lib/libbsp/arm/lm3s69xx/startup/linkcmds.lm3s3749
@@ -24,5 +24,7 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", ROM_INT);
REGION_ALIAS ("REGION_BSS", RAM_INT);
REGION_ALIAS ("REGION_WORK", RAM_INT);
REGION_ALIAS ("REGION_STACK", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", RAM_INT);
INCLUDE linkcmds.armv7m
diff --git a/c/src/lib/libbsp/arm/lm3s69xx/startup/linkcmds.lm3s6965 b/c/src/lib/libbsp/arm/lm3s69xx/startup/linkcmds.lm3s6965
index 573c9ff..02d2487 100644
--- a/c/src/lib/libbsp/arm/lm3s69xx/startup/linkcmds.lm3s6965
+++ b/c/src/lib/libbsp/arm/lm3s69xx/startup/linkcmds.lm3s6965
@@ -24,5 +24,7 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", ROM_INT);
REGION_ALIAS ("REGION_BSS", RAM_INT);
REGION_ALIAS ("REGION_WORK", RAM_INT);
REGION_ALIAS ("REGION_STACK", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", RAM_INT);
INCLUDE linkcmds.armv7m
diff --git a/c/src/lib/libbsp/arm/lm3s69xx/startup/linkcmds.lm3s6965_qemu b/c/src/lib/libbsp/arm/lm3s69xx/startup/linkcmds.lm3s6965_qemu
index 72c06a8..a4d3a19 100644
--- a/c/src/lib/libbsp/arm/lm3s69xx/startup/linkcmds.lm3s6965_qemu
+++ b/c/src/lib/libbsp/arm/lm3s69xx/startup/linkcmds.lm3s6965_qemu
@@ -24,5 +24,7 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", ROM_INT);
REGION_ALIAS ("REGION_BSS", RAM_INT);
REGION_ALIAS ("REGION_WORK", RAM_INT);
REGION_ALIAS ("REGION_STACK", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", RAM_INT);
INCLUDE linkcmds.armv7m
diff --git a/c/src/lib/libbsp/arm/lm3s69xx/startup/linkcmds.lm4f120 b/c/src/lib/libbsp/arm/lm3s69xx/startup/linkcmds.lm4f120
index fe19ff3..e995a3d 100644
--- a/c/src/lib/libbsp/arm/lm3s69xx/startup/linkcmds.lm4f120
+++ b/c/src/lib/libbsp/arm/lm3s69xx/startup/linkcmds.lm4f120
@@ -24,5 +24,7 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", ROM_INT);
REGION_ALIAS ("REGION_BSS", RAM_INT);
REGION_ALIAS ("REGION_WORK", RAM_INT);
REGION_ALIAS ("REGION_STACK", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", RAM_INT);
INCLUDE linkcmds.armv7m
diff --git a/c/src/lib/libbsp/arm/lpc176x/startup/linkcmds.lpc1768_mbed b/c/src/lib/libbsp/arm/lpc176x/startup/linkcmds.lpc1768_mbed
index d4a20d2..133d2f4 100644
--- a/c/src/lib/libbsp/arm/lpc176x/startup/linkcmds.lpc1768_mbed
+++ b/c/src/lib/libbsp/arm/lpc176x/startup/linkcmds.lpc1768_mbed
@@ -20,6 +20,8 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", ROM_INT);
REGION_ALIAS ("REGION_BSS", RAM_INT);
REGION_ALIAS ("REGION_WORK", RAM_INT);
REGION_ALIAS ("REGION_STACK", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", RAM_INT);
bsp_stack_main_size = DEFINED (bsp_stack_main_size) ? bsp_stack_main_size : 1024;
bsp_stack_main_size = ALIGN (bsp_stack_main_size, bsp_stack_align);
diff --git a/c/src/lib/libbsp/arm/lpc176x/startup/linkcmds.lpc1768_mbed_ahb_ram b/c/src/lib/libbsp/arm/lpc176x/startup/linkcmds.lpc1768_mbed_ahb_ram
index 0cd0ee1..75bdd75 100644
--- a/c/src/lib/libbsp/arm/lpc176x/startup/linkcmds.lpc1768_mbed_ahb_ram
+++ b/c/src/lib/libbsp/arm/lpc176x/startup/linkcmds.lpc1768_mbed_ahb_ram
@@ -21,6 +21,8 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", ROM_INT);
REGION_ALIAS ("REGION_BSS", RAM_INT);
REGION_ALIAS ("REGION_WORK", RAM_AHB);
REGION_ALIAS ("REGION_STACK", RAM_AHB);
+REGION_ALIAS ("REGION_NOCACHE", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", RAM_INT);
bsp_stack_main_size = DEFINED (bsp_stack_main_size) ? bsp_stack_main_size : 1024;
bsp_stack_main_size = ALIGN (bsp_stack_main_size, bsp_stack_align);
diff --git a/c/src/lib/libbsp/arm/lpc176x/startup/linkcmds.lpc1768_mbed_ahb_ram_eth b/c/src/lib/libbsp/arm/lpc176x/startup/linkcmds.lpc1768_mbed_ahb_ram_eth
index eecb6b1..7d91d8a 100644
--- a/c/src/lib/libbsp/arm/lpc176x/startup/linkcmds.lpc1768_mbed_ahb_ram_eth
+++ b/c/src/lib/libbsp/arm/lpc176x/startup/linkcmds.lpc1768_mbed_ahb_ram_eth
@@ -23,6 +23,8 @@ REGION_ALIAS ("REGION_BSS", RAM_AHB1);
REGION_ALIAS ("REGION_WORK", RAM_INT);
REGION_ALIAS ("REGION_STACK", RAM_INT);
REGION_ALIAS ("REGION_ETH", RAM_AHB2);
+REGION_ALIAS ("REGION_NOCACHE", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", RAM_INT);
bsp_stack_main_size = DEFINED (bsp_stack_main_size) ? bsp_stack_main_size : 1024;
bsp_stack_main_size = ALIGN (bsp_stack_main_size, bsp_stack_align);
diff --git a/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc17xx_ea_ram b/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc17xx_ea_ram
index 79065bb..d986261 100644
--- a/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc17xx_ea_ram
+++ b/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc17xx_ea_ram
@@ -21,5 +21,7 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", RAM_INT);
REGION_ALIAS ("REGION_BSS", RAM_EXT);
REGION_ALIAS ("REGION_WORK", RAM_EXT);
REGION_ALIAS ("REGION_STACK", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", RAM_INT);
INCLUDE linkcmds.armv7m
diff --git a/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc17xx_ea_rom_int b/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc17xx_ea_rom_int
index bae5dc8..db8c27f 100644
--- a/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc17xx_ea_rom_int
+++ b/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc17xx_ea_rom_int
@@ -21,5 +21,7 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", ROM_INT);
REGION_ALIAS ("REGION_BSS", RAM_EXT);
REGION_ALIAS ("REGION_WORK", RAM_EXT);
REGION_ALIAS ("REGION_STACK", RAM_EXT);
+REGION_ALIAS ("REGION_NOCACHE", RAM_EXT);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", RAM_EXT);
INCLUDE linkcmds.armv7m
diff --git a/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc17xx_plx800_ram b/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc17xx_plx800_ram
index 1f9e6b3..e507877 100644
--- a/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc17xx_plx800_ram
+++ b/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc17xx_plx800_ram
@@ -27,5 +27,7 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", RAM_EXT);
REGION_ALIAS ("REGION_BSS", RAM_EXT);
REGION_ALIAS ("REGION_WORK", RAM_EXT);
REGION_ALIAS ("REGION_STACK", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", RAM_INT);
INCLUDE linkcmds.armv7m
diff --git a/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc17xx_plx800_rom_int b/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc17xx_plx800_rom_int
index 02750e7..2ae0a58 100644
--- a/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc17xx_plx800_rom_int
+++ b/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc17xx_plx800_rom_int
@@ -27,5 +27,7 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", ROM_INT);
REGION_ALIAS ("REGION_BSS", RAM_EXT);
REGION_ALIAS ("REGION_WORK", RAM_EXT);
REGION_ALIAS ("REGION_STACK", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", RAM_INT);
INCLUDE linkcmds.armv7m
diff --git a/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc2362 b/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc2362
index fec6a25..e5bae18 100644
--- a/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc2362
+++ b/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc2362
@@ -56,6 +56,8 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", ROM_INT);
REGION_ALIAS ("REGION_BSS", RAM_INT);
REGION_ALIAS ("REGION_WORK", RAM_INT);
REGION_ALIAS ("REGION_STACK", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", RAM_INT);
lpc24xx_region_heap_0_begin = ORIGIN (RAM_ETH);
lpc24xx_region_heap_0_size = LENGTH (RAM_ETH);
diff --git a/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc23xx_tli800 b/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc23xx_tli800
index 3f09763..697b040 100644
--- a/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc23xx_tli800
+++ b/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc23xx_tli800
@@ -60,6 +60,8 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", ROM_INT);
REGION_ALIAS ("REGION_BSS", RAM_INT);
REGION_ALIAS ("REGION_WORK", RAM_INT);
REGION_ALIAS ("REGION_STACK", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", RAM_INT);
lpc24xx_region_heap_0_begin = ORIGIN (RAM_ETH);
lpc24xx_region_heap_0_size = LENGTH (RAM_ETH);
diff --git a/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc24xx_ea b/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc24xx_ea
index f7bced5..80b1e13 100644
--- a/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc24xx_ea
+++ b/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc24xx_ea
@@ -53,5 +53,7 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", RAM_EXT);
REGION_ALIAS ("REGION_BSS", RAM_EXT);
REGION_ALIAS ("REGION_WORK", RAM_EXT);
REGION_ALIAS ("REGION_STACK", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", RAM_INT);
INCLUDE linkcmds.armv4
diff --git a/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc24xx_ncs_ram b/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc24xx_ncs_ram
index e77e2ec..9f421f3 100644
--- a/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc24xx_ncs_ram
+++ b/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc24xx_ncs_ram
@@ -54,5 +54,7 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", RAM_EXT);
REGION_ALIAS ("REGION_BSS", RAM_EXT);
REGION_ALIAS ("REGION_WORK", RAM_EXT);
REGION_ALIAS ("REGION_STACK", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", RAM_INT);
INCLUDE linkcmds.armv4
diff --git a/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc24xx_ncs_rom_ext b/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc24xx_ncs_rom_ext
index 45aee50..7618a34 100644
--- a/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc24xx_ncs_rom_ext
+++ b/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc24xx_ncs_rom_ext
@@ -58,5 +58,7 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", ROM_BOOT);
REGION_ALIAS ("REGION_BSS", RAM_EXT);
REGION_ALIAS ("REGION_WORK", RAM_EXT);
REGION_ALIAS ("REGION_STACK", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", RAM_INT);
INCLUDE linkcmds.armv4
diff --git a/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc24xx_ncs_rom_int b/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc24xx_ncs_rom_int
index 0f87d53..47b79e7 100644
--- a/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc24xx_ncs_rom_int
+++ b/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc24xx_ncs_rom_int
@@ -58,5 +58,7 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", ROM_INT);
REGION_ALIAS ("REGION_BSS", RAM_EXT);
REGION_ALIAS ("REGION_WORK", RAM_EXT);
REGION_ALIAS ("REGION_STACK", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", RAM_INT);
INCLUDE linkcmds.armv4
diff --git a/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc24xx_plx800_ram b/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc24xx_plx800_ram
index 9d39f8d..2dcc6d2 100644
--- a/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc24xx_plx800_ram
+++ b/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc24xx_plx800_ram
@@ -26,5 +26,7 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", RAM_EXT);
REGION_ALIAS ("REGION_BSS", RAM_EXT);
REGION_ALIAS ("REGION_WORK", RAM_EXT);
REGION_ALIAS ("REGION_STACK", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", RAM_INT);
INCLUDE linkcmds.armv4
diff --git a/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc24xx_plx800_rom_int b/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc24xx_plx800_rom_int
index 851c416..f00c1d8 100644
--- a/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc24xx_plx800_rom_int
+++ b/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc24xx_plx800_rom_int
@@ -26,5 +26,7 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", ROM_INT);
REGION_ALIAS ("REGION_BSS", RAM_EXT);
REGION_ALIAS ("REGION_WORK", RAM_EXT);
REGION_ALIAS ("REGION_STACK", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", RAM_INT);
INCLUDE linkcmds.armv4
diff --git a/c/src/lib/libbsp/arm/lpc32xx/startup/linkcmds.lpc32xx_mzx b/c/src/lib/libbsp/arm/lpc32xx/startup/linkcmds.lpc32xx_mzx
index a466ecf..127a82f 100644
--- a/c/src/lib/libbsp/arm/lpc32xx/startup/linkcmds.lpc32xx_mzx
+++ b/c/src/lib/libbsp/arm/lpc32xx/startup/linkcmds.lpc32xx_mzx
@@ -56,6 +56,8 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", RAM_EXT);
REGION_ALIAS ("REGION_BSS", RAM_EXT);
REGION_ALIAS ("REGION_WORK", RAM_EXT);
REGION_ALIAS ("REGION_STACK", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", RAM_INT);
lpc32xx_scratch_area = ORIGIN (RAM_SCRATCH);
diff --git a/c/src/lib/libbsp/arm/lpc32xx/startup/linkcmds.lpc32xx_mzx_stage_1 b/c/src/lib/libbsp/arm/lpc32xx/startup/linkcmds.lpc32xx_mzx_stage_1
index f5f8cb6..0f944b2 100644
--- a/c/src/lib/libbsp/arm/lpc32xx/startup/linkcmds.lpc32xx_mzx_stage_1
+++ b/c/src/lib/libbsp/arm/lpc32xx/startup/linkcmds.lpc32xx_mzx_stage_1
@@ -56,6 +56,8 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", RAM_INT);
REGION_ALIAS ("REGION_BSS", RAM_INT);
REGION_ALIAS ("REGION_WORK", RAM_INT);
REGION_ALIAS ("REGION_STACK", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", RAM_INT);
lpc32xx_scratch_area = ORIGIN (RAM_SCRATCH);
diff --git a/c/src/lib/libbsp/arm/lpc32xx/startup/linkcmds.lpc32xx_mzx_stage_2 b/c/src/lib/libbsp/arm/lpc32xx/startup/linkcmds.lpc32xx_mzx_stage_2
index bc457a3..2aa8c34 100644
--- a/c/src/lib/libbsp/arm/lpc32xx/startup/linkcmds.lpc32xx_mzx_stage_2
+++ b/c/src/lib/libbsp/arm/lpc32xx/startup/linkcmds.lpc32xx_mzx_stage_2
@@ -57,6 +57,8 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", RAM_EXT);
REGION_ALIAS ("REGION_BSS", RAM_EXT);
REGION_ALIAS ("REGION_WORK", RAM_EXT);
REGION_ALIAS ("REGION_STACK", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", RAM_INT);
lpc32xx_scratch_area = ORIGIN (RAM_SCRATCH);
diff --git a/c/src/lib/libbsp/arm/lpc32xx/startup/linkcmds.lpc32xx_phycore b/c/src/lib/libbsp/arm/lpc32xx/startup/linkcmds.lpc32xx_phycore
index b094fb1..d874c46 100644
--- a/c/src/lib/libbsp/arm/lpc32xx/startup/linkcmds.lpc32xx_phycore
+++ b/c/src/lib/libbsp/arm/lpc32xx/startup/linkcmds.lpc32xx_phycore
@@ -57,6 +57,8 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", RAM_EXT);
REGION_ALIAS ("REGION_BSS", RAM_EXT);
REGION_ALIAS ("REGION_WORK", RAM_EXT);
REGION_ALIAS ("REGION_STACK", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", RAM_INT);
bsp_stack_irq_size = DEFINED (bsp_stack_irq_size) ? bsp_stack_irq_size : 4096;
bsp_stack_abt_size = DEFINED (bsp_stack_abt_size) ? bsp_stack_abt_size : 1024;
diff --git a/c/src/lib/libbsp/arm/nds/startup/linkcmds b/c/src/lib/libbsp/arm/nds/startup/linkcmds
index 964bb6c..5d38b65 100644
--- a/c/src/lib/libbsp/arm/nds/startup/linkcmds
+++ b/c/src/lib/libbsp/arm/nds/startup/linkcmds
@@ -20,6 +20,8 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", EWRAM);
REGION_ALIAS ("REGION_BSS", EWRAM);
REGION_ALIAS ("REGION_WORK", EWRAM);
REGION_ALIAS ("REGION_STACK", EWRAM);
+REGION_ALIAS ("REGION_NOCACHE", EWRAM);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", EWRAM);
__dtcm_top = ORIGIN (DTCM) + LENGTH (DTCM);
__irq_flags = __dtcm_top - 0x08;
diff --git a/c/src/lib/libbsp/arm/raspberrypi/startup/linkcmds b/c/src/lib/libbsp/arm/raspberrypi/startup/linkcmds
index 7b21235..f1ad11c 100644
--- a/c/src/lib/libbsp/arm/raspberrypi/startup/linkcmds
+++ b/c/src/lib/libbsp/arm/raspberrypi/startup/linkcmds
@@ -56,6 +56,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);
bsp_stack_irq_size = DEFINED (bsp_stack_irq_size) ? bsp_stack_irq_size : 4096;
bsp_stack_abt_size = DEFINED (bsp_stack_abt_size) ? bsp_stack_abt_size : 1024;
diff --git a/c/src/lib/libbsp/arm/realview-pbx-a9/startup/linkcmds.realview_pbx_a9_qemu b/c/src/lib/libbsp/arm/realview-pbx-a9/startup/linkcmds.realview_pbx_a9_qemu
index ce34d77..5251c48 100644
--- a/c/src/lib/libbsp/arm/realview-pbx-a9/startup/linkcmds.realview_pbx_a9_qemu
+++ b/c/src/lib/libbsp/arm/realview-pbx-a9/startup/linkcmds.realview_pbx_a9_qemu
@@ -19,6 +19,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);
bsp_stack_irq_size = DEFINED (bsp_stack_irq_size) ? bsp_stack_irq_size : 4096;
bsp_stack_abt_size = DEFINED (bsp_stack_abt_size) ? bsp_stack_abt_size : 1024;
diff --git a/c/src/lib/libbsp/arm/rtl22xx/startup/linkcmds b/c/src/lib/libbsp/arm/rtl22xx/startup/linkcmds
index 0d5625c..d39dcb1 100644
--- a/c/src/lib/libbsp/arm/rtl22xx/startup/linkcmds
+++ b/c/src/lib/libbsp/arm/rtl22xx/startup/linkcmds
@@ -18,5 +18,7 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", SDRAM);
REGION_ALIAS ("REGION_BSS", SDRAM);
REGION_ALIAS ("REGION_WORK", SDRAM);
REGION_ALIAS ("REGION_STACK", SDRAM);
+REGION_ALIAS ("REGION_NOCACHE", SDRAM);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", SDRAM);
INCLUDE linkcmds.armv4
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 7d5fd0f..c70ebf9 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
@@ -80,6 +80,10 @@ typedef struct {
.begin = (uint32_t) bsp_section_stack_begin, \
.end = (uint32_t) bsp_section_stack_end, \
.flags = ARMV7_MMU_DATA_READ_WRITE_CACHED \
+ }, { \
+ .begin = (uint32_t) bsp_section_nocache_begin, \
+ .end = (uint32_t) bsp_section_nocache_end, \
+ .flags = ARMV7_MMU_DEVICE \
}
BSP_START_DATA_SECTION extern const arm_cp15_start_section_config
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 ec7fed2..8bfa5d1 100644
--- a/c/src/lib/libbsp/arm/shared/include/linker-symbols.h
+++ b/c/src/lib/libbsp/arm/shared/include/linker-symbols.h
@@ -7,7 +7,7 @@
*/
/*
- * Copyright (c) 2008-2013 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2008-2014 embedded brains GmbH. All rights reserved.
*
* embedded brains GmbH
* Dornierstr. 4
@@ -113,6 +113,12 @@ LINKER_SYMBOL(bsp_section_stack_begin)
LINKER_SYMBOL(bsp_section_stack_end)
LINKER_SYMBOL(bsp_section_stack_size)
+LINKER_SYMBOL(bsp_section_nocache_begin)
+LINKER_SYMBOL(bsp_section_nocache_end)
+LINKER_SYMBOL(bsp_section_nocache_size)
+LINKER_SYMBOL(bsp_section_nocache_load_begin)
+LINKER_SYMBOL(bsp_section_nocache_load_end)
+
LINKER_SYMBOL(bsp_vector_table_begin)
LINKER_SYMBOL(bsp_vector_table_end)
LINKER_SYMBOL(bsp_vector_table_size)
@@ -124,10 +130,16 @@ LINKER_SYMBOL(bsp_start_vector_table_size)
LINKER_SYMBOL(bsp_translation_table_base)
LINKER_SYMBOL(bsp_translation_table_end)
+LINKER_SYMBOL(bsp_nocache_heap_begin)
+LINKER_SYMBOL(bsp_nocache_heap_end)
+LINKER_SYMBOL(bsp_nocache_heap_size)
+
#define BSP_FAST_TEXT_SECTION __attribute__((section(".bsp_fast_text")))
#define BSP_FAST_DATA_SECTION __attribute__((section(".bsp_fast_data")))
+#define BSP_NOCACHE_SECTION __attribute__((section(".bsp_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 268e88a..8a653e9 100644
--- a/c/src/lib/libbsp/arm/shared/startup/linkcmds.base
+++ b/c/src/lib/libbsp/arm/shared/startup/linkcmds.base
@@ -397,6 +397,19 @@ SECTIONS {
} > REGION_STACK AT > REGION_STACK
bsp_section_stack_size = bsp_section_stack_end - bsp_section_stack_begin;
+ .nocache : ALIGN_WITH_INPUT {
+ bsp_section_nocache_begin = .;
+ *(SORT(.bsp_nocache*))
+ bsp_nocache_heap_begin = .;
+ . += ORIGIN (REGION_NOCACHE) + LENGTH (REGION_NOCACHE) - ABSOLUTE (.);
+ bsp_nocache_heap_end = .;
+ bsp_section_nocache_end = .;
+ } > REGION_NOCACHE AT > REGION_NOCACHE_LOAD
+ bsp_nocache_heap_size = bsp_nocache_heap_end - bsp_nocache_heap_begin;
+ bsp_section_nocache_size = bsp_section_nocache_end - bsp_section_nocache_begin;
+ bsp_section_nocache_load_begin = LOADADDR (.nocache);
+ bsp_section_nocache_load_end = bsp_section_nocache_load_begin + bsp_section_nocache_size;
+
/* FIXME */
RamBase = ORIGIN (REGION_WORK);
RamSize = LENGTH (REGION_WORK);
diff --git a/c/src/lib/libbsp/arm/smdk2410/startup/linkcmds b/c/src/lib/libbsp/arm/smdk2410/startup/linkcmds
index 2a14c80..9cd6888 100644
--- a/c/src/lib/libbsp/arm/smdk2410/startup/linkcmds
+++ b/c/src/lib/libbsp/arm/smdk2410/startup/linkcmds
@@ -18,6 +18,8 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", SDRAM);
REGION_ALIAS ("REGION_BSS", SDRAM);
REGION_ALIAS ("REGION_WORK", SDRAM);
REGION_ALIAS ("REGION_STACK", SDRAM);
+REGION_ALIAS ("REGION_NOCACHE", SDRAM);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", SDRAM);
_ttbl_base = ORIGIN (SDRAM_MMU);
diff --git a/c/src/lib/libbsp/arm/stm32f4/startup/linkcmds.stm32f105rc b/c/src/lib/libbsp/arm/stm32f4/startup/linkcmds.stm32f105rc
index 58e8094..d3ea200 100644
--- a/c/src/lib/libbsp/arm/stm32f4/startup/linkcmds.stm32f105rc
+++ b/c/src/lib/libbsp/arm/stm32f4/startup/linkcmds.stm32f105rc
@@ -18,5 +18,7 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", ROM_INT);
REGION_ALIAS ("REGION_BSS", RAM_INT);
REGION_ALIAS ("REGION_WORK", RAM_INT);
REGION_ALIAS ("REGION_STACK", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", RAM_INT);
INCLUDE linkcmds.armv7m
diff --git a/c/src/lib/libbsp/arm/stm32f4/startup/linkcmds.stm32f4 b/c/src/lib/libbsp/arm/stm32f4/startup/linkcmds.stm32f4
index 8219505..1d16cfd 100644
--- a/c/src/lib/libbsp/arm/stm32f4/startup/linkcmds.stm32f4
+++ b/c/src/lib/libbsp/arm/stm32f4/startup/linkcmds.stm32f4
@@ -18,5 +18,7 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", ROM_INT);
REGION_ALIAS ("REGION_BSS", RAM_INT);
REGION_ALIAS ("REGION_WORK", RAM_INT);
REGION_ALIAS ("REGION_STACK", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", RAM_INT);
INCLUDE linkcmds.armv7m
diff --git a/c/src/lib/libbsp/arm/tms570/startup/linkcmds.tms570ls3137_hdk b/c/src/lib/libbsp/arm/tms570/startup/linkcmds.tms570ls3137_hdk
index e02dcd6..5ecd4ed 100644
--- a/c/src/lib/libbsp/arm/tms570/startup/linkcmds.tms570ls3137_hdk
+++ b/c/src/lib/libbsp/arm/tms570/startup/linkcmds.tms570ls3137_hdk
@@ -20,6 +20,8 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", ROM_INT);
REGION_ALIAS ("REGION_BSS", RAM_INT);
REGION_ALIAS ("REGION_WORK", RAM_INT);
REGION_ALIAS ("REGION_STACK", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", RAM_INT);
bsp_stack_main_size = DEFINED (bsp_stack_main_size) ? bsp_stack_main_size : 1024;
bsp_stack_main_size = ALIGN (bsp_stack_main_size, bsp_stack_align);
diff --git a/c/src/lib/libbsp/arm/tms570/startup/linkcmds.tms570ls3137_hdk_intram b/c/src/lib/libbsp/arm/tms570/startup/linkcmds.tms570ls3137_hdk_intram
index 19bb7b2..dd40fe2 100644
--- a/c/src/lib/libbsp/arm/tms570/startup/linkcmds.tms570ls3137_hdk_intram
+++ b/c/src/lib/libbsp/arm/tms570/startup/linkcmds.tms570ls3137_hdk_intram
@@ -21,6 +21,8 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", RAM_INT);
REGION_ALIAS ("REGION_BSS", RAM_INT);
REGION_ALIAS ("REGION_WORK", RAM_INT);
REGION_ALIAS ("REGION_STACK", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", RAM_INT);
bsp_stack_main_size = DEFINED (bsp_stack_main_size) ? bsp_stack_main_size : 1024;
bsp_stack_main_size = ALIGN (bsp_stack_main_size, bsp_stack_align);
diff --git a/c/src/lib/libbsp/arm/tms570/startup/linkcmds.tms570ls3137_hdk_sdram b/c/src/lib/libbsp/arm/tms570/startup/linkcmds.tms570ls3137_hdk_sdram
index 110179f..cb628c6 100644
--- a/c/src/lib/libbsp/arm/tms570/startup/linkcmds.tms570ls3137_hdk_sdram
+++ b/c/src/lib/libbsp/arm/tms570/startup/linkcmds.tms570ls3137_hdk_sdram
@@ -20,6 +20,8 @@ REGION_ALIAS ("REGION_FAST_DATA_LOAD", RAM_EXT);
REGION_ALIAS ("REGION_BSS", RAM_EXT);
REGION_ALIAS ("REGION_WORK", RAM_EXT);
REGION_ALIAS ("REGION_STACK", RAM_EXT);
+REGION_ALIAS ("REGION_NOCACHE", RAM_EXT);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", RAM_EXT);
bsp_stack_main_size = DEFINED (bsp_stack_main_size) ? bsp_stack_main_size : 1024;
bsp_stack_main_size = ALIGN (bsp_stack_main_size, bsp_stack_align);
diff --git a/c/src/lib/libbsp/arm/xilinx-zynq/configure.ac b/c/src/lib/libbsp/arm/xilinx-zynq/configure.ac
index 8f47f2f..ccc9050 100644
--- a/c/src/lib/libbsp/arm/xilinx-zynq/configure.ac
+++ b/c/src/lib/libbsp/arm/xilinx-zynq/configure.ac
@@ -77,6 +77,9 @@ RTEMS_BSPOPTS_SET([BSP_ZYNQ_RAM_LENGTH],[xilinx_zynq_zedboard],[512M])
RTEMS_BSPOPTS_SET([BSP_ZYNQ_RAM_LENGTH],[*],[256M])
RTEMS_BSPOPTS_HELP([BSP_ZYNQ_RAM_LENGTH],[override a BSP's default RAM length])
+RTEMS_BSPOPTS_SET([BSP_ZYNQ_NOCACHE_LENGTH],[*],[1M])
+RTEMS_BSPOPTS_HELP([BSP_ZYNQ_NOCACHE_LENGTH],[length of nocache RAM region])
+
AS_IF([test "x${RTEMS_BSP}" == xxilinx_zynq_a9_qemu],
[ZYNQ_RAM_ORIGIN="0x00000000"
ZYNQ_RAM_MMU="0x0fffc000"
@@ -133,6 +136,7 @@ ZYNQ_LINKCMD([ZYNQ_RAM_MMU],[MMU region origin],[${ZYNQ_RAM_MMU}])
ZYNQ_LINKCMD([ZYNQ_RAM_MMU_LENGTH],[MMU region length],[${ZYNQ_RAM_MMU_LENGTH}])
ZYNQ_LINKCMD([ZYNQ_RAM_ORIGIN_AVAILABLE],[origin of available RAM],[${ZYNQ_RAM_ORIGIN_AVAILABLE}])
ZYNQ_LINKCMD([ZYNQ_RAM_LENGTH_AVAILABLE],[length of available RAM],[${ZYNQ_RAM_LENGTH_AVAILABLE}])
+ZYNQ_LINKCMD([ZYNQ_RAM_NOCACHE_LENGTH],[length of nocache RAM region],[${BSP_ZYNQ_NOCACHE_LENGTH}])
ZYNQ_LINKCMD([ZYNQ_RAM_INT_0_ORIGIN],[internal 0 RAM region origin],[${ZYNQ_RAM_INT_0_ORIGIN}])
ZYNQ_LINKCMD([ZYNQ_RAM_INT_0_LENGTH],[internal 0 RAM region length],[${ZYNQ_RAM_INT_0_LENGTH}])
ZYNQ_LINKCMD([ZYNQ_RAM_INT_1_ORIGIN],[internal 1 RAM region origin],[${ZYNQ_RAM_INT_1_ORIGIN}])
diff --git a/c/src/lib/libbsp/arm/xilinx-zynq/startup/bspstart.c b/c/src/lib/libbsp/arm/xilinx-zynq/startup/bspstart.c
index ad66640..62511e7 100644
--- a/c/src/lib/libbsp/arm/xilinx-zynq/startup/bspstart.c
+++ b/c/src/lib/libbsp/arm/xilinx-zynq/startup/bspstart.c
@@ -16,6 +16,7 @@
#include <bsp/bootcard.h>
#include <bsp/arm-a9mpcore-clock.h>
#include <bsp/irq-generic.h>
+#include <bsp/linker-symbols.h>
__attribute__ ((weak)) uint32_t zynq_clock_cpu_1x(void)
{
@@ -26,4 +27,8 @@ void bsp_start(void)
{
a9mpcore_clock_initialize_early();
bsp_interrupt_initialize();
+ rtems_cache_coherent_add_area(
+ bsp_nocache_heap_begin,
+ (uintptr_t) bsp_nocache_heap_size
+ );
}
diff --git a/c/src/lib/libbsp/arm/xilinx-zynq/startup/linkcmds.in b/c/src/lib/libbsp/arm/xilinx-zynq/startup/linkcmds.in
index 7239f0d..7fd6e27 100644
--- a/c/src/lib/libbsp/arm/xilinx-zynq/startup/linkcmds.in
+++ b/c/src/lib/libbsp/arm/xilinx-zynq/startup/linkcmds.in
@@ -2,7 +2,8 @@ MEMORY {
RAM_INT_0 : ORIGIN = @ZYNQ_RAM_INT_0_ORIGIN@, LENGTH = @ZYNQ_RAM_INT_0_LENGTH@
RAM_INT_1 : ORIGIN = @ZYNQ_RAM_INT_1_ORIGIN@, LENGTH = @ZYNQ_RAM_INT_1_LENGTH@
RAM_MMU : ORIGIN = @ZYNQ_RAM_MMU@, LENGTH = @ZYNQ_RAM_MMU_LENGTH@
- RAM : ORIGIN = @ZYNQ_RAM_ORIGIN_AVAILABLE@, LENGTH = @ZYNQ_RAM_LENGTH_AVAILABLE@
+ RAM : ORIGIN = @ZYNQ_RAM_ORIGIN_AVAILABLE@, LENGTH = @ZYNQ_RAM_LENGTH_AVAILABLE@ - @ZYNQ_RAM_NOCACHE_LENGTH@
+ NOCACHE : ORIGIN = @ZYNQ_RAM_ORIGIN_AVAILABLE@ + @ZYNQ_RAM_LENGTH_AVAILABLE@ - @ZYNQ_RAM_NOCACHE_LENGTH@, LENGTH = @ZYNQ_RAM_NOCACHE_LENGTH@
}
bsp_processor_count = DEFINED (bsp_processor_count) ? bsp_processor_count : @ZYNQ_CPUS@;
@@ -22,6 +23,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", NOCACHE);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", NOCACHE);
bsp_stack_irq_size = DEFINED (bsp_stack_irq_size) ? bsp_stack_irq_size : 4096;
bsp_stack_abt_size = DEFINED (bsp_stack_abt_size) ? bsp_stack_abt_size : 1024;
--
1.8.4.5
More information about the devel
mailing list