forked from Imagelibrary/rtems
2008-09-15 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac, include/bsp.h, include/bspopts.h.in, startup/bspstart.c: Add use of bsp_get_work_area() in its own file and rely on BSP Framework to perform more initialization.
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2008-09-15 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* Makefile.am, configure.ac, include/bsp.h, include/bspopts.h.in,
|
||||
startup/bspstart.c: Add use of bsp_get_work_area() in its own file
|
||||
and rely on BSP Framework to perform more initialization.
|
||||
|
||||
2008-09-10 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* startup/bspstart.c: Review of all bsp_cleanup() implementations. In
|
||||
|
||||
@@ -57,7 +57,7 @@ build_date.c::
|
||||
echo 'const char *BSP_build_date="'`date`'";' > $@
|
||||
|
||||
startup_SOURCES = startup/bspstart.c build_date.c \
|
||||
startup/misc.c \
|
||||
startup/misc.c ../../powerpc/shared/startup/bspgetworkarea.c \
|
||||
../../powerpc/shared/startup/pretaskinghook.c \
|
||||
../../powerpc/shared/startup/zerobss.c \
|
||||
../../powerpc/shared/startup/sbrk.c ../../shared/bootcard.c \
|
||||
|
||||
@@ -35,6 +35,8 @@ RTEMS_BSPOPTS_HELP([PPC_USE_DATA_CACHE],
|
||||
of PowerPC 603e revisions and emulator versions.
|
||||
The BSP actually contains the call that enables this.])
|
||||
|
||||
RTEMS_BSP_BOOTCARD_HANDLES_RAM_ALLOCATION
|
||||
|
||||
# Explicitly list all Makefiles here
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
* - Interrupt stack space is not minimum if defined.
|
||||
*/
|
||||
#define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2
|
||||
#define CONFIGURE_MALLOC_BSP_SUPPORTS_SBRK
|
||||
|
||||
#define BSP_INTERRUPT_STACK_SIZE (16 * 1024)
|
||||
|
||||
@@ -275,10 +276,6 @@ BSP_clrLEDs(uint8_t mask);
|
||||
* Total memory using RESIDUAL DATA
|
||||
*/
|
||||
extern unsigned int BSP_mem_size;
|
||||
/*
|
||||
* Start of the heap
|
||||
*/
|
||||
extern unsigned int BSP_heap_start;
|
||||
/*
|
||||
* PCI Bus Frequency
|
||||
*/
|
||||
@@ -327,6 +324,11 @@ rtems_tsec_attach(struct rtems_bsdnet_ifconfig *ifcfg, int attaching);
|
||||
#define RTEMS_BSP_NETWORK_DRIVER_NAME "tse1"
|
||||
#define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_tsec_attach
|
||||
|
||||
/*
|
||||
* system init stack and soft ir stack size
|
||||
*/
|
||||
#define BSP_INIT_STACK_SIZE 0x1000
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
/* include/bspopts.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* BSP uses shared logic in bootcard.c */
|
||||
#undef BSP_BOOTCARD_HANDLES_RAM_ALLOCATION
|
||||
|
||||
/* If defined, then PSIM will put a non-zero pattern into the RTEMS Workspace
|
||||
and C program heap. This should assist in finding code that assumes memory
|
||||
starts set to zero. */
|
||||
#undef BSP_DIRTY_MEMORY
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
|
||||
@@ -70,10 +70,6 @@ uint32_t bsp_clicks_per_usec = 0;
|
||||
* Total memory using RESIDUAL DATA
|
||||
*/
|
||||
unsigned int BSP_mem_size = 0;
|
||||
/*
|
||||
* Where the heap starts; is used by bsp_pretasking_hook;
|
||||
*/
|
||||
unsigned int BSP_heap_start = 0;
|
||||
/*
|
||||
* PCI Bus Frequency
|
||||
*/
|
||||
@@ -110,11 +106,6 @@ int i;
|
||||
printk("\n");
|
||||
}
|
||||
|
||||
/*
|
||||
* system init stack and soft ir stack size
|
||||
*/
|
||||
#define INIT_STACK_SIZE 0x1000
|
||||
#define INTR_STACK_SIZE rtems_configuration_get_interrupt_stack_size()
|
||||
|
||||
BSP_output_char_function_type BSP_output_char = BSP_output_char_via_serial;
|
||||
|
||||
@@ -238,7 +229,6 @@ void bsp_start( void )
|
||||
unsigned char *stack;
|
||||
uint32_t intrStackStart;
|
||||
uint32_t intrStackSize;
|
||||
unsigned char *work_space_start;
|
||||
char *chpt;
|
||||
ppc_cpu_id_t myCpu;
|
||||
ppc_cpu_revision_t myCpuRevision;
|
||||
@@ -286,9 +276,8 @@ VpdBufRec vpdData [] = {
|
||||
/*
|
||||
* Initialize the interrupt related settings.
|
||||
*/
|
||||
intrStackStart = (uint32_t) __rtems_end + INIT_STACK_SIZE;
|
||||
intrStackSize = INTR_STACK_SIZE;
|
||||
BSP_heap_start = intrStackStart + intrStackSize;
|
||||
intrStackStart = (uint32_t) __rtems_end + BSP_INIT_STACK_SIZE;
|
||||
intrStackSize = rtems_configuration_get_interrupt_stack_size();
|
||||
|
||||
/*
|
||||
* Initialize default raw exception handlers.
|
||||
@@ -433,29 +422,7 @@ VpdBufRec vpdData [] = {
|
||||
*/
|
||||
_BSP_clear_hostbridge_errors(0 /* enableMCP */, 0/*quiet*/);
|
||||
|
||||
/*
|
||||
* Set up our hooks
|
||||
* Make sure libc_init is done before drivers initialized so that
|
||||
* they can use atexit()
|
||||
*/
|
||||
|
||||
bsp_clicks_per_usec = BSP_bus_frequency/(BSP_time_base_divisor * 1000);
|
||||
|
||||
#ifdef SHOW_MORE_INIT_SETTINGS
|
||||
printk("Configuration.work_space_size = %x\n",
|
||||
Configuration.work_space_size);
|
||||
#endif
|
||||
|
||||
work_space_start =
|
||||
(unsigned char *)BSP_mem_size - Configuration.work_space_size;
|
||||
|
||||
if ( work_space_start <=
|
||||
((unsigned char *)__rtems_end) + INIT_STACK_SIZE + INTR_STACK_SIZE) {
|
||||
printk( "bspstart: Not enough RAM!!!\n" );
|
||||
bsp_cleanup();
|
||||
}
|
||||
|
||||
Configuration.work_space_start = work_space_start;
|
||||
bsp_clicks_per_usec = BSP_bus_frequency/(BSP_time_base_divisor * 1000);
|
||||
|
||||
/*
|
||||
* Initalize RTEMS IRQ system
|
||||
|
||||
Reference in New Issue
Block a user