Changeset e76068d in rtems


Ignore:
Timestamp:
Sep 16, 2008, 7:06:45 PM (11 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
dcc905b
Parents:
a196084
Message:

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

  • Makefile.am, startup/bspstart.c: Add use of bsp_get_work_area() in its own file and rely on BSP Framework to perform more initialization. Remove unnecessary includes of rtems/libio.h and rtems/libcsupport.h.
  • startup/bspgetworkarea.c: New file.
Location:
c/src/lib/libbsp/powerpc
Files:
3 added
9 edited

Legend:

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

    ra196084 re76068d  
     12008-09-16      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * Makefile.am, startup/bspstart.c: Add use of bsp_get_work_area() in
     4        its own file and rely on BSP Framework to perform more
     5        initialization. Remove unnecessary includes of rtems/libio.h and
     6        rtems/libcsupport.h.
     7        * startup/bspgetworkarea.c: New file.
     8
    192008-09-10      Joel Sherrill <joel.sherrill@oarcorp.com>
    210
  • c/src/lib/libbsp/powerpc/gen83xx/Makefile.am

    ra196084 re76068d  
    5555        startup/bspstart.c \
    5656        startup/bspclean.c \
     57        startup/bspgetworkarea.c \
    5758        startup/uboot_support.c \
    5859        ../shared/uboot_getenv.c
  • c/src/lib/libbsp/powerpc/gen83xx/startup/bspstart.c

    ra196084 re76068d  
    2020 * $Id$
    2121 */
    22 
    23 #include <string.h>
    24 
    25 #include <rtems/libio.h>
    26 #include <rtems/libcsupport.h>
    27 #include <rtems/score/thread.h>
    2822
    2923#include <libcpu/powerpc-utility.h>
     
    8680    /* Do nothing */
    8781  }
    88 }
    89 
    90 void bsp_get_work_area(
    91   void   **work_area_start,
    92   size_t  *work_area_size,
    93   void   **heap_start,
    94   size_t  *heap_size)
    95 {
    96 #ifdef HAS_UBOOT
    97   char *ram_end = (char *) mpc83xx_uboot_board_info.bi_memstart +
    98                                  mpc83xx_uboot_board_info.bi_memsize;
    99 #else /* HAS_UBOOT */
    100   char *ram_end = bsp_ram_end;
    101 #endif /* HAS_UBOOT */
    102 
    103   *work_area_start = bsp_work_area_start;
    104   *work_area_size = ram_end - bsp_work_area_start;
    105   *heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA;
    106   *heap_size = BSP_BOOTCARD_HEAP_SIZE_DEFAULT;
    10782}
    10883
  • c/src/lib/libbsp/powerpc/mpc55xxevb/ChangeLog

    ra196084 re76068d  
     12008-09-16      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * Makefile.am, startup/bspstart.c: Add use of bsp_get_work_area() in
     4        its own file and rely on BSP Framework to perform more
     5        initialization. Remove unnecessary includes of rtems/libio.h and
     6        rtems/libcsupport.h.
     7        * startup/bspgetworkarea.c: New file.
     8
    192008-09-10      Joel Sherrill <joel.sherrill@oarcorp.com>
    210
  • c/src/lib/libbsp/powerpc/mpc55xxevb/Makefile.am

    ra196084 re76068d  
    4343startup_SOURCES = ../../shared/bsplibc.c ../../shared/bsppost.c \
    4444    ../../shared/bootcard.c ../shared/src/tictac.c ../../shared/bspclean.c \
    45     startup/bspstart.c ../../shared/bsppretaskinghook.c
     45    startup/bspstart.c startup/bspgetworkarea.c ../../shared/bsppretaskinghook.c
    4646
    4747clock_SOURCES = ../shared/clock/clock.c
  • c/src/lib/libbsp/powerpc/mpc55xxevb/startup/bspstart.c

    ra196084 re76068d  
    2424
    2525#include <rtems.h>
    26 #include <rtems/bspIo.h>
    27 #include <rtems/libcsupport.h>
    2826
    2927#include <libcpu/powerpc-utility.h>
     
    4442
    4543/* Symbols defined in linker command file */
    46 LINKER_SYMBOL( bsp_ram_start);
    47 LINKER_SYMBOL( bsp_ram_end);
    48 LINKER_SYMBOL( bsp_external_ram_start);
    49 LINKER_SYMBOL( bsp_external_ram_size);
    50 LINKER_SYMBOL( bsp_section_bss_end);
     44LINKER_SYMBOL(bsp_ram_start);
     45LINKER_SYMBOL(bsp_ram_end);
     46LINKER_SYMBOL(bsp_external_ram_start);
     47LINKER_SYMBOL(bsp_external_ram_size);
     48LINKER_SYMBOL(bsp_section_bss_end);
    5149
    5250unsigned int bsp_clock_speed = 0;
     
    7876                /* Do nothing */
    7977        }
    80 }
    81 
    82 void bsp_get_work_area( void **work_area_start, size_t *work_area_size, void **heap_start, size_t *heap_size)
    83 {
    84         *work_area_start = bsp_section_bss_end;
    85         *work_area_size = bsp_ram_end - 2 * MPC55XX_INTERRUPT_STACK_SIZE - bsp_section_bss_end;
    86         *heap_start = bsp_external_ram_start;
    87         *heap_size = (size_t) bsp_external_ram_size;
    8878}
    8979
     
    194184        /* Initialize exceptions */
    195185        DEBUG_PRINT( "Initialize exceptions ...\n");
    196         ppc_exc_initialize( PPC_INTERRUPT_DISABLE_MASK_DEFAULT, interrupt_stack_start, interrupt_stack_size);
     186        ppc_exc_initialize(
     187          PPC_INTERRUPT_DISABLE_MASK_DEFAULT,
     188          interrupt_stack_start,
     189          interrupt_stack_size
     190        );
    197191        DEBUG_DONE();
    198192
  • c/src/lib/libbsp/powerpc/psim/ChangeLog

    ra196084 re76068d  
     12008-09-16      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * Makefile.am, startup/bspstart.c: Add use of bsp_get_work_area() in
     4        its own file and rely on BSP Framework to perform more
     5        initialization. Remove unnecessary includes of rtems/libio.h and
     6        rtems/libcsupport.h.
     7        * startup/bspgetworkarea.c: New file.
     8
    192008-09-10      Joel Sherrill <joel.sherrill@oarcorp.com>
    210
  • c/src/lib/libbsp/powerpc/psim/Makefile.am

    ra196084 re76068d  
    4343startup_SOURCES = startup/bspclean.c ../../shared/bsplibc.c \
    4444    ../../shared/bsppost.c ../../shared/bsppretaskinghook.c \
    45     ../../shared/bsppredriverhook.c startup/bspstart.c ../../shared/bootcard.c \
     45    ../../shared/bsppredriverhook.c startup/bspstart.c \
     46    startup/bspgetworkarea.c ../../shared/bootcard.c \
    4647    ../../shared/sbrk.c ../../shared/gnatinstallhandler.c \
    4748    startup/psim_registers.c
  • c/src/lib/libbsp/powerpc/psim/startup/bspstart.c

    ra196084 re76068d  
    2020#include <bsp/irq.h>
    2121#include <bsp/bootcard.h>
    22 #include <rtems/libio.h>
    23 #include <rtems/libcsupport.h>
    2422#include <rtems/bspIo.h>
    2523#include <rtems/powerpc/powerpc.h>
     
    6563  printk("%s PANIC ERROR %x\n",_RTEMS_version, v);
    6664  __asm__ __volatile ("sc");
    67 }
    68 
    69 /*
    70  *  This method returns the base address and size of the area which
    71  *  is to be allocated between the RTEMS Workspace and the C Program
    72  *  Heap.
    73  */
    74 void bsp_get_work_area(
    75   void   **work_area_start,
    76   size_t  *work_area_size,
    77   void   **heap_start,
    78   size_t  *heap_size
    79 )
    80 {
    81   *work_area_start       = &end;
    82   *work_area_size       = (void *)&RAM_END - (void *)&end;
    83   *heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA;
    84   *heap_size = BSP_BOOTCARD_HEAP_SIZE_DEFAULT;
    8565}
    8666
Note: See TracChangeset for help on using the changeset viewer.