diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2004-09-29 17:25:02 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2004-09-29 17:25:02 +0000 |
commit | c774850d227c53c35d7c99ecb390e2f02113b0fb (patch) | |
tree | 5a40759b80ec1b595aa8f76c1855baaf1347921b /c/src/lib/libbsp/i960/cvme961/startup | |
parent | 2004-09-27 Greg Menke <gregory.menke@gsfc.nasa.gov> (diff) | |
download | rtems-c774850d227c53c35d7c99ecb390e2f02113b0fb.tar.bz2 |
2004-09-29 Joel Sherrill <joel@OARcorp.com>
* .cvsignore, ChangeLog, Makefile.am, acinclude.m4, configure.ac,
cvme961/.cvsignore, cvme961/ChangeLog, cvme961/Makefile.am,
cvme961/bsp_specs, cvme961/configure.ac, cvme961/times,
cvme961/clock/ckinit.c, cvme961/console/console.c,
cvme961/include/.cvsignore, cvme961/include/bsp.h,
cvme961/include/tm27.h, cvme961/shmsupp/addrconv.c,
cvme961/shmsupp/getcfg.c, cvme961/shmsupp/lock.c,
cvme961/shmsupp/mpisr.c, cvme961/start/start.S,
cvme961/startup/bspclean.c, cvme961/startup/bspstart.c,
cvme961/startup/exit.c, cvme961/startup/linkcmds,
cvme961/startup/setvec.c, cvme961/timer/timer.c,
cvme961/timer/timerisr.S, i960sim/.cvsignore, i960sim/ChangeLog,
i960sim/Makefile.am, i960sim/bsp_specs, i960sim/configure.ac,
i960sim/clock/clockdrv.c, i960sim/console/console-io.c,
i960sim/console/mon-syscalls.S, i960sim/include/.cvsignore,
i960sim/include/bsp.h, i960sim/include/tm27.h, i960sim/start/start.c,
i960sim/startup/bspstart.c, i960sim/startup/linkcmds,
rxgen960/.cvsignore, rxgen960/ChangeLog, rxgen960/Makefile.am,
rxgen960/README, rxgen960/bsp_specs, rxgen960/configure.ac,
rxgen960/clock/ckinit.c, rxgen960/console/concntl.h,
rxgen960/console/console.c, rxgen960/console/serial.c,
rxgen960/console/serial.h, rxgen960/include/.cvsignore,
rxgen960/include/bsp.h, rxgen960/include/rxgen960_config.h,
rxgen960/include/tm27.h, rxgen960/start/rxgen_romld.S,
rxgen960/startup/asmfault.S, rxgen960/startup/asmfault.h,
rxgen960/startup/asmstub.S, rxgen960/startup/asmstub.h,
rxgen960/startup/bspstart.c, rxgen960/startup/cntrltbl.c,
rxgen960/startup/cntrltbl.h, rxgen960/startup/dram.ld,
rxgen960/startup/exit.c, rxgen960/startup/fault.c,
rxgen960/startup/fault.h, rxgen960/startup/faultret.h,
rxgen960/startup/flttbl.c, rxgen960/startup/flttbl.h,
rxgen960/startup/frmstr.c, rxgen960/startup/frmstr.h,
rxgen960/startup/i960.h, rxgen960/startup/ihandler.S,
rxgen960/startup/ihandler.h, rxgen960/startup/intrtbl.c,
rxgen960/startup/intrtbl.h, rxgen960/startup/kkprintf.c,
rxgen960/startup/linkcmds, rxgen960/startup/linkcmds.real,
rxgen960/startup/main.h, rxgen960/startup/memchnl.h,
rxgen960/startup/nmi.c, rxgen960/startup/nulsystbl.c,
rxgen960/startup/pmc901_memmap.h, rxgen960/startup/prcb.c,
rxgen960/startup/prcb.h, rxgen960/startup/rom.ld,
rxgen960/startup/rom_cntrltbl.c, rxgen960/startup/rom_ibr.c,
rxgen960/startup/rom_ibr.h, rxgen960/startup/rom_prcb.c,
rxgen960/startup/rommon.h, rxgen960/startup/sctns.c,
rxgen960/startup/sctns.h, rxgen960/startup/setvec.c,
rxgen960/startup/systbl.c, rxgen960/startup/systbl.h,
rxgen960/startup/time.h, rxgen960/timer/timer.c,
rxgen960/timer/timerisr.S: Removed.
Diffstat (limited to 'c/src/lib/libbsp/i960/cvme961/startup')
-rw-r--r-- | c/src/lib/libbsp/i960/cvme961/startup/bspclean.c | 35 | ||||
-rw-r--r-- | c/src/lib/libbsp/i960/cvme961/startup/bspstart.c | 115 | ||||
-rw-r--r-- | c/src/lib/libbsp/i960/cvme961/startup/exit.c | 37 | ||||
-rw-r--r-- | c/src/lib/libbsp/i960/cvme961/startup/linkcmds | 82 | ||||
-rw-r--r-- | c/src/lib/libbsp/i960/cvme961/startup/setvec.c | 144 |
5 files changed, 0 insertions, 413 deletions
diff --git a/c/src/lib/libbsp/i960/cvme961/startup/bspclean.c b/c/src/lib/libbsp/i960/cvme961/startup/bspclean.c deleted file mode 100644 index e9b4e72e7f..0000000000 --- a/c/src/lib/libbsp/i960/cvme961/startup/bspclean.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * This routine is used to return control to the NINDY monitor - * and is automatically invoked at shutdown. - * - * NOTES: DOES NOT RETURN!!! - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -#include <rtems.h> -#include "bsp.h" - -void bsp_cleanup( void ) -{ - extern void start( void ); - - register volatile void *start_addr = 0; - - asm volatile( "mov 0,g0;" - "fmark ;" - "syncf ;" - ".word 0xfeedface ; " - "bx (%0)" : "=r" (start_addr) : "0" (start_addr) ); - /* The constant 0xfeedface is a magic word for break which - * is defined by NINDY. The branch extended restarts the - * application if the user types "go". - */ -} diff --git a/c/src/lib/libbsp/i960/cvme961/startup/bspstart.c b/c/src/lib/libbsp/i960/cvme961/startup/bspstart.c deleted file mode 100644 index 5a5bd86d32..0000000000 --- a/c/src/lib/libbsp/i960/cvme961/startup/bspstart.c +++ /dev/null @@ -1,115 +0,0 @@ -/* - * 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. - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -#include <string.h> - -#define C961_INIT - -#include <bsp.h> -#include <rtems/libio.h> -#include <rtems/libcsupport.h> - -/* - * The original table from the application and our copy of it with - * some changes. - */ - -extern rtems_configuration_table Configuration; - -rtems_configuration_table BSP_Configuration; - -rtems_cpu_table Cpu_table; - -char *rtems_progname; - -/* - * Use the shared implementations of the following routines - */ - -void bsp_postdriver_hook(void); -void bsp_libc_init( void *, uint32_t, 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; - uint32_t heap_start; - - heap_start = (uint32_t) &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 -} - -/* - * bsp_start - * - * This routine does the bulk of the system initialization. - */ - -void bsp_start( void ) -{ - /* set node number in SQSIO4 CTL REG */ - - *((uint32_t*)0xc00000b0) = - (Configuration.User_multiprocessing_table) ? - Configuration.User_multiprocessing_table->node : 0; - - Prcb = get_prcb(); - Ctl_tbl = Prcb->control_tbl; - - /* following configures the data breakpoint (which must be set - * before this is executed) to break on writes only. - */ - - Ctl_tbl->bpcon &= ~0x00cc0000; - i960_reload_ctl_group( 6 ); - - /* bit 31 of the Register Cache Control can be set to - * enable an alternative caching algorithm. It does - * not appear to help RTEMS. - */ - - /* Configure Number of Register Caches */ - - Prcb->reg_cache_cfg = 8; - i960_soft_reset( Prcb ); - - Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */ - Cpu_table.postdriver_hook = bsp_postdriver_hook; - Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY; - - BSP_Configuration.work_space_start = (void *) - (RAM_END - BSP_Configuration.work_space_size); -} diff --git a/c/src/lib/libbsp/i960/cvme961/startup/exit.c b/c/src/lib/libbsp/i960/cvme961/startup/exit.c deleted file mode 100644 index 7774967c42..0000000000 --- a/c/src/lib/libbsp/i960/cvme961/startup/exit.c +++ /dev/null @@ -1,37 +0,0 @@ -/* exit - * - * This routine is used to return control to the NINDY monitor - * and is automatically invoked by the STDIO exit() routine. - * - * INPUT: - * status - exit status - * - * OUTPUT: NONE - * - * NOTES: DOES NOT RETURN!!! - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -#include <rtems.h> -#include "bsp.h" - -void _exit( ) -{ - asm volatile( "mov 0,g0; \ - fmark ; \ - syncf ; \ - .word 0xfeedface ; \ - bx start" : : ); - /* The constant 0xfeedface is a magic word for break which - * is defined by NINDY. The branch extended restarts the - * application if the user types "go". - */ -} diff --git a/c/src/lib/libbsp/i960/cvme961/startup/linkcmds b/c/src/lib/libbsp/i960/cvme961/startup/linkcmds deleted file mode 100644 index e1c5041996..0000000000 --- a/c/src/lib/libbsp/i960/cvme961/startup/linkcmds +++ /dev/null @@ -1,82 +0,0 @@ -/* - * This file contains directives for the GNU linker which are specific - * to the Cyclone CVME960/CVME961 boards. - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -MEMORY - { - ram : org = 0x0, l = 1M - } - -SECTIONS -{ - .text 0x10000 : - { - text_start = . ; - _text_start = . ; - *(.text) - . = ALIGN (16); - - /* - * Special FreeBSD sysctl sections. - */ - . = ALIGN (16); - __start_set_sysctl_set = .; - *(set_sysctl_*); - __stop_set_sysctl_set = ABSOLUTE(.); - *(set_domain_*); - *(set_pseudo_*); - - *(.eh_fram) - *(.gnu.linkonce.t*) - - . = ALIGN (16); - - /* - * C++ constructors - */ - __CTOR_LIST__ = .; - LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2) - *(.ctors) - LONG(0) - __CTOR_END__ = .; - __DTOR_LIST__ = .; - LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2) - *(.dtors) - LONG(0) - __DTOR_END__ = .; - - _rodata_start = . ; - *(.rodata*) - *(.gnu.linkonce.r*) - _erodata = ALIGN( 0x10 ) ; - etext = ALIGN( 0x10 ) ; -/* _etext = .; -- conflicts */ - } - .data ADDR( .text ) + SIZEOF( .text ): - { - data_start = . ; - _data_start = .; - *(.data) - edata = ALIGN( 0x10 ) ; -/* _edata = .; -- conflicts */ - } - .bss ADDR( .data ) + SIZEOF( .data ): - { - bss_start = . ; - _bss_start = . ; - *(.bss) - *(COMMON) - end = . ; - _end = . ; - } -} diff --git a/c/src/lib/libbsp/i960/cvme961/startup/setvec.c b/c/src/lib/libbsp/i960/cvme961/startup/setvec.c deleted file mode 100644 index 0e88c4c2a5..0000000000 --- a/c/src/lib/libbsp/i960/cvme961/startup/setvec.c +++ /dev/null @@ -1,144 +0,0 @@ -/* set_vector - * - * This routine attempts to perform all "generic" interrupt initialization - * for the specified XINT line. It is specific to the Cyclone CVME961 in - * that it knows which interrupts are initialized by the monitor, the - * characteristics of XINT5 (VIC068 clock tick), and that it assumes the - * i960 is processing interrupts in dedicated mode. It attempts to map - * XINTs to interrupt vectors in a fairly straght forward way. - * - * XINT USE VECTOR INTR TBL INDEX TRIGGERED - * ==== ============= ====== ============== ========= - * 0 VMEbus ERROR 0x02 0x03 EDGE - * 1 DRAM PARITY 0x12 0x13 EDGE - * 2 Z8530 0x22 0x23 LEVEL - * 3 SQUALL 0 0x52 0x53 ---- - * 4 Z8536 (SQSIO4) 0x72 0x73 LEVEL - * 5 TICK 0x32 0x33 EDGE - * 6 VIC068 0x62 0x63 LEVEL - * 7 UNUSED 0x42 0x43 LEVEL - * - * The interrupt handler is installed in both the cached and memory - * resident interrupt tables. The appropriate IMAP register is updated to - * reflect the vector selected by this routine. Global interrupts are - * enabled. If XINT5 is being installed, places it in trigger mode. - * Finally, set_vector_support() is invoked to install the new IMAP and - * ICON, unmask the XINT in IMASK, and lower the i960's interrupt - * level to 0. - * - * INPUT: - * func - interrupt handler entry point - * xint - external interrupt line - * type - 0 indicates raw hardware connect - * 1 indicates RTEMS interrupt connect - * - * RETURNS: - * address of previous interrupt handler - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -#include <rtems.h> -#include <bsp.h> - -#include <stdio.h> - -void print_prcb(); -void print_intr_info(); -void print_ipnd_imsk(); - -unsigned int Xint_2_Group_Map[8] = { 0, 1, 2, 5, 7, 3, 6, 4 }; - -i960_isr_entry set_vector( /* returns old vector */ - rtems_isr_entry func, /* isr routine */ - unsigned int xint, /* XINT number */ - unsigned int type /* RTEMS or RAW */ -) -{ - i960_isr_entry *intr_tbl, *cached_intr_tbl; - i960_isr_entry saved_intr; - unsigned int vector, group, nibble; - unsigned int *imap; - - if ( xint > 7 ) - exit( 0x80 ); - - cached_intr_tbl = (i960_isr_entry *) 0; - intr_tbl = (i960_isr_entry *) Prcb->intr_tbl; - group = Xint_2_Group_Map[xint]; /* remap XINT to group */ - vector = (group << 4) + 2; /* direct vector num */ - - if ( type ) - rtems_interrupt_catch( func, vector, (rtems_isr_entry *) &saved_intr ); - else { - saved_intr = (i960_isr_entry) intr_tbl[ vector ]; - /* return old vector */ - intr_tbl[ vector + 1 ] = /* normal vector table */ - cached_intr_tbl[ group ] = (i960_isr_entry) func; /* cached vector */ - } - - if ( xint <= 3 ) imap = &Ctl_tbl->imap0; /* updating IMAP0 */ - else imap = &Ctl_tbl->imap1; /* updating IMAP1 */ - nibble = (xint % 4) * 4; - *imap &= ~(0xf << nibble); - *imap |= group << nibble; - - Ctl_tbl->icon &= ~0x00000400; /* enable global interrupts */ - Ctl_tbl->icon |= 0x00004000; /* fast sampling mode */ - switch ( xint ) { - case 0: Ctl_tbl->icon |= 0x00000004; break; - case 1: Ctl_tbl->icon |= 0x00000008; break; - case 2: Ctl_tbl->icon &= ~0x00000010; break; - case 4: Ctl_tbl->icon &= ~0x00000040; break; - case 5: Ctl_tbl->icon |= 0x00000080; break; - case 6: Ctl_tbl->icon &= ~0x00000100; break; - default: exit( 0x81 ); break; /* unsupported */ - } - - if ( xint == 4 ) { /* reprogram MCON for SQSIO4 */ - Ctl_tbl->mcon12 = 0x00002012; /* MCON12 - 0xCxxxxxxx */ - Ctl_tbl->mcon13 = 0x00000000; /* MCON13 - 0xDxxxxxxx */ - i960_reload_ctl_group( 5 ); /* update MCON12-MCON15 */ - } - - i960_unmask_intr( xint ); /* update IMSK */ - i960_reload_ctl_group( 1 ); /* update IMAP?/ICON */ - return( saved_intr ); /* return old vector */ -} - -void print_prcb() -{ - printf( "fault_table =0x%p\n", Prcb->fault_tbl ); - printf( "control_tbl =0x%p\n", Prcb->control_tbl ); - printf( "AC mask ov =0x%x\n", Prcb->initial_ac ); - printf( "fltconfig =0x%x\n", Prcb->fault_config ); - printf( "intr tbl =0x%p\n", Prcb->intr_tbl ); - printf( "systable =0x%p\n", Prcb->sys_proc_tbl ); - printf( "reserved =0x%x\n", Prcb->reserved ); - printf( "isr stk =0x%p\n", Prcb->intr_stack ); - printf( "ins cache =0x%x\n", Prcb->ins_cache_cfg ); - printf( "reg cache =0x%x\n", Prcb->reg_cache_cfg ); -} - -void print_intr_info() -{ - printf( "prcb =0x%p\n", Prcb ); - printf( "ctl_tbl =0x%p\n", Ctl_tbl ); - printf( "intr_tbl=0x%p\n", Prcb->intr_tbl ); - printf( "IMAP0 = 0x%x\n", Ctl_tbl->imap0 ); - printf( "IMAP1 = 0x%x\n", Ctl_tbl->imap1 ); - print_ipnd_imsk(); -} - -void print_ipnd_imsk() -{ - printf(" IPEND = 0x%x\n", i960_pend_intrs() ); - printf(" IMASK = 0x%x\n", i960_mask_intrs() ); -} |