Ignore:
Timestamp:
Sep 15, 2008, 10:05:19 PM (11 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
c0e00eb7
Parents:
f1359069
Message:

2008-09-15 Joel Sherrill <joel.sherrill@…>

  • shared/startup/bspstart.c, shared/startup/pretaskinghook.c: Add use of bsp_get_work_area() in its own file and rely on BSP Framework to perform more initialization.
  • shared/startup/bspgetworkarea.c: New file.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/shared/startup/pretaskinghook.c

    rf1359069 rdb77b92  
    2929#include <rtems/malloc.h>
    3030
    31 void bsp_libc_init( void *, uint32_t, int );
    32 
    3331/*
    34  *  Function:   bsp_pretasking_hook
    35  *  Created:    95/03/10
     32 *  bsp_pretasking_hook
    3633 *
    3734 *  Description:
    3835 *      BSP pretasking hook.  Called just before drivers are initialized.
    39  *      Used to setup libc and install any BSP extensions.
    4036 *
    4137 *  NOTES:
     
    4743void bsp_pretasking_hook(void)
    4844{
    49   uint32_t        heap_size;
    50   uint32_t        heap_sbrk_spared;
    51   extern uint32_t _bsp_sbrk_init(uint32_t, uint32_t*);
    52 
    53   /* make sure it's properly aligned */
    54   BSP_heap_start = (BSP_heap_start + CPU_ALIGNMENT - 1) & ~(CPU_ALIGNMENT-1);
    55 
    56   heap_size = (BSP_mem_size - BSP_heap_start) - rtems_configuration_get_work_space_size();
    57   heap_sbrk_spared=_bsp_sbrk_init(BSP_heap_start, &heap_size);
    58 
    59 #ifdef SHOW_MORE_INIT_SETTINGS
    60   printk( "HEAP start %x  size %x (%x bytes spared for sbrk)\n",
    61              BSP_heap_start, heap_size, heap_sbrk_spared);
    62 #endif   
    63 
    64   /* Must install sbrk helpers since we rely on sbrk for giving
    65    * us even the first chunk of memory (bsp_libc_init(heap start==NULL))
    66    */
    67 
    68   rtems_malloc_sbrk_helpers = &rtems_malloc_sbrk_helpers_table;
    69 
    70   bsp_libc_init((void *) 0, heap_size, heap_sbrk_spared);
    71 
    7245  /* Note that VME support may be omitted also by
    7346   * providing a no-op  BSP_vme_config routine
Note: See TracChangeset for help on using the changeset viewer.