Changeset b0443736 in rtems


Ignore:
Timestamp:
Mar 16, 2016, 9:29:48 AM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
59461e5
Parents:
4bf79af
git-author:
Sebastian Huber <sebastian.huber@…> (03/16/16 09:29:48)
git-committer:
Sebastian Huber <sebastian.huber@…> (03/16/16 12:35:26)
Message:

bsp/mpc55xx: Fix BSS initialization

Location:
c/src/lib/libbsp/powerpc/mpc55xxevb/startup
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/mpc55xxevb/startup/bspstart.c

    r4bf79af rb0443736  
    8181
    8282        /*
    83          * make sure BSS/SBSS is cleared
    84          */
    85         memset(&bsp_section_bss_begin [0], 0, (size_t) bsp_section_bss_size);
    86 
    87         /*
    8883         * Get CPU identification dynamically. Note that the get_ppc_cpu_type()
    8984         * function store the result in global variables so that it can be used
  • c/src/lib/libbsp/powerpc/mpc55xxevb/startup/start-early.c

    r4bf79af rb0443736  
    171171}
    172172
     173#ifdef MPC55XX_NEEDS_LOW_LEVEL_INIT
     174static BSP_START_TEXT_SECTION bool
     175mpc55xx_start_is_in_internal_ram(const void *addr)
     176{
     177  return (size_t) addr - (size_t) bsp_ram_start < (size_t) bsp_ram_size;
     178}
     179#endif
     180
     181static BSP_START_TEXT_SECTION void mpc55xx_start_clear_bss(void)
     182{
     183  #ifdef MPC55XX_NEEDS_LOW_LEVEL_INIT
     184    if (!mpc55xx_start_is_in_internal_ram(bsp_section_sbss_begin)) {
     185      bsp_start_zero(
     186        bsp_section_sbss_begin,
     187        (size_t) bsp_section_sbss_size
     188      );
     189    }
     190
     191    if (!mpc55xx_start_is_in_internal_ram(bsp_section_bss_begin)) {
     192      bsp_start_zero(
     193        bsp_section_bss_begin,
     194        (size_t) bsp_section_bss_size
     195      );
     196    }
     197  #endif
     198}
     199
    173200BSP_START_TEXT_SECTION void mpc55xx_start_early(void)
    174201{
     
    186213  mpc55xx_start_ebi_chip_select();
    187214  mpc55xx_start_ebi();
    188 }
     215  mpc55xx_start_clear_bss();
     216}
Note: See TracChangeset for help on using the changeset viewer.