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/bspstart.c

    rf1359069 rdb77b92  
    2323
    2424#include <bsp.h>
    25 #include <rtems/libio.h>
    26 #include <rtems/libcsupport.h>
    2725#include <rtems/bspIo.h>
    2826#include <bsp/consoleIo.h>
     
    7775 */
    7876unsigned int BSP_mem_size;
    79 /*
    80  * Where the heap starts; is used by bsp_pretasking_hook;
    81  */
    82 unsigned int BSP_heap_start;
     77
    8378/*
    8479 * PCI Bus Frequency
     
    114109 */
    115110
    116 void bsp_libc_init( void *, uint32_t, int );
    117 
    118 void save_boot_params(RESIDUAL* r3, void *r4, void* r5, char *additional_boot_options)
     111void save_boot_params(
     112  RESIDUAL *r3,
     113  void     *r4,
     114  void     *r5,
     115  char     *additional_boot_options
     116)
    119117{
    120118
     
    152150  uint32_t intrStackStart;
    153151  uint32_t intrStackSize;
    154   unsigned char *work_space_start;
    155152  ppc_cpu_id_t myCpu;
    156153  ppc_cpu_revision_t myCpuRevision;
     
    231228  intrStackStart = (uint32_t) __rtems_end + INIT_STACK_SIZE;
    232229  intrStackSize = rtems_configuration_get_interrupt_stack_size();
    233   BSP_heap_start = intrStackStart + intrStackSize;
    234230
    235231  /*
     
    359355  bsp_clicks_per_usec    = BSP_bus_frequency/(BSP_time_base_divisor * 1000);
    360356
    361 #ifdef SHOW_MORE_INIT_SETTINGS
    362   printk("rtems_configuration_get_work_space_size() = %x\n",
    363           rtems_configuration_get_work_space_size());
    364 #endif
    365 
    366   work_space_start =
    367     (unsigned char *)BSP_mem_size - rtems_configuration_get_work_space_size();
    368 
    369   if ( work_space_start <= ((unsigned char *)__rtems_end) + INIT_STACK_SIZE +
    370         rtems_configuration_get_interrupt_stack_size()) {
    371     printk( "bspstart: Not enough RAM!!!\n" );
    372     bsp_cleanup();
    373   }
    374 
    375   Configuration.work_space_start = work_space_start;
    376 
    377357  /*
    378358   * Initalize RTEMS IRQ system
Note: See TracChangeset for help on using the changeset viewer.