source: rtems/c/src/lib/libbsp/sparc/erc32/startup/setvec.c @ 2700423

4.104.114.84.95
Last change on this file since 2700423 was 2700423, checked in by Joel Sherrill <joel.sherrill@…>, on Nov 13, 2000 at 10:29:14 PM

2000-11-13 Jiri Gaisler <jgais@…>

  • Makefile.am, configure.in, gnatsupp/Makefile.am, gnatsupp/gnatsupp.c, include/Makefile.am, include/bsp.h, start/Makefile.am, startup/Makefile.am, startup/setvec.c, wrapup/Makefile.am:
  • erc32sonic: New directory.
  • erc32sonic/Makefile.am, erc32sonic/erc32sonic.c, erc32sonic/.cvsignore: New files.
  • include/erc32.h: New file.
  • startup/boardinit.S: New file. Big update of SPARC support for ERC32 and LEON. Added support for ERC32 without floating point. Added SONIC support as configured on Tharsys ERC32 board. The bsp's share various code in the shared directory:

gnat-support, start-up code, etc.

To decrease the foot-print, I removed the 16 kbyte start-up
stack that was put in .bss and never reused once the system
was up. The stack is now put between the heap and the
workspace. To reclaim it, the user can do a rtems_region_extend
to merge the stack to the heap region once the system is up.

  • Property mode set to 100644
File size: 1.8 KB
Line 
1/*  set_vector
2 *
3 *  This routine installs an interrupt vector on the SPARC simulator.
4 *
5 *  INPUT PARAMETERS:
6 *    handler - interrupt handler entry point
7 *    vector  - vector number
8 *    type    - 0 indicates raw hardware connect
9 *              1 indicates RTEMS interrupt connect
10 *
11 *  OUTPUT PARAMETERS:  NONE
12 *
13 *  RETURNS:
14 *    address of previous interrupt handler
15 *
16 *  COPYRIGHT (c) 1989-1999.
17 *  On-Line Applications Research Corporation (OAR).
18 *
19 *  The license and distribution terms for this file may be
20 *  found in the file LICENSE in this distribution or at
21 *  http://www.OARcorp.com/rtems/license.html.
22 *
23 *  Ported to ERC32 implementation of the SPARC by On-Line Applications
24 *  Research Corporation (OAR) under contract to the European Space
25 *  Agency (ESA).
26 *
27 *  ERC32 modifications of respective RTEMS file: COPYRIGHT (c) 1995.
28 *  European Space Agency.
29 *
30 *  $Id$
31 */
32
33#include <bsp.h>
34
35rtems_isr_entry set_vector(                   /* returns old vector */
36  rtems_isr_entry     handler,                /* isr routine        */
37  rtems_vector_number vector,                 /* vector number      */
38  int                 type                    /* RTEMS or RAW intr  */
39)
40{
41  rtems_isr_entry previous_isr;
42  unsigned32      real_trap;
43  unsigned32      source;
44
45  if ( type )
46    rtems_interrupt_catch( handler, vector, &previous_isr );
47  else 
48    _CPU_ISR_install_raw_handler( vector, handler, (void *)&previous_isr );
49
50  real_trap = SPARC_REAL_TRAP_NUMBER( vector );
51
52  if ( ERC32_Is_MEC_Trap( real_trap ) ) {
53   
54    source = ERC32_TRAP_SOURCE( real_trap );
55
56    ERC32_Clear_interrupt( source );
57    ERC32_Unmask_interrupt( source );
58  }
59
60  return previous_isr;
61}
62
63/* ERC32 power-down function */
64
65void _CPU_Thread_Idle_body( void )
66{
67  while (1) {
68    ERC32_MEC.Power_Down = 0;   /* value is irrelevant */
69  }
70}
71
Note: See TracBrowser for help on using the repository browser.