forked from Imagelibrary/rtems
2008-09-15 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, startup/bspstart.c: Use shared bsp_get_work_area() in its own file and rely on BSP Framework to perform more initialization. * startup/bspgetworkarea.c: New file.
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
2008-09-15 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
|
* Makefile.am, startup/bspstart.c: Use shared bsp_get_work_area() in
|
||||||
|
its own file and rely on BSP Framework to perform more
|
||||||
|
initialization.
|
||||||
|
* startup/bspgetworkarea.c: New file.
|
||||||
|
|
||||||
2008-09-12 Joel Sherrill <joel.sherrill@OARcorp.com>
|
2008-09-12 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||||
|
|
||||||
* network_5200/network.c: Remove use of boolean.
|
* network_5200/network.c: Remove use of boolean.
|
||||||
|
|||||||
@@ -98,12 +98,14 @@ startup_SOURCES = ../../shared/bootcard.c \
|
|||||||
../../shared/bsplibc.c \
|
../../shared/bsplibc.c \
|
||||||
../../shared/bsppost.c \
|
../../shared/bsppost.c \
|
||||||
../../shared/bsppretaskinghook.c \
|
../../shared/bsppretaskinghook.c \
|
||||||
|
../../shared/bsppredriverhook.c \
|
||||||
../../shared/gnatinstallhandler.c \
|
../../shared/gnatinstallhandler.c \
|
||||||
../../shared/sbrk.c \
|
../../shared/sbrk.c \
|
||||||
../shared/showbats.c \
|
../shared/showbats.c \
|
||||||
../shared/uboot_dump_bdinfo.c \
|
../shared/uboot_dump_bdinfo.c \
|
||||||
../shared/uboot_getenv.c \
|
../shared/uboot_getenv.c \
|
||||||
startup/bspclean.c \
|
startup/bspclean.c \
|
||||||
|
startup/bspgetworkarea.c \
|
||||||
startup/bspstart.c \
|
startup/bspstart.c \
|
||||||
startup/cpuinit.c \
|
startup/cpuinit.c \
|
||||||
startup/uboot_support.c
|
startup/uboot_support.c
|
||||||
|
|||||||
42
c/src/lib/libbsp/powerpc/gen5200/startup/bspgetworkarea.c
Normal file
42
c/src/lib/libbsp/powerpc/gen5200/startup/bspgetworkarea.c
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
/*
|
||||||
|
* The license and distribution terms for this file may be
|
||||||
|
* found in the file LICENSE in this distribution or at
|
||||||
|
* http://www.rtems.com/license/LICENSE.
|
||||||
|
*
|
||||||
|
* $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <bsp.h>
|
||||||
|
#include <bsp/bootcard.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#if defined(HAS_UBOOT)
|
||||||
|
extern bd_t *uboot_bdinfo_ptr;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This method returns the base address and size of the area which
|
||||||
|
* is to be allocated between the RTEMS Workspace and the C Program
|
||||||
|
* Heap.
|
||||||
|
*/
|
||||||
|
|
||||||
|
void bsp_get_work_area(
|
||||||
|
void **work_area_start,
|
||||||
|
size_t *work_area_size,
|
||||||
|
void **heap_start,
|
||||||
|
size_t *heap_size
|
||||||
|
)
|
||||||
|
{
|
||||||
|
#ifdef HAS_UBOOT
|
||||||
|
char *ram_end = (char *) uboot_bdinfo_ptr->bi_memstart +
|
||||||
|
uboot_bdinfo_ptr->bi_memsize;
|
||||||
|
#else /* HAS_UBOOT */
|
||||||
|
char *ram_end = bsp_ram_end;
|
||||||
|
#endif /* HAS_UBOOT */
|
||||||
|
|
||||||
|
*work_area_start = bsp_work_area_start;
|
||||||
|
*work_area_size = ram_end - bsp_work_area_start;
|
||||||
|
*heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA;
|
||||||
|
*heap_size = BSP_BOOTCARD_HEAP_SIZE_DEFAULT;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -122,63 +122,15 @@ bd_t uboot_bdinfo_copy; /* will be overwritten with copy of bdinfo *
|
|||||||
uint32_t bsp_clicks_per_usec;
|
uint32_t bsp_clicks_per_usec;
|
||||||
|
|
||||||
void BSP_panic(char *s)
|
void BSP_panic(char *s)
|
||||||
{
|
{
|
||||||
printk("%s PANIC %s\n",_RTEMS_version, s);
|
printk("%s PANIC %s\n",_RTEMS_version, s);
|
||||||
__asm__ __volatile ("sc");
|
__asm__ __volatile ("sc");
|
||||||
}
|
|
||||||
|
|
||||||
void _BSP_Fatal_error(unsigned int v)
|
|
||||||
{
|
|
||||||
printk("%s PANIC ERROR %x\n",_RTEMS_version, v);
|
|
||||||
__asm__ __volatile ("sc");
|
|
||||||
}
|
|
||||||
|
|
||||||
void bsp_get_work_area(
|
|
||||||
void **work_area_start,
|
|
||||||
size_t *work_area_size,
|
|
||||||
void **heap_start,
|
|
||||||
size_t *heap_size)
|
|
||||||
{
|
|
||||||
#ifdef HAS_UBOOT
|
|
||||||
char *ram_end = (char *) uboot_bdinfo_ptr->bi_memstart +
|
|
||||||
uboot_bdinfo_ptr->bi_memsize;
|
|
||||||
#else /* HAS_UBOOT */
|
|
||||||
char *ram_end = bsp_ram_end;
|
|
||||||
#endif /* HAS_UBOOT */
|
|
||||||
|
|
||||||
*work_area_start = bsp_work_area_start;
|
|
||||||
*work_area_size = ram_end - bsp_work_area_start;
|
|
||||||
*heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA;
|
|
||||||
*heap_size = BSP_BOOTCARD_HEAP_SIZE_DEFAULT;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void bsp_predriver_hook(void)
|
void _BSP_Fatal_error(unsigned int v)
|
||||||
{
|
{
|
||||||
#if 0
|
printk("%s PANIC ERROR %x\n",_RTEMS_version, v);
|
||||||
init_RTC();
|
__asm__ __volatile ("sc");
|
||||||
|
|
||||||
init_PCI();
|
|
||||||
initialize_universe();
|
|
||||||
initialize_PCI_bridge ();
|
|
||||||
|
|
||||||
#if (HAS_PMC_PSC8)
|
|
||||||
initialize_PMC();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Initialize Bsp General purpose vector table.
|
|
||||||
*/
|
|
||||||
initialize_external_exception_vector();
|
|
||||||
|
|
||||||
#if (0)
|
|
||||||
/*
|
|
||||||
* XXX - Modify this to write a 48000000 (loop to self) command
|
|
||||||
* to each interrupt location. This is better for debug.
|
|
||||||
*/
|
|
||||||
bsp_spurious_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void bsp_start(void)
|
void bsp_start(void)
|
||||||
|
|||||||
Reference in New Issue
Block a user