Transitioned to shared bsp_libc_init() and cleaned up comments.

This commit is contained in:
Joel Sherrill
1998-04-15 15:13:01 +00:00
parent b3d3a34edd
commit b6394ae434
63 changed files with 606 additions and 1437 deletions

View File

@@ -11,7 +11,7 @@ PROJECT_ROOT = @PROJECT_ROOT@
PGM=${ARCH}/startup.rel
# C source names, if any, go here -- minus the .c
C_PIECES=bspclean bsppost bspstart main sbrk setvec iface
C_PIECES=bspclean bsplibc bsppost bspstart main sbrk setvec iface
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)

View File

@@ -1,14 +1,9 @@
/* bsp_start()
*
/*
* This routine starts the application. It includes application,
* board, and monitor specific initialization and configuration.
* The generic CPU dependent initialization has been performed
* before this routine is invoked.
*
* INPUT: NONE
*
* OUTPUT: NONE
*
* COPYRIGHT (c) 1989-1998.
* On-Line Applications Research Corporation (OAR).
* Copyright assigned to U.S. Government, 1994.
@@ -53,49 +48,12 @@ char *rtems_progname;
rtems_unsigned32 heap_size = 0;
rtems_unsigned32 heap_start;
void bsp_libc_init()
{
heap_size = 2 * 1024 * 1024; /* allocate a maximum of 2 megabytes for the heap */
/* allocate all remaining memory to the heap */
do {
heap_size -= HEAP_BLOCK_SIZE;
heap_start = _sysalloc( heap_size );
} while ( !heap_start );
if (!heap_start)
rtems_fatal_error_occurred( heap_size );
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
/*
* The last parameter to RTEMS_Malloc_Initialize is the "chunk"
* size which a multiple of will be requested on each sbrk()
* call by malloc(). A value of 0 indicates that sbrk() should
* not be called to extend the heap.
/*
* Use the shared implementations of the following routines
*/
RTEMS_Malloc_Initialize((void *) heap_start, heap_size, 0);
/*
* Init the RTEMS libio facility to provide UNIX-like system
* calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc)
* Uses malloc() to get area for the iops, so must be after malloc init
*/
rtems_libio_init();
/*
* Set up for the libc handling.
*/
if (BSP_Configuration.ticks_per_timeslice > 0)
libc_init(1); /* reentrant if possible */
else
libc_init(0); /* non-reentrant */
}
void bsp_postdriver_hook(void);
void bsp_libc_init( void *, unsigned32, int );
/*
* Function: bsp_pretasking_hook
@@ -111,23 +69,38 @@ void bsp_libc_init()
*
*/
void
bsp_pretasking_hook(void)
void bsp_pretasking_hook(void)
{
bsp_libc_init();
/* allocate a maximum of 2 megabytes for the heap */
heap_size = 2 * 1024 * 1024;
/* allocate all remaining memory to the heap */
do {
heap_size -= HEAP_BLOCK_SIZE;
heap_start = _sysalloc( heap_size );
} while ( !heap_start );
if (!heap_start)
rtems_fatal_error_occurred( heap_size );
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
bsp_libc_init((void *) heap_start, heap_size, 0);
#ifdef RTEMS_DEBUG
rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
#endif
}
/*
* Use the shared bsp_postdriver_hook() implementation
* bsp_start
*
* This routine does the bulk of the system initialization.
*/
void bsp_postdriver_hook(void);
int bsp_start(
int argc,
char **argv,

View File

@@ -11,7 +11,7 @@ PROJECT_ROOT = @PROJECT_ROOT@
PGM=${ARCH}/startup.rel
# C source names, if any, go here -- minus the .c
C_PIECES=bspclean bsppost bspstart main sbrk setvec
C_PIECES=bspclean bsplibc bsppost bspstart main sbrk setvec
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)

View File

@@ -1,16 +1,9 @@
/* bsp_start()
*
/*
* This routine starts the application. It includes application,
* board, and monitor specific initialization and configuration.
* The generic CPU dependent initialization has been performed
* before this routine is invoked.
*
* Called by RTEMS::RTEMS constructor in startup-ctor.cc
*
* INPUT: NONE
*
* OUTPUT: NONE
*
* COPYRIGHT (c) 1989-1998.
* On-Line Applications Research Corporation (OAR).
* Copyright assigned to U.S. Government, 1994.
@@ -56,9 +49,10 @@ rtems_unsigned32 CPU_HPPA_CLICKS_PER_TICK;
* Try to speed those tests up by speeding up the clock when in idle
*/
rtems_extension
fast_idle_switch_hook(rtems_tcb *current_task,
rtems_tcb *heir_task)
rtems_extension fast_idle_switch_hook(
rtems_tcb *current_task,
rtems_tcb *heir_task
)
{
static rtems_unsigned32 normal_clock = ~0;
static rtems_unsigned32 fast_clock;
@@ -86,32 +80,26 @@ fast_idle_switch_hook(rtems_tcb *current_task,
#endif
/*
* Function: bsp_libc_init
* Created: 94/12/6
*
* Description:
* Initialize whatever libc we are using
* called from bsp_postdriver_hook
*
*
* Parameters:
* none
*
* Returns:
* none.
*
* Side Effects:
*
*
* Notes:
*
* Deficiencies/ToDo:
*
*
* Use the shared implementations of the following routines
*/
void
bsp_libc_init(void)
void bsp_postdriver_hook(void);
void bsp_libc_init( void *, unsigned32, int );
/*
* Function: bsp_pretasking_hook
* Created: 95/03/10
*
* Description:
* BSP pretasking hook. Called just before drivers are initialized.
* Used to setup libc and install any BSP extensions.
*
* Notes:
* Must not use libc (to do io) from here, since drivers are
* not yet initialized.
*/
void bsp_pretasking_hook(void)
{
extern int end;
rtems_unsigned32 heap_start;
@@ -120,25 +108,7 @@ bsp_libc_init(void)
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
RTEMS_Malloc_Initialize((void *) heap_start, 64 * 1024, 0);
/*
* Init the RTEMS libio facility to provide UNIX-like system
* calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc)
* Uses malloc() to get area for the iops, so must be after malloc init
*/
rtems_libio_init();
/*
* Set up for the libc handling.
* XXX; this should allow for case of some other non-clock interrupts
*/
if (BSP_Configuration.ticks_per_timeslice > 0)
libc_init(1); /* reentrant if possible */
else
libc_init(0); /* non-reentrant */
bsp_libc_init((void *) heap_start, 64 * 1024, 0);
/*
* on MP systems, always use the print buffer
@@ -151,39 +121,6 @@ bsp_libc_init(void)
#ifdef SIMHPPA_ROM
use_print_buffer = 1;
#endif
}
/*
* Function: bsp_pretasking_hook
* Created: 95/03/10
*
* Description:
* BSP pretasking hook. Called just before drivers are initialized.
* Used to setup libc and install any BSP extensions.
*
* Parameters:
* none
*
* Returns:
* nada
*
* Side Effects:
* installs a few extensions
*
* Notes:
* Must not use libc (to do io) from here, since drivers are
* not yet initialized.
*
* Deficiencies/ToDo:
*
*
*/
void
bsp_pretasking_hook(void)
{
bsp_libc_init();
#if SIMHPPA_FAST_IDLE
/*
@@ -213,38 +150,6 @@ bsp_pretasking_hook(void)
#endif
}
/*
* Use the shared bsp_postdriver_hook() implementation
*/
void bsp_postdriver_hook(void);
/*
* Function: bsp_start
* Created: 94/12/6
*
* Description:
* called by crt0 as our "main" equivalent
*
*
*
* Parameters:
*
*
* Returns:
*
*
* Side Effects:
*
*
* Notes:
*
*
* Deficiencies/ToDo:
*
*
*/
void bsp_start(void)
{
/*

View File

@@ -11,7 +11,7 @@ PROJECT_ROOT = @PROJECT_ROOT@
PGM=${ARCH}/startup.rel
# C source names, if any, go here -- minus the .c
C_PIECES=bspclean bsppost bspstart main sbrk setvec
C_PIECES=bspclean bsplibc bsppost bspstart main sbrk setvec
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)

View File

@@ -1,14 +1,9 @@
/* bsp_start()
*
/*
* This routine starts the application. It includes application,
* board, and monitor specific initialization and configuration.
* The generic CPU dependent initialization has been performed
* before this routine is invoked.
*
* INPUT: NONE
*
* OUTPUT: NONE
*
* COPYRIGHT (c) 1989-1998.
* On-Line Applications Research Corporation (OAR).
* Copyright assigned to U.S. Government, 1994.
@@ -37,38 +32,12 @@ rtems_cpu_table Cpu_table;
char *rtems_progname;
/* Initialize whatever libc we are using
* called from postdriver hook
/*
* Use the shared implementations of the following routines
*/
void bsp_libc_init()
{
extern int end;
rtems_unsigned32 heap_start;
heap_start = (rtems_unsigned32) &end;
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
RTEMS_Malloc_Initialize((void *) heap_start, 64 * 1024, 0);
/*
* Init the RTEMS libio facility to provide UNIX-like system
* calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc)
* Uses malloc() to get area for the iops, so must be after malloc init
*/
rtems_libio_init();
/*
* Set up for the libc handling.
*/
if (BSP_Configuration.ticks_per_timeslice > 0)
libc_init(1); /* reentrant if possible */
else
libc_init(0); /* non-reentrant */
}
void bsp_postdriver_hook(void);
void bsp_libc_init( void *, unsigned32, int );
/*
* Function: bsp_pretasking_hook
@@ -84,23 +53,29 @@ void bsp_libc_init()
*
*/
void
bsp_pretasking_hook(void)
void bsp_pretasking_hook(void)
{
bsp_libc_init();
extern int end;
rtems_unsigned32 heap_start;
heap_start = (rtems_unsigned32) &end;
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
bsp_libc_init((void *) heap_start, 64 * 1024, 0);
#ifdef RTEMS_DEBUG
rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
#endif
}
/*
* Use the shared bsp_postdriver_hook() implementation
* bsp_start
*
* This routine does the bulk of the system initialization.
*/
void bsp_postdriver_hook(void);
void bsp_start( void )
{

View File

@@ -11,7 +11,7 @@ PROJECT_ROOT = @PROJECT_ROOT@
PGM=${ARCH}/startup.rel
# C source names, if any, go here -- minus the .c
C_PIECES=bsppost bspstart sbrk setvec
C_PIECES=bsplibc bsppost bspstart sbrk setvec
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)

View File

@@ -1,14 +1,9 @@
/* bsp_start()
*
/*
* This routine starts the application. It includes application,
* board, and monitor specific initialization and configuration.
* The generic CPU dependent initialization has been performed
* before this routine is invoked.
*
* INPUT: NONE
*
* OUTPUT: NONE
*
* COPYRIGHT (c) 1989-1998.
* On-Line Applications Research Corporation (OAR).
* Copyright assigned to U.S. Government, 1994.
@@ -40,43 +35,12 @@ rtems_cpu_table Cpu_table;
char *rtems_progname;
/* Initialize whatever libc we are using
* called from postdriver hook
/*
* Use the shared implementations of the following routines
*/
void bsp_libc_init()
{
rtems_unsigned32 heap_start;
#if 0
extern int end;
heap_start = (rtems_unsigned32) &end;
#else
void * sbrk( int );
heap_start = (rtems_unsigned32) sbrk( 64 * 1024 + CPU_ALIGNMENT );
#endif
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
RTEMS_Malloc_Initialize((void *) heap_start, 64 * 1024, 0);
/*
* Init the RTEMS libio facility to provide UNIX-like system
* calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc)
* Uses malloc() to get area for the iops, so must be after malloc init
*/
rtems_libio_init();
/*
* Set up for the libc handling.
*/
if (BSP_Configuration.ticks_per_timeslice > 0)
libc_init(1); /* reentrant if possible */
else
libc_init(0); /* non-reentrant */
}
void bsp_postdriver_hook(void);
void bsp_libc_init( void *, unsigned32, int );
/*
* Function: bsp_pretasking_hook
@@ -92,23 +56,34 @@ void bsp_libc_init()
*
*/
void
bsp_pretasking_hook(void)
void bsp_pretasking_hook(void)
{
bsp_libc_init();
rtems_unsigned32 heap_start;
#if 0
extern int end;
heap_start = (rtems_unsigned32) &end;
#else
void * sbrk( int );
heap_start = (rtems_unsigned32) sbrk( 64 * 1024 + CPU_ALIGNMENT );
#endif
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
bsp_libc_init((void *) heap_start, 64 * 1024, 0);
#ifdef RTEMS_DEBUG
rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
#endif
}
/*
* Use the shared bsp_postdriver_hook() implementation
* main/bsp_start
*
* This routine does the bulk of the system initialization.
*/
void bsp_postdriver_hook(void);
/* This is the original command line passed from DOS */
char ** Go32_Argv;

View File

@@ -11,7 +11,7 @@ PROJECT_ROOT = @PROJECT_ROOT@
PGM=${ARCH}/startup.rel
# C source names, if any, go here -- minus the .c
C_PIECES=bspclean bsppost bspstart main sbrk setvec
C_PIECES=bspclean bsplibc bsppost bspstart main sbrk setvec
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)

View File

@@ -43,45 +43,11 @@ rtems_cpu_table Cpu_table;
extern rtems_unsigned32 rdb_start;
/*
* bsp_libc_init
*
* Initialize whatever libc we are using called from bsp_postdriver_hook.
* Use the shared implementations of the following routines
*/
void bsp_libc_init()
{
extern int heap_bottom;
rtems_unsigned32 heap_start;
rtems_unsigned32 heap_size;
heap_start = (rtems_unsigned32) &heap_bottom;
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
heap_size = BSP_Configuration.work_space_start -(void *) heap_start ;
heap_size &= 0xfffffff0; /* keep it as a multiple of 16 bytes */
heap_size &= 0xfffffff0; /* keep it as a multiple of 16 bytes */
RTEMS_Malloc_Initialize((void *) heap_start, heap_size, 0);
/*
* Init the RTEMS libio facility to provide UNIX-like system
* calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc)
* Uses malloc() to get area for the iops, so must be after malloc init
*/
rtems_libio_init();
/*
* Set up for the libc handling.
*/
if (BSP_Configuration.ticks_per_timeslice > 0)
libc_init(1); /* reentrant if possible */
else
libc_init(0); /* non-reentrant */
}
void bsp_postdriver_hook(void);
void bsp_libc_init( void *, unsigned32, int );
/*
* Function: bsp_pretasking_hook
@@ -97,23 +63,33 @@ void bsp_libc_init()
*
*/
void
bsp_pretasking_hook(void)
void bsp_pretasking_hook(void)
{
bsp_libc_init();
extern int heap_bottom;
rtems_unsigned32 heap_start;
rtems_unsigned32 heap_size;
heap_start = (rtems_unsigned32) &heap_bottom;
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
heap_size = BSP_Configuration.work_space_start -(void *) heap_start ;
heap_size &= 0xfffffff0; /* keep it as a multiple of 16 bytes */
heap_size &= 0xfffffff0; /* keep it as a multiple of 16 bytes */
bsp_libc_init((void *) heap_start, heap_size, 0);
#ifdef RTEMS_DEBUG
rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
#endif
}
/*
* Use the shared bsp_postdriver_hook() implementation
* bsp_start
*
* This routine does the bulk of the system initialization.
*/
void bsp_postdriver_hook(void);
void bsp_start( void )
{
/*

View File

@@ -11,7 +11,7 @@ PROJECT_ROOT = @PROJECT_ROOT@
PGM=${ARCH}/startup.rel
# C source names, if any, go here -- minus the .c
C_PIECES=bspclean bsppost bspstart exit irq main sbrk
C_PIECES=bspclean bsplibc bsppost bspstart exit irq main sbrk
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)

View File

@@ -66,38 +66,8 @@ char *rtems_progname; /* Program name - from main(). */
| External Prototypes
+--------------------------------------------------------------------------*/
extern void _exit(int); /* define in exit.c */
/*-------------------------------------------------------------------------+
| Function: bsp_libc_init
| Description: Initialize whatever libc we are using. Called from
| pretasking hook.
| Global Variables: rtemsFreeMemStart.
| Arguments: None.
| Returns: Nothing.
+--------------------------------------------------------------------------*/
static void
bsp_libc_init(void)
{
if (rtemsFreeMemStart & (CPU_ALIGNMENT - 1)) /* not aligned => align it */
rtemsFreeMemStart = (rtemsFreeMemStart+CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
RTEMS_Malloc_Initialize((void *)rtemsFreeMemStart, HEAP_SIZE << 10, 0);
rtemsFreeMemStart += HEAP_SIZE << 10; /* HEAP_SIZE is in KBytes */
/* Init the RTEMS libio facility to provide UNIX-like system calls for use by
newlib (ie: provide __rtems_open, __rtems_close, etc). Uses malloc()
to get area for the iops, so must be after malloc initialization. */
rtems_libio_init();
/* Set up for the libc handling. */
if (BSP_Configuration.ticks_per_timeslice > 0)
libc_init(1); /* reentrant if possible */
else
libc_init(0); /* non-reentrant */
} /* bsp_libc_init */
void bsp_libc_init( void *, unsigned32, int );
void bsp_postdriver_hook(void);
/*-------------------------------------------------------------------------+
| Function: bsp_pretasking_hook
@@ -109,10 +79,14 @@ bsp_libc_init(void)
| Arguments: None.
| Returns: Nothing.
+--------------------------------------------------------------------------*/
void
bsp_pretasking_hook(void)
void bsp_pretasking_hook(void)
{
bsp_libc_init();
if (rtemsFreeMemStart & (CPU_ALIGNMENT - 1)) /* not aligned => align it */
rtemsFreeMemStart = (rtemsFreeMemStart+CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
bsp_libc_init((void *)rtemsFreeMemStart, HEAP_SIZE << 10, 0);
rtemsFreeMemStart += HEAP_SIZE << 10; /* HEAP_SIZE is in KBytes */
#ifdef RTEMS_DEBUG
@@ -122,13 +96,6 @@ bsp_pretasking_hook(void)
} /* bsp_pretasking_hook */
/*
* Use the shared bsp_postdriver_hook() implementation
*/
void bsp_postdriver_hook(void);
/*-------------------------------------------------------------------------+
| Function: bsp_start
| Description: Called before main is invoked.

View File

@@ -11,7 +11,7 @@ PROJECT_ROOT = @PROJECT_ROOT@
PGM=${ARCH}/startup.rel
# C source names, if any, go here -- minus the .c
C_PIECES=bspclean bsppost bspstart main sbrk setvec
C_PIECES=bspclean bsplibc bsppost bspstart main sbrk setvec
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)

View File

@@ -1,14 +1,9 @@
/* bsp_start()
*
/*
* This routine starts the application. It includes application,
* board, and monitor specific initialization and configuration.
* The generic CPU dependent initialization has been performed
* before this routine is invoked.
*
* INPUT: NONE
*
* OUTPUT: NONE
*
* COPYRIGHT (c) 1989-1998.
* On-Line Applications Research Corporation (OAR).
* Copyright assigned to U.S. Government, 1994.
@@ -40,38 +35,12 @@ rtems_cpu_table Cpu_table;
char *rtems_progname;
/* Initialize whatever libc we are using
* called from postdriver hook
/*
* Use the shared implementations of the following routines
*/
void bsp_libc_init()
{
extern int end;
rtems_unsigned32 heap_start;
heap_start = (rtems_unsigned32) &end;
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
RTEMS_Malloc_Initialize((void *) heap_start, 64 * 1024, 0);
/*
* Init the RTEMS libio facility to provide UNIX-like system
* calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc)
* Uses malloc() to get area for the iops, so must be after malloc init
*/
rtems_libio_init();
/*
* Set up for the libc handling.
*/
if (BSP_Configuration.ticks_per_timeslice > 0)
libc_init(1); /* reentrant if possible */
else
libc_init(0); /* non-reentrant */
}
void bsp_postdriver_hook(void);
void bsp_libc_init( void *, unsigned32, int );
/*
* Function: bsp_pretasking_hook
@@ -87,23 +56,28 @@ void bsp_libc_init()
*
*/
void
bsp_pretasking_hook(void)
void bsp_pretasking_hook(void)
{
bsp_libc_init();
extern int end;
rtems_unsigned32 heap_start;
heap_start = (rtems_unsigned32) &end;
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
bsp_libc_init((void *) heap_start, 64 * 1024, 0);
#ifdef RTEMS_DEBUG
rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
#endif
}
/*
* Use the shared bsp_postdriver_hook() implementation
* bsp_start
*
* This routine does the bulk of the system initialization.
*/
void bsp_postdriver_hook(void);
void bsp_start( void )
{
/* set node number in SQSIO4 CTL REG */

View File

@@ -11,7 +11,7 @@ PROJECT_ROOT = @PROJECT_ROOT@
PGM=${ARCH}/startup.rel
# C source names, if any, go here -- minus the .c
C_PIECES=bspclean bsppost bspstart main sbrk setvec vmeintr
C_PIECES=bspclean bsplibc bsppost bspstart main sbrk setvec vmeintr
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)

View File

@@ -1,14 +1,9 @@
/* bsp_start()
*
/*
* This routine starts the application. It includes application,
* board, and monitor specific initialization and configuration.
* The generic CPU dependent initialization has been performed
* before this routine is invoked.
*
* INPUT: NONE
*
* OUTPUT: NONE
*
* COPYRIGHT (c) 1989-1998.
* On-Line Applications Research Corporation (OAR).
* Copyright assigned to U.S. Government, 1994.
@@ -39,38 +34,12 @@ rtems_cpu_table Cpu_table;
char *rtems_progname;
/* Initialize whatever libc we are using
* called from postdriver hook
/*
* Use the shared implementations of the following routines
*/
void bsp_libc_init()
{
extern int end;
rtems_unsigned32 heap_start;
heap_start = (rtems_unsigned32) &end;
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
RTEMS_Malloc_Initialize((void *) heap_start, 64 * 1024, 0);
/*
* Init the RTEMS libio facility to provide UNIX-like system
* calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc)
* Uses malloc() to get area for the iops, so must be after malloc init
*/
rtems_libio_init();
/*
* Set up for the libc handling.
*/
if (BSP_Configuration.ticks_per_timeslice > 0)
libc_init(1); /* reentrant if possible */
else
libc_init(0); /* non-reentrant */
}
void bsp_postdriver_hook(void);
void bsp_libc_init( void *, unsigned32, int );
/*
* Function: bsp_pretasking_hook
@@ -86,23 +55,28 @@ void bsp_libc_init()
*
*/
void
bsp_pretasking_hook(void)
void bsp_pretasking_hook(void)
{
bsp_libc_init();
extern int end;
rtems_unsigned32 heap_start;
heap_start = (rtems_unsigned32) &end;
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
bsp_libc_init((void *) heap_start, 64 * 1024, 0);
#ifdef RTEMS_DEBUG
rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
#endif
}
/*
* Use the shared bsp_postdriver_hook() implementation
* bsp_start
*
* This routine does the bulk of the system initialization.
*/
void bsp_postdriver_hook(void);
void bsp_start( void )
{
m68k_isr_entry *monitors_vector_table;

View File

@@ -11,7 +11,7 @@ PROJECT_ROOT = @PROJECT_ROOT@
PGM=${ARCH}/startup.rel
# C source names, if any, go here -- minus the .c
C_PIECES=bsppost bspstart bspclean main sbrk setvec
C_PIECES=bsplibc bsppost bspstart bspclean main sbrk setvec
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)

View File

@@ -1,14 +1,9 @@
/* bsp_start()
*
/*
* This routine starts the application. It includes application,
* board, and monitor specific initialization and configuration.
* The generic CPU dependent initialization has been performed
* before this routine is invoked.
*
* INPUT: NONE
*
* OUTPUT: NONE
*
* COPYRIGHT (c) 1989-1998.
* On-Line Applications Research Corporation (OAR).
* Copyright assigned to U.S. Government, 1994.
@@ -38,46 +33,12 @@ rtems_cpu_table Cpu_table;
char *rtems_progname;
/* Initialize whatever libc we are using
* called from postdriver hook
/*
* Use the shared implementations of the following routines
*/
void bsp_libc_init()
{
/* extern int end; */
rtems_unsigned32 heap_start;
heap_start = (rtems_unsigned32) BSP_Configuration.work_space_start +
(rtems_unsigned32) BSP_Configuration.work_space_size;
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
if (heap_start > (rtems_unsigned32) RAM_END) {
/* rtems_fatal_error_occurred can not be used before initalization */
RAW_PUTS("\n\rRTEMS: Out of memory.\n\r");
RAW_PUTS("RTEMS: Check RAM_END and the size of the work space.\n\r");
}
RTEMS_Malloc_Initialize((void *) heap_start,
(RAM_END - heap_start), 0);
/*
* Init the RTEMS libio facility to provide UNIX-like system
* calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc)
* Uses malloc() to get area for the iops, so must be after malloc init
*/
rtems_libio_init();
/*
* Set up for the libc handling.
*/
if (BSP_Configuration.ticks_per_timeslice > 0)
libc_init(1); /* reentrant if possible */
else
libc_init(0); /* non-reentrant */
}
void bsp_postdriver_hook(void);
void bsp_libc_init( void *, unsigned32, int );
/*
* Function: bsp_pretasking_hook
@@ -93,23 +54,35 @@ void bsp_libc_init()
*
*/
void
bsp_pretasking_hook(void)
void bsp_pretasking_hook(void)
{
bsp_libc_init();
/* extern int end; */
rtems_unsigned32 heap_start;
heap_start = (rtems_unsigned32) BSP_Configuration.work_space_start +
(rtems_unsigned32) BSP_Configuration.work_space_size;
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
if (heap_start > (rtems_unsigned32) RAM_END) {
/* rtems_fatal_error_occurred can not be used before initalization */
RAW_PUTS("\n\rRTEMS: Out of memory.\n\r");
RAW_PUTS("RTEMS: Check RAM_END and the size of the work space.\n\r");
}
bsp_libc_init((void *) heap_start, (RAM_END - heap_start), 0);
#ifdef RTEMS_DEBUG
rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
#endif
}
/*
* Use the shared bsp_postdriver_hook() implementation
* bsp_start
*
* This routine does the bulk of the system initialization.
*/
void bsp_postdriver_hook(void);
void bsp_start( void )
{
void *vbr;

View File

@@ -11,7 +11,7 @@ PROJECT_ROOT = @PROJECT_ROOT@
PGM=${ARCH}/startup.rel
# C source names, if any, go here -- minus the .c
C_PIECES=bsppost bspstart bspclean efi68k_tcp efi68k_wd main sbrk setvec
C_PIECES=bsplibc bsppost bspstart bspclean efi68k_tcp efi68k_wd main sbrk setvec
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)

View File

@@ -1,14 +1,9 @@
/* bsp_start()
*
/*
* This routine starts the application. It includes application,
* board, and monitor specific initialization and configuration.
* The generic CPU dependent initialization has been performed
* before this routine is invoked.
*
* INPUT: NONE
*
* OUTPUT: NONE
*
* COPYRIGHT (c) 1989-1998.
* On-Line Applications Research Corporation (OAR).
* Copyright assigned to U.S. Government, 1994.
@@ -43,46 +38,12 @@ rtems_unsigned32 Timer_interrupts;
extern void set_debug_traps(void);
extern void breakpoint(void);
/* Initialize whatever libc we are using
* called from postdriver hook
/*
* Use the shared implementations of the following routines
*/
void bsp_libc_init()
{
/* extern int end; */
rtems_unsigned32 heap_start;
heap_start = (rtems_unsigned32) BSP_Configuration.work_space_start +
(rtems_unsigned32) BSP_Configuration.work_space_size;
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
if (heap_start > (rtems_unsigned32) RAM_END) {
/* rtems_fatal_error_occurred can not be used before initalization */
RAW_PUTS("\n\rRTEMS: Out of memory.\n\r");
RAW_PUTS("RTEMS: Check RAM_END and the size of the work space.\n\r");
}
RTEMS_Malloc_Initialize((void *) heap_start,
(RAM_END - heap_start), 0);
/*
* Init the RTEMS libio facility to provide UNIX-like system
* calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc)
* Uses malloc() to get area for the iops, so must be after malloc init
*/
rtems_libio_init();
/*
* Set up for the libc handling.
*/
if (BSP_Configuration.ticks_per_timeslice > 0)
libc_init(1); /* reentrant if possible */
else
libc_init(0); /* non-reentrant */
}
void bsp_postdriver_hook(void);
void bsp_libc_init( void *, unsigned32, int );
/*
* Function: bsp_pretasking_hook
@@ -98,24 +59,35 @@ void bsp_libc_init()
*
*/
void
bsp_pretasking_hook(void)
void bsp_pretasking_hook(void)
{
bsp_libc_init();
/* extern int end; */
rtems_unsigned32 heap_start;
heap_start = (rtems_unsigned32) BSP_Configuration.work_space_start +
(rtems_unsigned32) BSP_Configuration.work_space_size;
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
if (heap_start > (rtems_unsigned32) RAM_END) {
/* rtems_fatal_error_occurred can not be used before initalization */
RAW_PUTS("\n\rRTEMS: Out of memory.\n\r");
RAW_PUTS("RTEMS: Check RAM_END and the size of the work space.\n\r");
}
bsp_libc_init((void *) heap_start, (RAM_END - heap_start), 0);
#ifdef RTEMS_DEBUG
rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
#endif
}
/*
* Use the shared bsp_postdriver_hook() implementation
* bsp_start
*
* This routine does the bulk of the system initialization.
*/
void bsp_postdriver_hook(void);
void bsp_start( void )
{
void *vbr;

View File

@@ -11,7 +11,7 @@ PROJECT_ROOT = @PROJECT_ROOT@
PGM=${ARCH}/startup.rel
# C source names, if any, go here -- minus the .c
C_PIECES=bspclean bsppost bspstart main sbrk setvec
C_PIECES=bspclean bsplibc bsppost bspstart main sbrk setvec
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)

View File

@@ -1,14 +1,9 @@
/* bsp_start()
*
/*
* This routine starts the application. It includes application,
* board, and monitor specific initialization and configuration.
* The generic CPU dependent initialization has been performed
* before this routine is invoked.
*
* INPUT: NONE
*
* OUTPUT: NONE
*
* COPYRIGHT (c) 1989-1998.
* On-Line Applications Research Corporation (OAR).
* Copyright assigned to U.S. Government, 1994.
@@ -39,45 +34,12 @@ rtems_cpu_table Cpu_table;
char *rtems_progname;
/* Initialize whatever libc we are using
* called from postdriver hook
/*
* Use the shared implementations of the following routines
*/
void bsp_libc_init()
{
extern int end;
rtems_unsigned32 heap_start;
heap_start = (rtems_unsigned32) &end;
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
/*
* The last parameter to RTEMS_Malloc_Initialize is the "chunk"
* size which a multiple of will be requested on each sbrk()
* call by malloc(). A value of 0 indicates that sbrk() should
* not be called to extend the heap.
*/
RTEMS_Malloc_Initialize((void *) heap_start, 64 * 1024, 0);
/*
* Init the RTEMS libio facility to provide UNIX-like system
* calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc)
* Uses malloc() to get area for the iops, so must be after malloc init
*/
rtems_libio_init();
/*
* Set up for the libc handling.
*/
if (BSP_Configuration.ticks_per_timeslice > 0)
libc_init(1); /* reentrant if possible */
else
libc_init(0); /* non-reentrant */
}
void bsp_postdriver_hook(void);
void bsp_libc_init( void *, unsigned32, int );
/*
* Function: bsp_pretasking_hook
@@ -93,24 +55,29 @@ void bsp_libc_init()
*
*/
void
bsp_pretasking_hook(void)
void bsp_pretasking_hook(void)
{
bsp_libc_init();
extern int end;
rtems_unsigned32 heap_start;
heap_start = (rtems_unsigned32) &end;
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
bsp_libc_init((void *) heap_start, 64 * 1024, 0);
#ifdef RTEMS_DEBUG
rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
#endif
}
/*
* Use the shared bsp_postdriver_hook() implementation
* bsp_start
*
* This routine does the bulk of the system initialization.
*/
void bsp_postdriver_hook(void);
void bsp_start( void )
{

View File

@@ -11,7 +11,7 @@ PROJECT_ROOT = @PROJECT_ROOT@
PGM=${ARCH}/startup.rel
# C source names, if any, go here -- minus the .c
C_PIECES=alloc360 bspclean bsppost bspstart init68360 main sbrk setvec
C_PIECES=alloc360 bspclean bsplibc bsppost bspstart init68360 main sbrk setvec
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)

View File

@@ -1,14 +1,9 @@
/* bsp_start()
*
/*
* This routine starts the application. It includes application,
* board, and monitor specific initialization and configuration.
* The generic CPU dependent initialization has been performed
* before this routine is invoked.
*
* INPUT: NONE
*
* OUTPUT: NONE
*
* COPYRIGHT (c) 1989-1998.
* On-Line Applications Research Corporation (OAR).
* Copyright assigned to U.S. Government, 1994.
@@ -39,41 +34,12 @@ rtems_cpu_table Cpu_table;
char *rtems_progname;
/* Initialize whatever libc we are using
* called from postdriver hook
/*
* Use the shared implementations of the following routines
*/
void bsp_libc_init()
{
extern void *_HeapStart;
extern rtems_unsigned32 _HeapSize;
/*
* The last parameter to RTEMS_Malloc_Initialize is the "chunk"
* size which a multiple of will be requested on each sbrk()
* call by malloc(). A value of 0 indicates that sbrk() should
* not be called to extend the heap.
*/
RTEMS_Malloc_Initialize(&_HeapStart, _HeapSize, 0);
/*
* Init the RTEMS libio facility to provide UNIX-like system
* calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc)
* Uses malloc() to get area for the iops, so must be after malloc init
*/
rtems_libio_init();
/*
* Set up for the libc handling.
*/
if (BSP_Configuration.ticks_per_timeslice > 0)
libc_init(1); /* reentrant if possible */
else
libc_init(0); /* non-reentrant */
}
void bsp_postdriver_hook(void);
void bsp_libc_init( void *, unsigned32, int );
/*
* Function: bsp_pretasking_hook
@@ -89,23 +55,24 @@ void bsp_libc_init()
*
*/
void
bsp_pretasking_hook(void)
void bsp_pretasking_hook(void)
{
bsp_libc_init();
extern void *_HeapStart;
extern rtems_unsigned32 _HeapSize;
bsp_libc_init(&_HeapStart, _HeapSize, 0);
#ifdef RTEMS_DEBUG
rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
#endif
}
/*
* Use the shared bsp_postdriver_hook() implementation
* bsp_start
*
* This routine does the bulk of the system initialization.
*/
void bsp_postdriver_hook(void);
void bsp_start( void )
{
extern void *_WorkspaceBase;

View File

@@ -11,7 +11,7 @@ PROJECT_ROOT = @PROJECT_ROOT@
PGM=${ARCH}/startup.rel
# C source names, if any, go here -- minus the .c
C_PIECES=bspclean bsppost bspstart main sbrk setvec
C_PIECES=bspclean bsplibc bsppost bspstart main sbrk setvec
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)

View File

@@ -1,14 +1,9 @@
/* bsp_start()
*
/*
* This routine starts the application. It includes application,
* board, and monitor specific initialization and configuration.
* The generic CPU dependent initialization has been performed
* before this routine is invoked.
*
* INPUT: NONE
*
* OUTPUT: NONE
*
* COPYRIGHT (c) 1989-1998.
* On-Line Applications Research Corporation (OAR).
* Copyright assigned to U.S. Government, 1994.
@@ -46,39 +41,12 @@ rtems_cpu_table Cpu_table;
char *rtems_progname;
/* Initialize whatever libc we are using
* called from postdriver hook
/*
* Use the shared implementations of the following routines
*/
void bsp_libc_init()
{
extern int end;
rtems_unsigned32 heap_start;
heap_start = (rtems_unsigned32) &end;
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
/* Create 64 KByte memory region for RTEMS executive */
RTEMS_Malloc_Initialize((void *) heap_start, 64 * 1024, 0);
/*
* Init the RTEMS libio facility to provide UNIX-like system
* calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc)
* Uses malloc() to get area for the iops, so must be after malloc init
*/
rtems_libio_init();
/*
* Set up for the libc handling.
*/
if (BSP_Configuration.ticks_per_timeslice > 0)
libc_init(1); /* reentrant if possible */
else
libc_init(0); /* non-reentrant */
}
void bsp_postdriver_hook(void);
void bsp_libc_init( void *, unsigned32, int );
/*
* Function: bsp_pretasking_hook
@@ -94,23 +62,29 @@ void bsp_libc_init()
*
*/
void
bsp_pretasking_hook(void)
void bsp_pretasking_hook(void)
{
bsp_libc_init();
extern int end;
rtems_unsigned32 heap_start;
heap_start = (rtems_unsigned32) &end;
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
/* Create 64 KByte memory region for RTEMS executive */
bsp_libc_init((void *) heap_start, 64 * 1024, 0);
#ifdef RTEMS_DEBUG
rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
#endif
}
/*
* Use the shared bsp_postdriver_hook() implementation
* bsp_start
*
* This routine does the bulk of the system initialization.
*/
void bsp_postdriver_hook(void);
void bsp_start( void )
{
m68k_isr_entry *monitors_vector_table;

View File

@@ -11,7 +11,7 @@ PROJECT_ROOT = @PROJECT_ROOT@
PGM=${ARCH}/startup.rel
# C source names, if any, go here -- minus the .c
C_PIECES=bspclean bsppost bspstart main sbrk setvec
C_PIECES=bspclean bsplibc bsppost bspstart main sbrk setvec
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)

View File

@@ -1,14 +1,9 @@
/* bsp_start()
*
/*
* This routine starts the application. It includes application,
* board, and monitor specific initialization and configuration.
* The generic CPU dependent initialization has been performed
* before this routine is invoked.
*
* INPUT: NONE
*
* OUTPUT: NONE
*
* COPYRIGHT (c) 1989-1998.
* On-Line Applications Research Corporation (OAR).
* Copyright assigned to U.S. Government, 1994.
@@ -40,38 +35,12 @@ rtems_cpu_table Cpu_table;
char *rtems_progname;
/* Initialize whatever libc we are using
* called from postdriver hook
/*
* Use the shared implementations of the following routines
*/
void bsp_libc_init()
{
extern int end;
rtems_unsigned32 heap_start;
heap_start = (rtems_unsigned32) &end;
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
RTEMS_Malloc_Initialize((void *) heap_start, 64 * 1024, 0);
/*
* Init the RTEMS libio facility to provide UNIX-like system
* calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc)
* Uses malloc() to get area for the iops, so must be after malloc init
*/
rtems_libio_init();
/*
* Set up for the libc handling.
*/
if (BSP_Configuration.ticks_per_timeslice > 0)
libc_init(1); /* reentrant if possible */
else
libc_init(0); /* non-reentrant */
}
void bsp_postdriver_hook(void);
void bsp_libc_init( void *, unsigned32, int );
/*
* Function: bsp_pretasking_hook
@@ -87,10 +56,17 @@ void bsp_libc_init()
*
*/
void
bsp_pretasking_hook(void)
void bsp_pretasking_hook(void)
{
bsp_libc_init();
extern int end;
rtems_unsigned32 heap_start;
heap_start = (rtems_unsigned32) &end;
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
bsp_libc_init((void *) heap_start, 64 * 1024, 0);
#ifdef RTEMS_DEBUG
rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
@@ -98,11 +74,11 @@ bsp_pretasking_hook(void)
}
/*
* Use the shared bsp_postdriver_hook() implementation
* bsp_start
*
* This routine does the bulk of the system initialization.
*/
void bsp_postdriver_hook(void);
void bsp_start( void )
{
m68k_isr_entry *monitors_vector_table;

View File

@@ -11,7 +11,7 @@ PROJECT_ROOT = @PROJECT_ROOT@
PGM=${ARCH}/startup.rel
# C source names, if any, go here -- minus the .c
C_PIECES=bspclean bsppost bspstart main sbrk setvec
C_PIECES=bspclean bsplibc bsppost bspstart main sbrk setvec
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)

View File

@@ -1,14 +1,9 @@
/* bsp_start()
*
/*
* This routine starts the application. It includes application,
* board, and monitor specific initialization and configuration.
* The generic CPU dependent initialization has been performed
* before this routine is invoked.
*
* INPUT: NONE
*
* OUTPUT: NONE
*
* COPYRIGHT (c) 1989-1998.
* On-Line Applications Research Corporation (OAR).
* Copyright assigned to U.S. Government, 1994.
@@ -43,38 +38,12 @@ rtems_cpu_table Cpu_table;
char *rtems_progname;
/* Initialize whatever libc we are using
* called from postdriver hook
/*
* Use the shared implementations of the following routines
*/
void bsp_libc_init()
{
extern int end;
rtems_unsigned32 heap_start;
heap_start = (rtems_unsigned32) &end;
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
RTEMS_Malloc_Initialize((void *) heap_start, 64 * 1024, 0);
/*
* Init the RTEMS libio facility to provide UNIX-like system
* calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc)
* Uses malloc() to get area for the iops, so must be after malloc init
*/
rtems_libio_init();
/*
* Set up for the libc handling.
*/
if (BSP_Configuration.ticks_per_timeslice > 0)
libc_init(1); /* reentrant if possible */
else
libc_init(0); /* non-reentrant */
}
void bsp_postdriver_hook(void);
void bsp_libc_init( void *, unsigned32, int );
/*
* Function: bsp_pretasking_hook
@@ -90,24 +59,29 @@ void bsp_libc_init()
*
*/
void
bsp_pretasking_hook(void)
void bsp_pretasking_hook(void)
{
bsp_libc_init();
extern int end;
rtems_unsigned32 heap_start;
heap_start = (rtems_unsigned32) &end;
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
bsp_libc_init((void *) heap_start, 64 * 1024, 0);
#ifdef RTEMS_DEBUG
rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
#endif
}
/*
* Use the shared bsp_postdriver_hook() implementation
* bsp_start
*
* This routine does the bulk of the system initialization.
*/
void bsp_postdriver_hook(void);
void bsp_start( void )
{
m68k_isr_entry *monitors_vector_table;

View File

@@ -11,7 +11,7 @@ PROJECT_ROOT = @PROJECT_ROOT@
PGM=${ARCH}/startup.rel
# C source names, if any, go here -- minus the .c
C_PIECES=bspclean bsppost bspstart main sbrk setvec
C_PIECES=bspclean bsplibc bsppost bspstart main sbrk setvec
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)

View File

@@ -1,14 +1,9 @@
/* bsp_start()
*
/*
* This routine starts the application. It includes application,
* board, and monitor specific initialization and configuration.
* The generic CPU dependent initialization has been performed
* before this routine is invoked.
*
* INPUT: NONE
*
* OUTPUT: NONE
*
* COPYRIGHT (c) 1989-1998.
* On-Line Applications Research Corporation (OAR).
* Copyright assigned to U.S. Government, 1994.
@@ -43,38 +38,12 @@ rtems_cpu_table Cpu_table;
char *rtems_progname;
/* Initialize whatever libc we are using
* called from postdriver hook
/*
* Use the shared implementations of the following routines
*/
void bsp_libc_init()
{
extern int end;
rtems_unsigned32 heap_start;
heap_start = (rtems_unsigned32) &end;
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
RTEMS_Malloc_Initialize((void *) heap_start, 64 * 1024, 0);
/*
* Init the RTEMS libio facility to provide UNIX-like system
* calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc)
* Uses malloc() to get area for the iops, so must be after malloc init
*/
rtems_libio_init();
/*
* Set up for the libc handling.
*/
if (BSP_Configuration.ticks_per_timeslice > 0)
libc_init(1); /* reentrant if possible */
else
libc_init(0); /* non-reentrant */
}
void bsp_postdriver_hook(void);
void bsp_libc_init( void *, unsigned32, int );
/*
* Function: bsp_pretasking_hook
@@ -90,24 +59,28 @@ void bsp_libc_init()
*
*/
void
bsp_pretasking_hook(void)
void bsp_pretasking_hook(void)
{
bsp_libc_init();
extern int end;
rtems_unsigned32 heap_start;
heap_start = (rtems_unsigned32) &end;
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
bsp_libc_init((void *) heap_start, 64 * 1024, 0);
#ifdef RTEMS_DEBUG
rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
#endif
}
/*
* Use the shared bsp_postdriver_hook() implementation
* bsp_start
*
* This routine does the bulk of the system initialization.
*/
void bsp_postdriver_hook(void);
void bsp_start( void )
{
m68k_isr_entry *monitors_vector_table;

View File

@@ -11,7 +11,7 @@ PROJECT_ROOT = @PROJECT_ROOT@
PGM=${ARCH}/startup.rel
# C source names, if any, go here -- minus the .c
C_PIECES=bspclean bsppost bspstart main page_table sbrk setvec
C_PIECES=bspclean bsplibc bsppost bspstart main page_table sbrk setvec
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)

View File

@@ -1,14 +1,9 @@
/* bsp_start()
*
/*
* This routine starts the application. It includes application,
* board, and monitor specific initialization and configuration.
* The generic CPU dependent initialization has been performed
* before this routine is invoked.
*
* INPUT: NONE
*
* OUTPUT: NONE
*
* COPYRIGHT (c) 1989-1998.
* On-Line Applications Research Corporation (OAR).
* Copyright assigned to U.S. Government, 1994.
@@ -47,38 +42,12 @@ rtems_cpu_table Cpu_table;
char *rtems_progname;
/* Initialize whatever libc we are using
* called from postdriver hook
/*
* Use the shared implementations of the following routines
*/
void bsp_libc_init()
{
extern int end;
rtems_unsigned32 heap_start;
heap_start = (rtems_unsigned32) &end;
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
RTEMS_Malloc_Initialize((void *) heap_start, 64 * 1024, 0);
/*
* Init the RTEMS libio facility to provide UNIX-like system
* calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc)
* Uses malloc() to get area for the iops, so must be after malloc init
*/
rtems_libio_init();
/*
* Set up for the libc handling.
*/
if (BSP_Configuration.ticks_per_timeslice > 0)
libc_init(1); /* reentrant if possible */
else
libc_init(0); /* non-reentrant */
}
void bsp_postdriver_hook(void);
void bsp_libc_init( void *, unsigned32, int );
/*
* Function: bsp_pretasking_hook
@@ -94,24 +63,28 @@ void bsp_libc_init()
*
*/
void
bsp_pretasking_hook(void)
void bsp_pretasking_hook(void)
{
bsp_libc_init();
extern int end;
rtems_unsigned32 heap_start;
heap_start = (rtems_unsigned32) &end;
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
bsp_libc_init((void *) heap_start, 64 * 1024, 0);
#ifdef RTEMS_DEBUG
rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
#endif
}
/*
* Use the shared bsp_postdriver_hook() implementation
* bsp_start
*
* This routine does the bulk of the system initialization.
*/
void bsp_postdriver_hook(void);
void bsp_start( void )
{
m68k_isr_entry *monitors_vector_table;

View File

@@ -12,7 +12,7 @@ PGM=${ARCH}/startup.rel
# C source names, if any, go here -- minus the .c
C_PIECES=crc debugport gdb-hooks main m68302scc m68k-stub memcheck trace \
bsppost bspstart bspclean sbrk setvec
bsplibc bsppost bspstart bspclean sbrk setvec
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)

View File

@@ -1,14 +1,9 @@
/* bsp_start()
*
/*
* This routine starts the application. It includes application,
* board, and monitor specific initialization and configuration.
* The generic CPU dependent initialization has been performed
* before this routine is invoked.
*
* INPUT: NONE
*
* OUTPUT: NONE
*
* COPYRIGHT (c) 1989-1998.
* On-Line Applications Research Corporation (OAR).
* Copyright assigned to U.S. Government, 1994.
@@ -40,45 +35,12 @@ rtems_interrupt_level bsp_isr_level;
char *rtems_progname;
/* Initialize whatever libc we are using
* called from postdriver hook
/*
* Use the shared implementations of the following routines
*/
void bsp_libc_init()
{
extern int end;
rtems_unsigned32 heap_start;
heap_start = (rtems_unsigned32) &end;
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
/*
* The last parameter to RTEMS_Malloc_Initialize is the "chunk"
* size which a multiple of will be requested on each sbrk()
* call by malloc(). A value of 0 indicates that sbrk() should
* not be called to extend the heap.
*/
RTEMS_Malloc_Initialize((void *) heap_start, 64 * 1024, 0);
/*
* Init the RTEMS libio facility to provide UNIX-like system
* calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc)
* Uses malloc() to get area for the iops, so must be after malloc init
*/
rtems_libio_init();
/*
* Set up for the libc handling.
*/
if (BSP_Configuration.ticks_per_timeslice > 0)
libc_init(1); /* reentrant if possible */
else
libc_init(0); /* non-reentrant */
}
void bsp_postdriver_hook(void);
void bsp_libc_init( void *, unsigned32, int );
/*
* Function: bsp_pretasking_hook
@@ -94,23 +56,28 @@ void bsp_libc_init()
*
*/
void
bsp_pretasking_hook(void)
void bsp_pretasking_hook(void)
{
bsp_libc_init();
extern int end;
rtems_unsigned32 heap_start;
heap_start = (rtems_unsigned32) &end;
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
bsp_libc_init((void *) heap_start, 64 * 1024, 0);
#ifdef RTEMS_DEBUG
rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
#endif
}
/*
* Use the shared bsp_postdriver_hook() implementation
* bsp_start
*
* This routine does the bulk of the system initialization.
*/
void bsp_postdriver_hook(void);
void bsp_start( void )
{
/*

View File

@@ -1,14 +1,9 @@
/* bsp_start()
*
/*
* This routine starts the application. It includes application,
* board, and monitor specific initialization and configuration.
* The generic CPU dependent initialization has been performed
* before this routine is invoked.
*
* INPUT: NONE
*
* OUTPUT: NONE
*
* COPYRIGHT (c) 1989-1998.
* On-Line Applications Research Corporation (OAR).
* Copyright assigned to U.S. Government, 1994.
@@ -48,47 +43,12 @@ rtems_cpu_table Cpu_table;
char *rtems_progname;
/* Initialize whatever libc we are using
* called from postdriver hook
/*
* Use the shared implementations of the following routines
*/
#define LIBC_HEAP_SIZE (64 * 1024)
void bsp_libc_init()
{
extern int end;
rtems_unsigned32 heap_start;
heap_start = (rtems_unsigned32) &end;
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
/*
* The last parameter to RTEMS_Malloc_Initialize is the "chunk"
* size which a multiple of will be requested on each sbrk()
* call by malloc(). A value of 0 indicates that sbrk() should
* not be called to extend the heap.
*/
RTEMS_Malloc_Initialize((void *) heap_start, LIBC_HEAP_SIZE, 0);
/*
* Init the RTEMS libio facility to provide UNIX-like system
* calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc)
* Uses malloc() to get area for the iops, so must be after malloc init
*/
rtems_libio_init();
/*
* Set up for the libc handling.
*/
if (BSP_Configuration.ticks_per_timeslice > 0)
libc_init(1); /* reentrant if possible */
else
libc_init(0); /* non-reentrant */
}
void bsp_postdriver_hook(void);
void bsp_libc_init( void *, unsigned32, int );
/*
* Function: bsp_pretasking_hook
@@ -104,24 +64,32 @@ void bsp_libc_init()
*
*/
void
bsp_pretasking_hook(void)
#define LIBC_HEAP_SIZE (64 * 1024)
void bsp_pretasking_hook(void)
{
bsp_libc_init();
extern int end;
rtems_unsigned32 heap_start;
heap_start = (rtems_unsigned32) &end;
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
bsp_libc_init((void *) heap_start, LIBC_HEAP_SIZE, 0);
#ifdef RTEMS_DEBUG
rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
#endif
}
/*
* Use the shared bsp_postdriver_hook() implementation
*/
void bsp_postdriver_hook(void);
extern int end; /* defined by linker */
/*
* bsp_start
*
* This routine does the bulk of the system initialization.
*/
void bsp_start( void )
{
/*

View File

@@ -11,7 +11,7 @@ PROJECT_ROOT = @PROJECT_ROOT@
PGM=${ARCH}/startup.rel
# C source names, if any, go here -- minus the .c
C_PIECES=bspclean bsppost bspstart main sbrk setvec inittlb
C_PIECES=bspclean bsplibc bsppost bspstart main sbrk setvec inittlb
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)

View File

@@ -1,14 +1,9 @@
/* bsp_start()
*
/*
* This routine starts the application. It includes application,
* board, and monitor specific initialization and configuration.
* The generic CPU dependent initialization has been performed
* before this routine is invoked.
*
* INPUT: NONE
*
* OUTPUT: NONE
*
* COPYRIGHT (c) 1989-1998.
* On-Line Applications Research Corporation (OAR).
* Copyright assigned to U.S. Government, 1994.
@@ -48,47 +43,12 @@ rtems_cpu_table Cpu_table;
char *rtems_progname;
/* Initialize whatever libc we are using
* called from postdriver hook
/*
* Use the shared implementations of the following routines
*/
#define LIBC_HEAP_SIZE (64 * 1024)
void bsp_libc_init()
{
extern int end;
rtems_unsigned32 heap_start;
heap_start = (rtems_unsigned32) &end;
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
/*
* The last parameter to RTEMS_Malloc_Initialize is the "chunk"
* size which a multiple of will be requested on each sbrk()
* call by malloc(). A value of 0 indicates that sbrk() should
* not be called to extend the heap.
*/
RTEMS_Malloc_Initialize((void *) heap_start, LIBC_HEAP_SIZE, 0);
/*
* Init the RTEMS libio facility to provide UNIX-like system
* calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc)
* Uses malloc() to get area for the iops, so must be after malloc init
*/
rtems_libio_init();
/*
* Set up for the libc handling.
*/
if (BSP_Configuration.ticks_per_timeslice > 0)
libc_init(1); /* reentrant if possible */
else
libc_init(0); /* non-reentrant */
}
void bsp_postdriver_hook(void);
void bsp_libc_init( void *, unsigned32, int );
/*
* Function: bsp_pretasking_hook
@@ -104,24 +64,32 @@ void bsp_libc_init()
*
*/
void
bsp_pretasking_hook(void)
#define LIBC_HEAP_SIZE (64 * 1024)
void bsp_pretasking_hook(void)
{
bsp_libc_init();
extern int end;
rtems_unsigned32 heap_start;
heap_start = (rtems_unsigned32) &end;
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
bsp_libc_init((void *) heap_start, LIBC_HEAP_SIZE, 0);
#ifdef RTEMS_DEBUG
rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
#endif
}
/*
* Use the shared bsp_postdriver_hook() implementation
*/
void bsp_postdriver_hook(void);
extern int end; /* defined by linker */
/*
* bsp_start
*
* This routine does the bulk of the system initialization.
*/
void bsp_start( void )
{
/*

View File

@@ -11,7 +11,7 @@ PROJECT_ROOT = @PROJECT_ROOT@
PGM=${ARCH}/startup.rel
# C source names, if any, go here -- minus the .c
C_PIECES=bspclean bsppost bspstart main sbrk setvec
C_PIECES=bspclean bsplibc bsppost bspstart main sbrk setvec
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)

View File

@@ -1,14 +1,9 @@
/* bsp_start()
*
/*
* This routine starts the application. It includes application,
* board, and monitor specific initialization and configuration.
* The generic CPU dependent initialization has been performed
* before this routine is invoked.
*
* INPUT: NONE
*
* OUTPUT: NONE
*
* COPYRIGHT (c) 1989-1998.
* On-Line Applications Research Corporation (OAR).
* Copyright assigned to U.S. Government, 1994.
@@ -40,45 +35,12 @@ rtems_cpu_table Cpu_table;
char *rtems_progname;
/* Initialize whatever libc we are using
* called from postdriver hook
/*
* Use the shared implementations of the following routines
*/
void bsp_libc_init()
{
extern int end;
rtems_unsigned32 heap_start;
heap_start = (rtems_unsigned32) &end;
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
/*
* The last parameter to RTEMS_Malloc_Initialize is the "chunk"
* size which a multiple of will be requested on each sbrk()
* call by malloc(). A value of 0 indicates that sbrk() should
* not be called to extend the heap.
*/
RTEMS_Malloc_Initialize((void *) heap_start, 64 * 1024, 0);
/*
* Init the RTEMS libio facility to provide UNIX-like system
* calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc)
* Uses malloc() to get area for the iops, so must be after malloc init
*/
rtems_libio_init();
/*
* Set up for the libc handling.
*/
if (BSP_Configuration.ticks_per_timeslice > 0)
libc_init(1); /* reentrant if possible */
else
libc_init(0); /* non-reentrant */
}
void bsp_postdriver_hook(void);
void bsp_libc_init( void *, unsigned32, int );
/*
* Function: bsp_pretasking_hook
@@ -94,23 +56,28 @@ void bsp_libc_init()
*
*/
void
bsp_pretasking_hook(void)
void bsp_pretasking_hook(void)
{
bsp_libc_init();
extern int end;
rtems_unsigned32 heap_start;
heap_start = (rtems_unsigned32) &end;
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
bsp_libc_init((void *) heap_start, 64 * 1024, 0);
#ifdef RTEMS_DEBUG
rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
#endif
}
/*
* Use the shared bsp_postdriver_hook() implementation
* bsp_start
*
* This routine does the bulk of the system initialization.
*/
void bsp_postdriver_hook(void);
int bsp_start(
int argc,
char **argv,

View File

@@ -11,7 +11,7 @@ PROJECT_ROOT = @PROJECT_ROOT@
PGM=${ARCH}/startup.rel
# C source names, if any, go here -- minus the .c
C_PIECES=bspclean bsppost bspstart main sbrk setvec
C_PIECES=bspclean bsplibc bsppost bspstart main sbrk setvec
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)

View File

@@ -1,14 +1,10 @@
/* bsp_start()
/*
*
* This routine starts the application. It includes application,
* board, and monitor specific initialization and configuration.
* The generic CPU dependent initialization has been performed
* before this routine is invoked.
*
* INPUT: NONE
*
* OUTPUT: NONE
*
* Author: Andrew Bray <andy@i-cubed.co.uk>
*
* COPYRIGHT (c) 1995 by i-cubed ltd.
@@ -57,46 +53,12 @@ rtems_cpu_table Cpu_table;
char *rtems_progname;
/* Initialize whatever libc we are using
* called from postdriver hook
/*
* Use the shared implementations of the following routines
*/
void bsp_libc_init()
{
extern int _end;
rtems_unsigned32 heap_start;
heap_start = (rtems_unsigned32) &_end;
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
/*
* The last parameter to RTEMS_Malloc_Initialize is the "chunk"
* size which a multiple of will be requested on each sbrk()
* call by malloc(). A value of 0 indicates that sbrk() should
* not be called to extend the heap.
*/
RTEMS_Malloc_Initialize((void *) heap_start, 64 * 1024, 0);
/*
* Init the RTEMS libio facility to provide UNIX-like system
* calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc)
* Uses malloc() to get area for the iops, so must be after malloc init
*/
rtems_libio_init();
/*
* Set up for the libc handling.
*/
if (BSP_Configuration.ticks_per_timeslice > 0)
libc_init(1); /* reentrant if possible */
else
libc_init(0); /* non-reentrant */
}
void bsp_postdriver_hook(void);
void bsp_libc_init( void *, unsigned32, int );
/*
* Function: bsp_pretasking_hook
@@ -112,24 +74,28 @@ void bsp_libc_init()
*
*/
void
bsp_pretasking_hook(void)
void bsp_pretasking_hook(void)
{
bsp_libc_init();
extern int _end;
rtems_unsigned32 heap_start;
heap_start = (rtems_unsigned32) &_end;
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
bsp_libc_init((void *) heap_start, 64 * 1024, 0);
#ifdef RTEMS_DEBUG
rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
#endif
}
/*
* Use the shared bsp_postdriver_hook() implementation
* bsp_start
*
* This routine does the bulk of the system initialization.
*/
void bsp_postdriver_hook(void);
void bsp_start( void )
{
/*

View File

@@ -6,13 +6,13 @@
* The tick frequency is directly programmed to the configured number of
* microseconds per tick.
*
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1997.
* COPYRIGHT (c) 1989-1998.
* On-Line Applications Research Corporation (OAR).
* All rights assigned to U.S. Government, 1994.
* Copyright assigned to U.S. Government, 1994.
*
* This material may be reproduced by or for the U.S. Government pursuant
* to the copyright license under the clause at DFARS 252.227-7013. This
* notice must appear in all copies of this file and its derivatives.
* The license and distribution terms for this file may be
* found in found in the file LICENSE in this distribution or at
* http://www.OARcorp.com/rtems/license.html.
*
* $Id$
*/

View File

@@ -19,13 +19,13 @@
*
* Derived from c/src/lib/libbsp/no_cpu/no_bsp/include/bsp.h
*
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
* COPYRIGHT (c) 1989-1998.
* On-Line Applications Research Corporation (OAR).
* All rights assigned to U.S. Government, 1994.
* Copyright assigned to U.S. Government, 1994.
*
* This material may be reproduced by or for the U.S. Government pursuant
* to the copyright license under the clause at DFARS 252.227-7013. This
* notice must appear in all copies of this file and its derivatives.
* The license and distribution terms for this file may be
* found in found in the file LICENSE in this distribution or at
* http://www.OARcorp.com/rtems/license.html.
*
* $Id$
*/

View File

@@ -14,13 +14,13 @@
* NOTE: If these are all zero, then the times reported include
* all calling overhead including passing of arguments.
*
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
* COPYRIGHT (c) 1989-1998.
* On-Line Applications Research Corporation (OAR).
* All rights assigned to U.S. Government, 1994.
* Copyright assigned to U.S. Government, 1994.
*
* This material may be reproduced by or for the U.S. Government pursuant
* to the copyright license under the clause at DFARS 252.227-7013. This
* notice must appear in all copies of this file and its derivatives.
* The license and distribution terms for this file may be
* found in found in the file LICENSE in this distribution or at
* http://www.OARcorp.com/rtems/license.html.
*
* $Id$
*/

View File

@@ -3,4 +3,5 @@
#
This shared memory driver support code works with a modified version
of the PowerPC Sim
of the PowerPC Simulator. The modifications are not yet merged
into the mainsteam distribution.

View File

@@ -8,12 +8,12 @@
* Output parameters:
* returns - converted address
*
* COPYRIGHT (c) 1989-1997.
* COPYRIGHT (c) 1989-1998.
* On-Line Applications Research Corporation (OAR).
* Copyright assigned to U.S. Government, 1994.
*
* The license and distribution terms for this file may in
* the file LICENSE in this distribution or at
* The license and distribution terms for this file may be
* found in found in the file LICENSE in this distribution or at
* http://www.OARcorp.com/rtems/license.html.
*
* $Id$

View File

@@ -12,12 +12,12 @@
*
* NOTES: No interrupt support.
*
* COPYRIGHT (c) 1989-1997.
* COPYRIGHT (c) 1989-1998.
* On-Line Applications Research Corporation (OAR).
* Copyright assigned to U.S. Government, 1994.
*
* The license and distribution terms for this file may in
* the file LICENSE in this distribution or at
* The license and distribution terms for this file may be
* found in found in the file LICENSE in this distribution or at
* http://www.OARcorp.com/rtems/license.html.
*
* $Id$

View File

@@ -11,7 +11,7 @@ PROJECT_ROOT = @PROJECT_ROOT@
PGM=${ARCH}/startup.rel
# C source names, if any, go here -- minus the .c
C_PIECES=bspclean bsppost bspstart main sbrk setvec
C_PIECES=bspclean bsplibc bsppost bspstart main sbrk setvec
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)

View File

@@ -1,19 +1,16 @@
/* bspstart.c
*
/*
* This set of routines starts the application. It includes application,
* board, and monitor specific initialization and configuration.
* The generic CPU dependent initialization has been performed
* before any of these are invoked.
*
* Called by RTEMS::RTEMS constructor in rtems-ctor.cc
*
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1997.
* COPYRIGHT (c) 1989-1998.
* On-Line Applications Research Corporation (OAR).
* All rights assigned to U.S. Government, 1994.
*
* This material may be reproduced by or for the U.S. Government pursuant
* to the copyright license under the clause at DFARS 252.227-7013. This
* notice must appear in all copies of this file and its derivatives.
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.OARcorp.com/rtems/license.html.
*
* $Id$
*/
@@ -68,9 +65,10 @@ rtems_unsigned32 CPU_PPC_CLICKS_PER_TICK;
* approximately 5 seconds of wall time.
*/
rtems_extension
fast_idle_switch_hook(rtems_tcb *current_task,
rtems_tcb *heir_task)
rtems_extension fast_idle_switch_hook(
rtems_tcb *current_task,
rtems_tcb *heir_task
)
{
static rtems_unsigned32 normal_clock = ~0;
static rtems_unsigned32 fast_clock;
@@ -100,12 +98,20 @@ fast_idle_switch_hook(rtems_tcb *current_task,
#endif
/*
* bsp_libc_init
*
* Initialize whatever libc we are using called from bsp_postdriver_hook.
* Use the shared implementations of the following routines
*/
void bsp_libc_init(void)
void bsp_postdriver_hook(void);
void bsp_libc_init( void *, unsigned32, int );
/*
* bsp_pretasking_hook
*
* BSP pretasking hook. Called just before drivers are initialized.
* Used to setup libc and install any BSP extensions.
*/
void bsp_pretasking_hook(void)
{
extern int end;
rtems_unsigned32 heap_start;
@@ -118,38 +124,7 @@ void bsp_libc_init(void)
heap_size = BSP_Configuration.work_space_start - (void *)&end;
heap_size &= 0xfffffff0; /* keep it as a multiple of 16 bytes */
RTEMS_Malloc_Initialize((void *) heap_start, heap_size, 0);
/*
* Init the RTEMS libio facility to provide UNIX-like system
* calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc)
* Uses malloc() to get area for the iops, so must be after malloc init
*/
rtems_libio_init();
/*
* Set up for the libc handling.
*/
if (BSP_Configuration.ticks_per_timeslice > 0)
libc_init(1); /* reentrant if possible */
else
libc_init(0); /* non-reentrant */
}
/*
* bsp_pretasking_hook
*
* BSP pretasking hook. Called just before drivers are initialized.
* Used to setup libc and install any BSP extensions.
*/
void bsp_pretasking_hook(void)
{
bsp_libc_init();
bsp_libc_init((void *) heap_start, heap_size, 0);
#if PSIM_FAST_IDLE
/*
@@ -187,12 +162,6 @@ void bsp_pretasking_hook(void)
}
/*
* Use the shared bsp_postdriver_hook() implementation
*/
void bsp_postdriver_hook(void);
/*
* bsp_start
*

View File

@@ -1,3 +1,16 @@
/*
*
* COPYRIGHT (c) 1989-1998.
* On-Line Applications Research Corporation (OAR).
* Copyright assigned to U.S. Government, 1994.
*
* The license and distribution terms for this file may be
* found in found in the file LICENSE in this distribution or at
* http://www.OARcorp.com/rtems/license.html.
*
* $Id$
*/
OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc",
"elf32-powerpc")
OUTPUT_ARCH(powerpc)

View File

@@ -29,13 +29,13 @@
*
* Derived from c/src/lib/libbsp/no_cpu/no_bsp/startup/setvec.c:
*
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
* COPYRIGHT (c) 1989-1998.
* On-Line Applications Research Corporation (OAR).
* All rights assigned to U.S. Government, 1994.
* Copyright assigned to U.S. Government, 1994.
*
* This material may be reproduced by or for the U.S. Government pursuant
* to the copyright license under the clause at DFARS 252.227-7013. This
* notice must appear in all copies of this file and its derivatives.
* The license and distribution terms for this file may be
* found in found in the file LICENSE in this distribution or at
* http://www.OARcorp.com/rtems/license.html.
*
* $Id$
*/

View File

@@ -3,13 +3,13 @@
* This file implements a benchmark timer using the General Purpose Timer on
* the MEC.
*
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
* COPYRIGHT (c) 1989-1998.
* On-Line Applications Research Corporation (OAR).
* All rights assigned to U.S. Government, 1994.
* Copyright assigned to U.S. Government, 1994.
*
* This material may be reproduced by or for the U.S. Government pursuant
* to the copyright license under the clause at DFARS 252.227-7013. This
* notice must appear in all copies of this file and its derivatives.
* The license and distribution terms for this file may be
* found in found in the file LICENSE in this distribution or at
* http://www.OARcorp.com/rtems/license.html.
*
* Ported to ERC32 implementation of the SPARC by On-Line Applications
* Research Corporation (OAR) under contract to the European Space

View File

@@ -2,6 +2,14 @@
#
# Shell script to ease invocation of the powerpc simulator
#
# COPYRIGHT (c) 1989-1998.
# On-Line Applications Research Corporation (OAR).
# Copyright assigned to U.S. Government, 1994.
#
# The license and distribution terms for this file may be
# found in found in the file LICENSE in this distribution or at
# http://www.OARcorp.com/rtems/license.html.
#
# $Id$
#

View File

@@ -1,12 +1,20 @@
#!/bin/sh -p
#
# $Id$
#
# Run rtems tests on the powerpc simulator
# This program generates a simulator script to run each test
# Typically the test is then run, although it can be generated
# and left as a file using -s
#
# COPYRIGHT (c) 1989-1998.
# On-Line Applications Research Corporation (OAR).
# Copyright assigned to U.S. Government, 1994.
#
# The license and distribution terms for this file may be
# found in found in the file LICENSE in this distribution or at
# http://www.OARcorp.com/rtems/license.html.
#
# $Id$
#
# progname=`basename $0`
progname=${0##*/} # fast basename hack for ksh, bash

View File

@@ -1,8 +1,17 @@
/* vectors.s 1.1 - 95/12/04
*
* This file contains the assembly code for the PowerPC
* interrupt veneers for RTEMS.
* interrupt vectors for RTEMS.
*
* COPYRIGHT (c) 1989-1998.
* On-Line Applications Research Corporation (OAR).
* Copyright assigned to U.S. Government, 1994.
*
* The license and distribution terms for this file may be
* found in found in the file LICENSE in this distribution or at
* http://www.OARcorp.com/rtems/license.html.
*
* $Id$
*/
/*
@@ -21,8 +30,6 @@
* The variable 'PPC_VECTOR_FILE_BASE' must be defined to be the
* offset from 0x????0000 to the first location in the file. This
* will usually be 0x0000 or 0x0100.
*
* $Id$
*/
#include "asm.h"

View File

@@ -11,7 +11,7 @@ PROJECT_ROOT = @PROJECT_ROOT@
PGM=${ARCH}/startup.rel
# C source names, if any, go here -- minus the .c
C_PIECES=bsppost bspstart bspclean sbrk setvec main
C_PIECES=bsplibc bsppost bspstart bspclean sbrk setvec main
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)

View File

@@ -1,14 +1,9 @@
/* bsp_start()
*
/*
* This routine starts the application. It includes application,
* board, and monitor specific initialization and configuration.
* The generic CPU dependent initialization has been performed
* before this routine is invoked.
*
* INPUT: NONE
*
* OUTPUT: NONE
*
* Authors: Ralf Corsepius (corsepiu@faw.uni-ulm.de) and
* Bernd Becker (becker@faw.uni-ulm.de)
*
@@ -50,39 +45,12 @@ rtems_cpu_table Cpu_table;
char *rtems_progname;
/* Initialize whatever libc we are using
* called from postdriver hook
/*
* Use the shared implementations of the following routines
*/
void bsp_libc_init()
{
/*
* The last parameter to RTEMS_Malloc_Initialize is the "chunk"
* size which a multiple of will be requested on each sbrk()
* call by malloc(). A value of 0 indicates that sbrk() should
* not be called to extend the heap.
*/
RTEMS_Malloc_Initialize(&HeapStart, sizeof(unsigned32) * (&HeapEnd - &HeapStart), 0);
/*
* Init the RTEMS libio facility to provide UNIX-like system
* calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc)
* Uses malloc() to get area for the iops, so must be after malloc init
*/
rtems_libio_init();
/*
* Set up for the libc handling.
*/
if (BSP_Configuration.ticks_per_timeslice > 0)
libc_init(1); /* reentrant if possible */
else
libc_init(0); /* non-reentrant */
}
void bsp_postdriver_hook(void);
void bsp_libc_init( void *, unsigned32, int );
/*
* Function: bsp_pretasking_hook
@@ -97,10 +65,9 @@ void bsp_libc_init()
*
*/
void
bsp_pretasking_hook(void)
void bsp_pretasking_hook(void)
{
bsp_libc_init();
bsp_libc_init((&HeapStart, sizeof(unsigned32) * (&HeapEnd - &HeapStart), 0);
#ifdef RTEMS_DEBUG
rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
@@ -108,12 +75,11 @@ bsp_pretasking_hook(void)
}
/*
* Use the shared bsp_postdriver_hook() implementation
* bsp_start
*
* This routine does the bulk of the system initialization.
*/
void bsp_postdriver_hook(void);
void bsp_start(void)
{
/*

View File

@@ -11,7 +11,7 @@ PROJECT_ROOT = @PROJECT_ROOT@
PGM=${ARCH}/startup.rel
# C source names, if any, go here -- minus the .c
C_PIECES=bspclean bsppost bspstart main sbrk setvec spurious
C_PIECES=bspclean bsplibc bsppost bspstart main sbrk setvec spurious
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)

View File

@@ -1,12 +1,9 @@
/* bspstart.c
*
/*
* This set of routines starts the application. It includes application,
* board, and monitor specific initialization and configuration.
* The generic CPU dependent initialization has been performed
* before any of these are invoked.
*
* Called by RTEMS::RTEMS constructor in rtems-ctor.cc
*
* COPYRIGHT (c) 1989-1998.
* On-Line Applications Research Corporation (OAR).
* Copyright assigned to U.S. Government, 1994.
@@ -41,7 +38,6 @@ extern rtems_configuration_table Configuration;
rtems_configuration_table BSP_Configuration;
rtems_cpu_table Cpu_table;
rtems_unsigned32 bsp_isr_level;
/*
* Tells us where to put the workspace in case remote debugger is present.
@@ -72,9 +68,10 @@ rtems_unsigned32 CPU_SPARC_CLICKS_PER_TICK;
* approximately 5 seconds of wall time.
*/
rtems_extension
fast_idle_switch_hook(rtems_tcb *current_task,
rtems_tcb *heir_task)
rtems_extension fast_idle_switch_hook(
rtems_tcb *current_task,
rtems_tcb *heir_task
)
{
static rtems_unsigned32 normal_clock = ~0;
static rtems_unsigned32 fast_clock;
@@ -101,12 +98,20 @@ fast_idle_switch_hook(rtems_tcb *current_task,
#endif
/*
* bsp_libc_init
*
* Initialize whatever libc we are using called from bsp_postdriver_hook.
* Use the shared implementations of the following routines
*/
void bsp_libc_init(void)
void bsp_postdriver_hook(void);
void bsp_libc_init( void *, unsigned32, int );
/*
* bsp_pretasking_hook
*
* BSP pretasking hook. Called just before drivers are initialized.
* Used to setup libc and install any BSP extensions.
*/
void bsp_pretasking_hook(void)
{
extern int end;
rtems_unsigned32 heap_start;
@@ -119,38 +124,8 @@ void bsp_libc_init(void)
heap_size = BSP_Configuration.work_space_start - (void *)&end;
heap_size &= 0xfffffff0; /* keep it as a multiple of 16 bytes */
RTEMS_Malloc_Initialize((void *) heap_start, heap_size, 0);
bsp_libc_init((void *) heap_start, heap_size, 0);
/*
* Init the RTEMS libio facility to provide UNIX-like system
* calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc)
* Uses malloc() to get area for the iops, so must be after malloc init
*/
rtems_libio_init();
/*
* Set up for the libc handling.
*/
if (BSP_Configuration.ticks_per_timeslice > 0)
libc_init(1); /* reentrant if possible */
else
libc_init(0); /* non-reentrant */
}
/*
* bsp_pretasking_hook
*
* BSP pretasking hook. Called just before drivers are initialized.
* Used to setup libc and install any BSP extensions.
*/
void bsp_pretasking_hook(void)
{
bsp_libc_init();
#if SIMSPARC_FAST_IDLE
/*
@@ -188,13 +163,6 @@ void bsp_pretasking_hook(void)
}
/*
* Use the shared bsp_postdriver_hook() implementation
*/
void bsp_postdriver_hook(void);
/*
* bsp_start
*

View File

@@ -12,7 +12,7 @@ PGM=${ARCH}/startup.rel
NO_CTOR_LIB=${ARCH}/libno-ctor.a
# C source names, if any, go here -- minus the .c
C_PIECES=bspclean bspstart setvec
C_PIECES=bspclean bsplibc bspstart setvec
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)

View File

@@ -1,5 +1,4 @@
/* bsp_start()
*
/*
* This routine starts the application. It includes application,
* board, and monitor specific initialization and configuration.
* The generic CPU dependent initialization has been performed
@@ -7,10 +6,6 @@
*
* Called by RTEMS::RTEMS constructor in startup-ctor.cc
*
* INPUT: NONE
*
* OUTPUT: NONE
*
* COPYRIGHT (c) 1989-1998.
* On-Line Applications Research Corporation (OAR).
* Copyright assigned to U.S. Government, 1994.
@@ -68,32 +63,26 @@ char **rtems_argv;
rtems_unsigned32 CPU_CLICKS_PER_TICK;
/*
* Function: bsp_libc_init
* Created: 94/12/6
*
* Description:
* Initialize whatever libc we are using
* called from bsp_postdriver_hook
*
*
* Parameters:
* none
*
* Returns:
* none.
*
* Side Effects:
*
*
* Notes:
*
* Deficiencies/ToDo:
*
*
* Use the shared implementations of the following routines
*/
void
bsp_libc_init(void)
void bsp_postdriver_hook(void);
void bsp_libc_init( void *, unsigned32, int );
/*
* Function: bsp_pretasking_hook
* Created: 95/03/10
*
* Description:
* BSP pretasking hook. Called just before drivers are initialized.
* Used to setup libc and install any BSP extensions.
*
* NOTES:
* Must not use libc (to do io) from here, since drivers are
* not yet initialized.
*/
void bsp_pretasking_hook(void)
{
void *heap_start;
@@ -104,50 +93,8 @@ bsp_libc_init(void)
heap_start = 0;
RTEMS_Malloc_Initialize((void *)heap_start, Heap_size, 1024 * 1024);
bsp_libc_init((void *)heap_start, Heap_size, 1024 * 1024);
/*
* Init the RTEMS libio facility to provide UNIX-like system
* calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc)
* Uses malloc() to get area for the iops, so must be after malloc init
*/
rtems_libio_init();
libc_init(1);
}
/*
* Function: bsp_pretasking_hook
* Created: 95/03/10
*
* Description:
* BSP pretasking hook. Called just before drivers are initialized.
* Used to setup libc and install any BSP extensions.
*
* Parameters:
* none
*
* Returns:
* nada
*
* Side Effects:
* installs a few extensions
*
* Notes:
* Must not use libc (to do io) from here, since drivers are
* not yet initialized.
*
* Deficiencies/ToDo:
*
*
*/
void
bsp_pretasking_hook(void)
{
bsp_libc_init();
#ifdef RTEMS_DEBUG
rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
@@ -165,40 +112,18 @@ bsp_pretasking_hook(void)
* DO NOT Use the shared bsp_postdriver_hook() implementation
*/
void
bsp_postdriver_hook(void)
void bsp_postdriver_hook(void)
{
return;
}
/*
* Function: bsp_start
* Created: 94/12/6
*
* Description:
* called by crt0 as our "main" equivalent
*
*
*
* Parameters:
*
*
* Returns:
*
*
* Side Effects:
*
*
* Notes:
*
*
* Deficiencies/ToDo:
*
* bsp_start
*
* This routine does the bulk of the system initialization.
*/
void
bsp_start(void)
void bsp_start(void)
{
unsigned32 workspace_ptr;