diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-05-06 09:59:16 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-05-06 15:06:52 +0200 |
commit | f2e9d0df8ab6d3aa1d64cc41a053e05998dbcd7a (patch) | |
tree | 0133c41d70d0b00b03134932971b8d3cf58a600d /c | |
parent | bsp/lm3s69xx: Fix initialization value (diff) | |
download | rtems-f2e9d0df8ab6d3aa1d64cc41a053e05998dbcd7a.tar.bz2 |
bsp/raspberrypi: Use shared start code
Diffstat (limited to 'c')
-rw-r--r-- | c/src/lib/libbsp/arm/raspberrypi/startup/bspstarthooks.c | 62 |
1 files changed, 2 insertions, 60 deletions
diff --git a/c/src/lib/libbsp/arm/raspberrypi/startup/bspstarthooks.c b/c/src/lib/libbsp/arm/raspberrypi/startup/bspstarthooks.c index 1d2591f6d5..a2241687cc 100644 --- a/c/src/lib/libbsp/arm/raspberrypi/startup/bspstarthooks.c +++ b/c/src/lib/libbsp/arm/raspberrypi/startup/bspstarthooks.c @@ -21,26 +21,10 @@ * http://www.rtems.com/license/LICENSE */ -#include <stdbool.h> - #include <bspopts.h> #include <bsp/start.h> #include <bsp/raspberrypi.h> #include <bsp/mmu.h> -#include <bsp/linker-symbols.h> -#include <bsp/uart-output-char.h> - -static void BSP_START_TEXT_SECTION clear_bss(void) -{ - const int *end = (const int *) bsp_section_bss_end; - int *out = (int *) bsp_section_bss_begin; - - /* Clear BSS */ - while (out != end) { - *out = 0; - ++out; - } -} static void BSP_START_TEXT_SECTION raspberrypi_cache_setup(void) { @@ -67,48 +51,6 @@ void BSP_START_TEXT_SECTION bsp_start_hook_0(void) void BSP_START_TEXT_SECTION bsp_start_hook_1(void) { - - /* Copy .text section */ - arm_cp15_instruction_cache_invalidate(); - bsp_start_memcpy( - (int *) bsp_section_text_begin, - (const int *) bsp_section_text_load_begin, - (size_t) bsp_section_text_size - ); - - /* Copy .rodata section */ - arm_cp15_instruction_cache_invalidate(); - bsp_start_memcpy( - (int *) bsp_section_rodata_begin, - (const int *) bsp_section_rodata_load_begin, - (size_t) bsp_section_rodata_size - ); - - /* Copy .data section */ - arm_cp15_instruction_cache_invalidate(); - bsp_start_memcpy( - (int *) bsp_section_data_begin, - (const int *) bsp_section_data_load_begin, - (size_t) bsp_section_data_size - ); - - /* Copy .fast_text section */ - arm_cp15_instruction_cache_invalidate(); - bsp_start_memcpy( - (int *) bsp_section_fast_text_begin, - (const int *) bsp_section_fast_text_load_begin, - (size_t) bsp_section_fast_text_size - ); - - /* Copy .fast_data section */ - arm_cp15_instruction_cache_invalidate(); - bsp_start_memcpy( - (int *) bsp_section_fast_data_begin, - (const int *) bsp_section_fast_data_load_begin, - (size_t) bsp_section_fast_data_size - ); - - /* Clear .bss section */ - clear_bss(); - + bsp_start_copy_sections(); + bsp_start_clear_bss(); } |