From b6394ae43432a3c69f1737d1ed1e23db8e7896ba Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 15 Apr 1998 15:13:01 +0000 Subject: Transitioned to shared bsp_libc_init() and cleaned up comments. --- c/src/lib/libbsp/powerpc/psim/clock/clock.c | 10 ++-- c/src/lib/libbsp/powerpc/psim/include/bsp.h | 10 ++-- c/src/lib/libbsp/powerpc/psim/include/coverhd.h | 10 ++-- c/src/lib/libbsp/powerpc/psim/shmsupp/README | 3 +- c/src/lib/libbsp/powerpc/psim/shmsupp/addrconv.c | 6 +- c/src/lib/libbsp/powerpc/psim/shmsupp/getcfg.c | 6 +- c/src/lib/libbsp/powerpc/psim/startup/Makefile.in | 2 +- c/src/lib/libbsp/powerpc/psim/startup/bspstart.c | 73 +++++++---------------- c/src/lib/libbsp/powerpc/psim/startup/linkcmds | 13 ++++ c/src/lib/libbsp/powerpc/psim/startup/setvec.c | 10 ++-- c/src/lib/libbsp/powerpc/psim/timer/timer.c | 10 ++-- c/src/lib/libbsp/powerpc/psim/tools/psim | 8 +++ c/src/lib/libbsp/powerpc/psim/tools/runtest | 12 +++- c/src/lib/libbsp/powerpc/psim/vectors/vectors.s | 13 +++- 14 files changed, 96 insertions(+), 90 deletions(-) (limited to 'c/src/lib/libbsp/powerpc/psim') diff --git a/c/src/lib/libbsp/powerpc/psim/clock/clock.c b/c/src/lib/libbsp/powerpc/psim/clock/clock.c index cc57e3ed7d..282820fafe 100644 --- a/c/src/lib/libbsp/powerpc/psim/clock/clock.c +++ b/c/src/lib/libbsp/powerpc/psim/clock/clock.c @@ -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$ */ diff --git a/c/src/lib/libbsp/powerpc/psim/include/bsp.h b/c/src/lib/libbsp/powerpc/psim/include/bsp.h index f600579b00..28de2d66dd 100644 --- a/c/src/lib/libbsp/powerpc/psim/include/bsp.h +++ b/c/src/lib/libbsp/powerpc/psim/include/bsp.h @@ -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$ */ diff --git a/c/src/lib/libbsp/powerpc/psim/include/coverhd.h b/c/src/lib/libbsp/powerpc/psim/include/coverhd.h index 4a2fe8b24b..cc279ea56f 100644 --- a/c/src/lib/libbsp/powerpc/psim/include/coverhd.h +++ b/c/src/lib/libbsp/powerpc/psim/include/coverhd.h @@ -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$ */ diff --git a/c/src/lib/libbsp/powerpc/psim/shmsupp/README b/c/src/lib/libbsp/powerpc/psim/shmsupp/README index 3c82078bac..f355851c74 100644 --- a/c/src/lib/libbsp/powerpc/psim/shmsupp/README +++ b/c/src/lib/libbsp/powerpc/psim/shmsupp/README @@ -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. diff --git a/c/src/lib/libbsp/powerpc/psim/shmsupp/addrconv.c b/c/src/lib/libbsp/powerpc/psim/shmsupp/addrconv.c index 3e1f16ec81..05c0b6f6c1 100644 --- a/c/src/lib/libbsp/powerpc/psim/shmsupp/addrconv.c +++ b/c/src/lib/libbsp/powerpc/psim/shmsupp/addrconv.c @@ -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$ diff --git a/c/src/lib/libbsp/powerpc/psim/shmsupp/getcfg.c b/c/src/lib/libbsp/powerpc/psim/shmsupp/getcfg.c index 5f94744a2f..fa37ceb7fa 100644 --- a/c/src/lib/libbsp/powerpc/psim/shmsupp/getcfg.c +++ b/c/src/lib/libbsp/powerpc/psim/shmsupp/getcfg.c @@ -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$ diff --git a/c/src/lib/libbsp/powerpc/psim/startup/Makefile.in b/c/src/lib/libbsp/powerpc/psim/startup/Makefile.in index b7b98d2278..8ae332fa12 100644 --- a/c/src/lib/libbsp/powerpc/psim/startup/Makefile.in +++ b/c/src/lib/libbsp/powerpc/psim/startup/Makefile.in @@ -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) diff --git a/c/src/lib/libbsp/powerpc/psim/startup/bspstart.c b/c/src/lib/libbsp/powerpc/psim/startup/bspstart.c index e5ce965b43..9deea041c6 100644 --- a/c/src/lib/libbsp/powerpc/psim/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/psim/startup/bspstart.c @@ -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 + * Use the shared implementations of the following routines + */ + +void bsp_postdriver_hook(void); +void bsp_libc_init( void *, unsigned32, int ); + +/* + * bsp_pretasking_hook * - * Initialize whatever libc we are using called from bsp_postdriver_hook. + * BSP pretasking hook. Called just before drivers are initialized. + * Used to setup libc and install any BSP extensions. */ -void bsp_libc_init(void) +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 * diff --git a/c/src/lib/libbsp/powerpc/psim/startup/linkcmds b/c/src/lib/libbsp/powerpc/psim/startup/linkcmds index 467d982812..c43cbee273 100644 --- a/c/src/lib/libbsp/powerpc/psim/startup/linkcmds +++ b/c/src/lib/libbsp/powerpc/psim/startup/linkcmds @@ -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) diff --git a/c/src/lib/libbsp/powerpc/psim/startup/setvec.c b/c/src/lib/libbsp/powerpc/psim/startup/setvec.c index efb3e9d8e0..dcdd94c665 100644 --- a/c/src/lib/libbsp/powerpc/psim/startup/setvec.c +++ b/c/src/lib/libbsp/powerpc/psim/startup/setvec.c @@ -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$ */ diff --git a/c/src/lib/libbsp/powerpc/psim/timer/timer.c b/c/src/lib/libbsp/powerpc/psim/timer/timer.c index 43c71103c1..7214de8232 100644 --- a/c/src/lib/libbsp/powerpc/psim/timer/timer.c +++ b/c/src/lib/libbsp/powerpc/psim/timer/timer.c @@ -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 diff --git a/c/src/lib/libbsp/powerpc/psim/tools/psim b/c/src/lib/libbsp/powerpc/psim/tools/psim index 8ff6b7337c..abd80cbe08 100755 --- a/c/src/lib/libbsp/powerpc/psim/tools/psim +++ b/c/src/lib/libbsp/powerpc/psim/tools/psim @@ -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$ # diff --git a/c/src/lib/libbsp/powerpc/psim/tools/runtest b/c/src/lib/libbsp/powerpc/psim/tools/runtest index eea6b2ac6a..f0aeae0268 100755 --- a/c/src/lib/libbsp/powerpc/psim/tools/runtest +++ b/c/src/lib/libbsp/powerpc/psim/tools/runtest @@ -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 diff --git a/c/src/lib/libbsp/powerpc/psim/vectors/vectors.s b/c/src/lib/libbsp/powerpc/psim/vectors/vectors.s index 3384e9929e..448e9117e2 100644 --- a/c/src/lib/libbsp/powerpc/psim/vectors/vectors.s +++ b/c/src/lib/libbsp/powerpc/psim/vectors/vectors.s @@ -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" -- cgit v1.2.3