[rtems commit] bsp/raspberrypi: Use shared start code
Sebastian Huber
sebh at rtems.org
Mon May 6 13:38:02 UTC 2013
Module: rtems
Branch: master
Commit: f2e9d0df8ab6d3aa1d64cc41a053e05998dbcd7a
Changeset: http://git.rtems.org/rtems/commit/?id=f2e9d0df8ab6d3aa1d64cc41a053e05998dbcd7a
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Mon May 6 09:59:16 2013 +0200
bsp/raspberrypi: Use shared start code
---
.../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 1d2591f..a224168 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();
}
More information about the vc
mailing list