forked from Imagelibrary/rtems
bsps: Add .nocacheheap section
This avoids consumption of a loadable address space for the nocache heap.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2013-2014 embedded brains GmbH. All rights reserved.
|
* Copyright (c) 2013-2015 embedded brains GmbH. All rights reserved.
|
||||||
*
|
*
|
||||||
* embedded brains GmbH
|
* embedded brains GmbH
|
||||||
* Dornierstr. 4
|
* Dornierstr. 4
|
||||||
@@ -22,7 +22,7 @@ void bsp_start( void )
|
|||||||
a9mpcore_clock_initialize_early();
|
a9mpcore_clock_initialize_early();
|
||||||
bsp_interrupt_initialize();
|
bsp_interrupt_initialize();
|
||||||
rtems_cache_coherent_add_area(
|
rtems_cache_coherent_add_area(
|
||||||
bsp_nocache_heap_begin,
|
bsp_section_nocacheheap_begin,
|
||||||
(uintptr_t) bsp_nocache_heap_size
|
(uintptr_t) bsp_section_nocacheheap_size
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2008-2014 embedded brains GmbH. All rights reserved.
|
* Copyright (c) 2008-2015 embedded brains GmbH. All rights reserved.
|
||||||
*
|
*
|
||||||
* embedded brains GmbH
|
* embedded brains GmbH
|
||||||
* Dornierstr. 4
|
* Dornierstr. 4
|
||||||
@@ -119,6 +119,10 @@ LINKER_SYMBOL(bsp_section_nocache_size)
|
|||||||
LINKER_SYMBOL(bsp_section_nocache_load_begin)
|
LINKER_SYMBOL(bsp_section_nocache_load_begin)
|
||||||
LINKER_SYMBOL(bsp_section_nocache_load_end)
|
LINKER_SYMBOL(bsp_section_nocache_load_end)
|
||||||
|
|
||||||
|
LINKER_SYMBOL(bsp_section_nocacheheap_begin)
|
||||||
|
LINKER_SYMBOL(bsp_section_nocacheheap_end)
|
||||||
|
LINKER_SYMBOL(bsp_section_nocacheheap_size)
|
||||||
|
|
||||||
LINKER_SYMBOL(bsp_vector_table_begin)
|
LINKER_SYMBOL(bsp_vector_table_begin)
|
||||||
LINKER_SYMBOL(bsp_vector_table_end)
|
LINKER_SYMBOL(bsp_vector_table_end)
|
||||||
LINKER_SYMBOL(bsp_vector_table_size)
|
LINKER_SYMBOL(bsp_vector_table_size)
|
||||||
@@ -130,10 +134,6 @@ LINKER_SYMBOL(bsp_start_vector_table_size)
|
|||||||
LINKER_SYMBOL(bsp_translation_table_base)
|
LINKER_SYMBOL(bsp_translation_table_base)
|
||||||
LINKER_SYMBOL(bsp_translation_table_end)
|
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_TEXT_SECTION __attribute__((section(".bsp_fast_text")))
|
||||||
|
|
||||||
#define BSP_FAST_DATA_SECTION __attribute__((section(".bsp_fast_data")))
|
#define BSP_FAST_DATA_SECTION __attribute__((section(".bsp_fast_data")))
|
||||||
|
|||||||
@@ -7,10 +7,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2008-2014 embedded brains GmbH. All rights reserved.
|
* Copyright (c) 2008-2015 embedded brains GmbH. All rights reserved.
|
||||||
*
|
*
|
||||||
* embedded brains GmbH
|
* embedded brains GmbH
|
||||||
* Obere Lagerstr. 30
|
* Dornierstr. 4
|
||||||
* 82178 Puchheim
|
* 82178 Puchheim
|
||||||
* Germany
|
* Germany
|
||||||
* <rtems@embedded-brains.de>
|
* <rtems@embedded-brains.de>
|
||||||
@@ -400,16 +400,19 @@ SECTIONS {
|
|||||||
.nocache : ALIGN_WITH_INPUT {
|
.nocache : ALIGN_WITH_INPUT {
|
||||||
bsp_section_nocache_begin = .;
|
bsp_section_nocache_begin = .;
|
||||||
*(SORT(.bsp_nocache*))
|
*(SORT(.bsp_nocache*))
|
||||||
bsp_nocache_heap_begin = .;
|
|
||||||
. += ORIGIN (REGION_NOCACHE) + LENGTH (REGION_NOCACHE) - ABSOLUTE (.);
|
|
||||||
bsp_nocache_heap_end = .;
|
|
||||||
bsp_section_nocache_end = .;
|
bsp_section_nocache_end = .;
|
||||||
} > REGION_NOCACHE AT > REGION_NOCACHE_LOAD
|
} > 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_size = bsp_section_nocache_end - bsp_section_nocache_begin;
|
||||||
bsp_section_nocache_load_begin = LOADADDR (.nocache);
|
bsp_section_nocache_load_begin = LOADADDR (.nocache);
|
||||||
bsp_section_nocache_load_end = bsp_section_nocache_load_begin + bsp_section_nocache_size;
|
bsp_section_nocache_load_end = bsp_section_nocache_load_begin + bsp_section_nocache_size;
|
||||||
|
|
||||||
|
.nocacheheap (NOLOAD) : ALIGN_WITH_INPUT {
|
||||||
|
bsp_section_nocacheheap_begin = .;
|
||||||
|
. += ORIGIN (REGION_NOCACHE) + LENGTH (REGION_NOCACHE) - ABSOLUTE (.);
|
||||||
|
bsp_section_nocacheheap_end = .;
|
||||||
|
} > REGION_NOCACHE AT > REGION_NOCACHE
|
||||||
|
bsp_section_nocacheheap_size = bsp_section_nocacheheap_end - bsp_section_nocacheheap_begin;
|
||||||
|
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
RamBase = ORIGIN (REGION_WORK);
|
RamBase = ORIGIN (REGION_WORK);
|
||||||
RamSize = LENGTH (REGION_WORK);
|
RamSize = LENGTH (REGION_WORK);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2013-2014 embedded brains GmbH. All rights reserved.
|
* Copyright (c) 2013-2015 embedded brains GmbH. All rights reserved.
|
||||||
*
|
*
|
||||||
* embedded brains GmbH
|
* embedded brains GmbH
|
||||||
* Dornierstr. 4
|
* Dornierstr. 4
|
||||||
@@ -28,7 +28,7 @@ void bsp_start(void)
|
|||||||
a9mpcore_clock_initialize_early();
|
a9mpcore_clock_initialize_early();
|
||||||
bsp_interrupt_initialize();
|
bsp_interrupt_initialize();
|
||||||
rtems_cache_coherent_add_area(
|
rtems_cache_coherent_add_area(
|
||||||
bsp_nocache_heap_begin,
|
bsp_section_nocacheheap_begin,
|
||||||
(uintptr_t) bsp_nocache_heap_size
|
(uintptr_t) bsp_section_nocacheheap_size
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,10 +7,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2010-2013 embedded brains GmbH. All rights reserved.
|
* Copyright (c) 2010-2015 embedded brains GmbH. All rights reserved.
|
||||||
*
|
*
|
||||||
* embedded brains GmbH
|
* embedded brains GmbH
|
||||||
* Donrierstr. 4
|
* Dornierstr. 4
|
||||||
* 82178 Puchheim
|
* 82178 Puchheim
|
||||||
* Germany
|
* Germany
|
||||||
* <rtems@embedded-brains.de>
|
* <rtems@embedded-brains.de>
|
||||||
@@ -99,6 +99,10 @@ LINKER_SYMBOL(bsp_section_nocache_size)
|
|||||||
LINKER_SYMBOL(bsp_section_nocache_load_begin)
|
LINKER_SYMBOL(bsp_section_nocache_load_begin)
|
||||||
LINKER_SYMBOL(bsp_section_nocache_load_end)
|
LINKER_SYMBOL(bsp_section_nocache_load_end)
|
||||||
|
|
||||||
|
LINKER_SYMBOL(bsp_section_nocacheheap_begin)
|
||||||
|
LINKER_SYMBOL(bsp_section_nocacheheap_end)
|
||||||
|
LINKER_SYMBOL(bsp_section_nocacheheap_size)
|
||||||
|
|
||||||
LINKER_SYMBOL(bsp_section_nvram_begin)
|
LINKER_SYMBOL(bsp_section_nvram_begin)
|
||||||
LINKER_SYMBOL(bsp_section_nvram_end)
|
LINKER_SYMBOL(bsp_section_nvram_end)
|
||||||
LINKER_SYMBOL(bsp_section_nvram_size)
|
LINKER_SYMBOL(bsp_section_nvram_size)
|
||||||
|
|||||||
@@ -7,10 +7,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2011-2013 embedded brains GmbH. All rights reserved.
|
* Copyright (c) 2011-2015 embedded brains GmbH. All rights reserved.
|
||||||
*
|
*
|
||||||
* embedded brains GmbH
|
* embedded brains GmbH
|
||||||
* Obere Lagerstr. 30
|
* Dornierstr. 4
|
||||||
* 82178 Puchheim
|
* 82178 Puchheim
|
||||||
* Germany
|
* Germany
|
||||||
* <rtems@embedded-brains.de>
|
* <rtems@embedded-brains.de>
|
||||||
@@ -342,11 +342,18 @@ SECTIONS {
|
|||||||
bsp_section_nocache_load_begin = LOADADDR (.nocache);
|
bsp_section_nocache_load_begin = LOADADDR (.nocache);
|
||||||
bsp_section_nocache_load_end = bsp_section_nocache_load_begin + bsp_section_nocache_size;
|
bsp_section_nocache_load_end = bsp_section_nocache_load_begin + bsp_section_nocache_size;
|
||||||
|
|
||||||
|
.nocacheheap (NOLOAD) : ALIGN_WITH_INPUT {
|
||||||
|
bsp_section_nocacheheap_begin = .;
|
||||||
|
. += ORIGIN (REGION_NOCACHE) + LENGTH (REGION_NOCACHE) - ABSOLUTE (.);
|
||||||
|
bsp_section_nocacheheap_end = .;
|
||||||
|
} > REGION_NOCACHE AT > REGION_NOCACHE
|
||||||
|
bsp_section_nocacheheap_size = bsp_section_nocacheheap_end - bsp_section_nocacheheap_begin;
|
||||||
|
|
||||||
.nvram (NOLOAD) : ALIGN_WITH_INPUT {
|
.nvram (NOLOAD) : ALIGN_WITH_INPUT {
|
||||||
bsp_section_nvram_begin = .;
|
bsp_section_nvram_begin = .;
|
||||||
*(SORT(.bsp_nvram*))
|
*(SORT(.bsp_nvram*))
|
||||||
bsp_section_nvram_end = .;
|
bsp_section_nvram_end = .;
|
||||||
} > REGION_NVRAM
|
} > REGION_NVRAM AT > REGION_NVRAM
|
||||||
bsp_section_nvram_size = bsp_section_nvram_end - bsp_section_nvram_begin;
|
bsp_section_nvram_size = bsp_section_nvram_end - bsp_section_nvram_begin;
|
||||||
|
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
|
|||||||
Reference in New Issue
Block a user