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

4.104.114.84.95
Last change on this file since d637822 was 98e4ebf, checked in by Joel Sherrill <joel.sherrill@…>, on Oct 8, 1997 at 3:45:54 PM

Fixed typo in the pointer to the license terms.

  • Property mode set to 100644
File size: 1.9 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-1997.
17 *  On-Line Applications Research Corporation (OAR).
18 *  Copyright assigned to U.S. Government, 1994.
19 *
20 *  The license and distribution terms for this file may be
21 *  found in the file LICENSE in this distribution or at
22 *  http://www.OARcorp.com/rtems/license.html.
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        pxfl_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.