diff options
Diffstat (limited to 'c/src/lib/libbsp/powerpc/papyrus')
7 files changed, 43 insertions, 22 deletions
diff --git a/c/src/lib/libbsp/powerpc/papyrus/dlentry/dlentry.s b/c/src/lib/libbsp/powerpc/papyrus/dlentry/dlentry.s index c159401474..e5df33a114 100644 --- a/c/src/lib/libbsp/powerpc/papyrus/dlentry/dlentry.s +++ b/c/src/lib/libbsp/powerpc/papyrus/dlentry/dlentry.s @@ -3,7 +3,7 @@ * This file contains the entry veneer for RTEMS programs * downloaded to Papyrus. * - * Author: Andrew Bray <andy@i-cubed.demon.co.uk> + * Author: Andrew Bray <andy@i-cubed.co.uk> * * COPYRIGHT (c) 1995 by i-cubed ltd. * @@ -223,8 +223,8 @@ bss_addr: stw r3, 4(r1) stw r3, 8(r1) stw r3, 12(r1) - .extern .main - b .main /* call the first C routine */ + .extern SYM (main) + b SYM (main) /* call the first C routine */ /*------------------------------------------------------------------------------- * bssclr. diff --git a/c/src/lib/libbsp/powerpc/papyrus/flashentry/flashentry.s b/c/src/lib/libbsp/powerpc/papyrus/flashentry/flashentry.s index ef5bf49e42..a6a8f5ff86 100644 --- a/c/src/lib/libbsp/powerpc/papyrus/flashentry/flashentry.s +++ b/c/src/lib/libbsp/powerpc/papyrus/flashentry/flashentry.s @@ -3,7 +3,7 @@ * This file contains the entry veneer for RTEMS programs * stored in Papyrus' flash ROM. * - * Author: Andrew Bray <andy@i-cubed.demon.co.uk> + * Author: Andrew Bray <andy@i-cubed.co.uk> * * COPYRIGHT (c) 1995 by i-cubed ltd. * @@ -230,8 +230,10 @@ bss_addr: *----------------------------------------------------------------------*/ addis r2,r0,0x8000 addi r2,r2,0x0001 - mticcr r2 - mtdccr r2 + + mtspr 0x3fb, r2 /* ICCR */ + mtspr 0x3fa, r2 /* DCCR */ + /*----------------------------------------------------------------------- * C_setup. *----------------------------------------------------------------------*/ @@ -243,8 +245,8 @@ bss_addr: stw r3, 4(r1) stw r3, 8(r1) stw r3, 12(r1) - .extern .main - b .main /* call the first C routine */ + .extern SYM (main) + b SYM (main) /* call the first C routine */ /*------------------------------------------------------------------------------- * Rom2ram. diff --git a/c/src/lib/libbsp/powerpc/papyrus/include/bsp.h b/c/src/lib/libbsp/powerpc/papyrus/include/bsp.h index 6518be25c1..4025a8796e 100644 --- a/c/src/lib/libbsp/powerpc/papyrus/include/bsp.h +++ b/c/src/lib/libbsp/powerpc/papyrus/include/bsp.h @@ -2,7 +2,7 @@ * * This include file contains all Papyrus board IO definitions. * - * Author: Andrew Bray <andy@i-cubed.demon.co.uk> + * Author: Andrew Bray <andy@i-cubed.co.uk> * * COPYRIGHT (c) 1995 by i-cubed ltd. * @@ -44,6 +44,9 @@ extern "C" { #else #include <rtems.h> #include <console.h> +#include <clockdrv.h> +#include <console.h> +#include <iosupp.h> /* * Define the time limits for RTEMS Test Suite test durations. @@ -56,6 +59,7 @@ extern "C" { #define MAX_LONG_TEST_DURATION 300 /* 5 minutes = 300 seconds */ #define MAX_SHORT_TEST_DURATION 3 /* 3 seconds */ + /* * Stuff for Time Test 27 */ @@ -78,18 +82,30 @@ extern "C" { #define delay( microseconds ) \ { \ unsigned32 start, ticks, now; \ - asm volatile ("mftblo %0" : "=r" (start)); \ + asm volatile ("mfspr %0, 0x3dd" : "=r" (start)); /* TBLO */ \ ticks = (microseconds) * Cpu_table.clicks_per_usec; \ do \ - asm volatile ("mftblo %0" : "=r" (now)); \ + asm volatile ("mfspr %0, 0x3dd" : "=r" (now)); /* TBLO */ \ while (now - start < ticks); \ } + /* Constants */ #define RAM_START 0 #define RAM_END 0x00200000 + +/* Some useful LED debugging bits */ +/* LED numbers are from 0-2 */ +#define __led_base ((volatile int *)0x7F200000) + +/* Turn a LED on */ +#define led_on(n) (__led_base[n] = 0) + +/* Turn a LED off */ +#define led_off(n) (__led_base[n] = 1) + /* miscellaneous stuff assumed to exist */ extern rtems_configuration_table BSP_Configuration; /* owned by BSP */ @@ -98,7 +114,7 @@ extern rtems_cpu_table Cpu_table; /* owned by BSP */ /* * Device Driver Table Entries */ - + /* * NOTE: Use the standard Console driver entry */ @@ -106,16 +122,21 @@ extern rtems_cpu_table Cpu_table; /* owned by BSP */ /* * NOTE: Use the standard Clock driver entry */ - + /* * How many libio files we want */ - + #define BSP_LIBIO_MAX_FDS 20 /* functions */ -void bsp_start( void ); +int bsp_start( + int argc, + char **argv, + char **environp +); + void bsp_cleanup( void ); rtems_isr_entry set_vector( /* returns old vector */ diff --git a/c/src/lib/libbsp/powerpc/papyrus/include/coverhd.h b/c/src/lib/libbsp/powerpc/papyrus/include/coverhd.h index 5a311bef0a..71684ad0d5 100644 --- a/c/src/lib/libbsp/powerpc/papyrus/include/coverhd.h +++ b/c/src/lib/libbsp/powerpc/papyrus/include/coverhd.h @@ -26,7 +26,7 @@ */ /* - * Updated for a 25MHz Papyrus by Andrew Bray <andy@i-cubed.demon.co.uk> + * Updated for a 25MHz Papyrus by Andrew Bray <andy@i-cubed.co.uk> * * Units are 100ns. * diff --git a/c/src/lib/libbsp/powerpc/papyrus/startup/bspclean.c b/c/src/lib/libbsp/powerpc/papyrus/startup/bspclean.c index a03ad3024f..eab849d5e1 100644 --- a/c/src/lib/libbsp/powerpc/papyrus/startup/bspclean.c +++ b/c/src/lib/libbsp/powerpc/papyrus/startup/bspclean.c @@ -7,7 +7,7 @@ * * OUTPUT: NONE * - * Author: Andrew Bray <andy@i-cubed.demon.co.uk> + * Author: Andrew Bray <andy@i-cubed.co.uk> * * COPYRIGHT (c) 1995 by i-cubed ltd. * diff --git a/c/src/lib/libbsp/powerpc/papyrus/startup/bspstart.c b/c/src/lib/libbsp/powerpc/papyrus/startup/bspstart.c index b044367f43..9629737dd9 100644 --- a/c/src/lib/libbsp/powerpc/papyrus/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/papyrus/startup/bspstart.c @@ -9,7 +9,7 @@ * * OUTPUT: NONE * - * Author: Andrew Bray <andy@i-cubed.demon.co.uk> + * Author: Andrew Bray <andy@i-cubed.co.uk> * * COPYRIGHT (c) 1995 by i-cubed ltd. * @@ -166,7 +166,7 @@ bsp_postdriver_hook(void) rtems_fatal_error_occurred( error_code | 'I' << 8 | 'O' ); } -int main( +int bsp_start( int argc, char **argv, char **environp @@ -225,8 +225,6 @@ int main( * not malloc'ed. It is just "pulled from the air". */ -/*BSP_Configuration.work_space_size *= 4;*/ - BSP_Configuration.work_space_start = (void *) RAM_END - BSP_Configuration.work_space_size; diff --git a/c/src/lib/libbsp/powerpc/papyrus/startup/setvec.c b/c/src/lib/libbsp/powerpc/papyrus/startup/setvec.c index e1bb7ac4a5..efb3e9d8e0 100644 --- a/c/src/lib/libbsp/powerpc/papyrus/startup/setvec.c +++ b/c/src/lib/libbsp/powerpc/papyrus/startup/setvec.c @@ -12,7 +12,7 @@ * RETURNS: * address of previous interrupt handler * - * Author: Andrew Bray <andy@i-cubed.demon.co.uk> + * Author: Andrew Bray <andy@i-cubed.co.uk> * * COPYRIGHT (c) 1995 by i-cubed ltd. * |