Changeset 7a2125c in rtems


Ignore:
Timestamp:
Sep 19, 2008, 8:41:36 PM (11 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
1a3db548
Parents:
af2eb77
Message:

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

  • shared/start/start.S, shared/startup/bspgetworkarea.c, shared/startup/bspstart.c, shared/startup/linkcmds: Modifications which reflect those tested on psim. Hopefully they work on all boards. The initialization stack is explicitly declared in the linkcmds memory layout rather than magic math.
Location:
c/src/lib/libbsp/powerpc
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/ChangeLog

    raf2eb77 r7a2125c  
     12008-09-19      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * shared/start/start.S, shared/startup/bspgetworkarea.c,
     4        shared/startup/bspstart.c, shared/startup/linkcmds: Modifications
     5        which reflect those tested on psim. Hopefully they work on all
     6        boards. The initialization stack is explicitly declared in the
     7        linkcmds memory layout rather than magic math.
     8
    192008-09-16      Joel Sherrill <joel.sherrill@oarcorp.com>
    210
  • c/src/lib/libbsp/powerpc/shared/start/start.S

    raf2eb77 r7a2125c  
    106106         * stack = &__rtems_end + 4096
    107107         */
    108         addis   r9,r0, __rtems_end+(4096-PPC_MINIMUM_STACK_FRAME_SIZE)@ha
    109         addi    r9,r9, __rtems_end+(4096-PPC_MINIMUM_STACK_FRAME_SIZE)@l
     108        addis   r9,r0, __stack-PPC_MINIMUM_STACK_FRAME_SIZE@ha
     109        addi    r9,r9, __stack-PPC_MINIMUM_STACK_FRAME_SIZE@l
    110110        mr      r1, r9
    111111        /*
  • c/src/lib/libbsp/powerpc/shared/startup/bspgetworkarea.c

    raf2eb77 r7a2125c  
    3030  uintptr_t spared;
    3131
    32   reserve  = (uintptr_t)BSP_INIT_STACK_SIZE;
    33   reserve += rtems_configuration_get_interrupt_stack_size();
    34   size     = (uintptr_t)BSP_mem_size - (uintptr_t)&__rtems_end + reserve;
     32  reserve  = rtems_configuration_get_interrupt_stack_size();
     33  size     = (uintptr_t)BSP_mem_size - (uintptr_t)&__rtems_end - reserve;
    3534
    36   *work_area_start = (void *)(&__rtems_end + reserve);
     35  *work_area_start = (void *)((uintptr_t) &__rtems_end + reserve);
    3736  *work_area_size  = size;
    3837  spared = _bsp_sbrk_init( *work_area_start, work_area_size );
    3938  *heap_start      = BSP_BOOTCARD_HEAP_USES_WORK_AREA;
    4039  *heap_size       = BSP_BOOTCARD_HEAP_SIZE_DEFAULT;
     40
     41  /*
     42   *  The following may be helpful in debugging what goes wrong when
     43   *  you are allocating the Work Area in a new BSP.
     44   */
     45  #if 0
     46    printk( "Work Area Base %d %x\n", *work_area_start, *work_area_start );
     47    printk( "Work Area Size %d %x\n", *work_area_size, *work_area_size );
     48    printk( "Work Area End %d %x\n",
     49      *work_area_start + size, *work_area_start + size );
     50  #endif
    4151}
    4252
  • c/src/lib/libbsp/powerpc/shared/startup/bspstart.c

    raf2eb77 r7a2125c  
    8888 */
    8989unsigned int BSP_time_base_divisor;
    90 /*
    91  * system init stack
    92  */
    93 #define INIT_STACK_SIZE 0x1000
    9490
    9591void BSP_panic(char *s)
     
    144140void bsp_start( void )
    145141{
    146   unsigned char *stack;
    147142#if !defined(mvme2100)
    148143  unsigned l2cr;
     
    213208
    214209  /*
    215    * the initial stack  has aready been set to this value in start.S
    216    * so there is no need to set it in r1 again... It is just for info
    217    * so that It can be printed without accessing R1.
    218    */
    219   stack = ((unsigned char*) __rtems_end) +
    220                INIT_STACK_SIZE - PPC_MINIMUM_STACK_FRAME_SIZE;
    221 
    222   /* tag the bottom (T. Straumann 6/36/2001 <strauman@slac.stanford.edu>) */
    223   *((uint32_t*)stack) = 0;
    224 
    225   /*
    226210   * Initialize the interrupt related settings.
    227211   */
    228   intrStackStart = (uint32_t) __rtems_end + INIT_STACK_SIZE;
     212  intrStackStart = (uint32_t) __rtems_end;
    229213  intrStackSize = rtems_configuration_get_interrupt_stack_size();
    230214
  • c/src/lib/libbsp/powerpc/shared/startup/linkcmds

    raf2eb77 r7a2125c  
    225225  } > CODE
    226226  . = ALIGN(16);
     227  . += 0x1000;
     228  __stack = .;
    227229  _end = . ;
    228230  __rtems_end = . ;
Note: See TracChangeset for help on using the changeset viewer.