source: rtems/c/src/lib/libbsp/hppa1.1/simhppa/startup/setvec.c @ 3652ad35

4.104.114.84.95
Last change on this file since 3652ad35 was 0b8b971, checked in by Joel Sherrill <joel.sherrill@…>, on 08/11/95 at 14:16:53

cleaned up include statements

  • Property mode set to 100644
File size: 2.0 KB
Line 
1/*  set_vector
2 *
3 *  This routine installs an interrupt vector on the HP PA-RISC simulator.
4 *
5 *  INPUT:
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 *  NOTE 'type' is ignored on hppa; all interrupts are owned by RTEMS
12 *
13 *  RETURNS:
14 *    address of previous interrupt handler
15 *
16 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
17 *  On-Line Applications Research Corporation (OAR).
18 *  All rights assigned to U.S. Government, 1994.
19 *
20 *  This material may be reproduced by or for the U.S. Government pursuant
21 *  to the copyright license under the clause at DFARS 252.227-7013.  This
22 *  notice must appear in all copies of this file and its derivatives.
23 *
24 *  $Id$
25 */
26
27#include <bsp.h>
28
29/*
30 * Install an interrupt handler in the right place
31 * given its vector number from cpu/hppa.h
32 * There are 2 places an interrupt can be installed
33 *      _ISR_Vector_table
34 *      bsp interrupt      XXX: nyi
35 *
36 * We decide which based on the vector number
37 */
38
39rtems_isr_entry
40set_vector(                                     /* returns old vector */
41    rtems_isr_entry     handler,                /* isr routine        */
42    rtems_vector_number vector,                 /* vector number      */
43    int                 type                    /* RTEMS or RAW intr  */
44)
45{
46    rtems_isr_entry previous_isr;
47
48    /* is it an on chip interrupt? */
49    /* XXX this should say CPU_INTERRUPT_NUMBER_OF_VECTORS */
50    if (vector < HPPA_INTERRUPT_MAX)
51    {
52        rtems_interrupt_catch(handler, vector, &previous_isr);
53    }
54#if 0   /* XXX */
55    else if ((vector >= HPPA_INTERRUPT_BSP_BASE) &&
56             (vector < (HPPA_INTERRUPT_BSP_BASE + HPPA_BSP_INTERRUPTS)))
57    {
58        simhppa_interrupt_install(handler,
59                                  vector - HPPA_INTERRUPT_BSP_BASE,
60                                  (rtems_isr_entry *) &previous_isr);
61    }
62#endif
63
64    return previous_isr;
65}
66
Note: See TracBrowser for help on using the repository browser.