Changeset f2e9d0d in rtems
- Timestamp:
- 05/06/13 07:59:16 (9 years ago)
- Branches:
- 4.11, 5, master
- Children:
- 33c98fd
- Parents:
- 86b79fb
- git-author:
- Sebastian Huber <sebastian.huber@…> (05/06/13 07:59:16)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (05/06/13 13:06:52)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/libbsp/arm/raspberrypi/startup/bspstarthooks.c
r86b79fb rf2e9d0d 22 22 */ 23 23 24 #include <stdbool.h>25 26 24 #include <bspopts.h> 27 25 #include <bsp/start.h> 28 26 #include <bsp/raspberrypi.h> 29 27 #include <bsp/mmu.h> 30 #include <bsp/linker-symbols.h>31 #include <bsp/uart-output-char.h>32 33 static void BSP_START_TEXT_SECTION clear_bss(void)34 {35 const int *end = (const int *) bsp_section_bss_end;36 int *out = (int *) bsp_section_bss_begin;37 38 /* Clear BSS */39 while (out != end) {40 *out = 0;41 ++out;42 }43 }44 28 45 29 static void BSP_START_TEXT_SECTION raspberrypi_cache_setup(void) … … 68 52 void BSP_START_TEXT_SECTION bsp_start_hook_1(void) 69 53 { 70 71 /* Copy .text section */ 72 arm_cp15_instruction_cache_invalidate(); 73 bsp_start_memcpy( 74 (int *) bsp_section_text_begin, 75 (const int *) bsp_section_text_load_begin, 76 (size_t) bsp_section_text_size 77 ); 78 79 /* Copy .rodata section */ 80 arm_cp15_instruction_cache_invalidate(); 81 bsp_start_memcpy( 82 (int *) bsp_section_rodata_begin, 83 (const int *) bsp_section_rodata_load_begin, 84 (size_t) bsp_section_rodata_size 85 ); 86 87 /* Copy .data section */ 88 arm_cp15_instruction_cache_invalidate(); 89 bsp_start_memcpy( 90 (int *) bsp_section_data_begin, 91 (const int *) bsp_section_data_load_begin, 92 (size_t) bsp_section_data_size 93 ); 94 95 /* Copy .fast_text section */ 96 arm_cp15_instruction_cache_invalidate(); 97 bsp_start_memcpy( 98 (int *) bsp_section_fast_text_begin, 99 (const int *) bsp_section_fast_text_load_begin, 100 (size_t) bsp_section_fast_text_size 101 ); 102 103 /* Copy .fast_data section */ 104 arm_cp15_instruction_cache_invalidate(); 105 bsp_start_memcpy( 106 (int *) bsp_section_fast_data_begin, 107 (const int *) bsp_section_fast_data_load_begin, 108 (size_t) bsp_section_fast_data_size 109 ); 110 111 /* Clear .bss section */ 112 clear_bss(); 113 54 bsp_start_copy_sections(); 55 bsp_start_clear_bss(); 114 56 }
Note: See TracChangeset
for help on using the changeset viewer.