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

4.104.114.84.95
Last change on this file since a2016b99 was 03f2154e, checked in by Joel Sherrill <joel.sherrill@…>, on 04/22/97 at 17:20:27

headers updated to reflect new style copyright notice as part
of switching to the modified GNU GPL.

  • Property mode set to 100644
File size: 1.9 KB
RevLine 
[ac7d5ef0]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 *
[03f2154e]16 *  COPYRIGHT (c) 1989-1997.
[ac7d5ef0]17 *  On-Line Applications Research Corporation (OAR).
[03f2154e]18 *  Copyright assigned to U.S. Government, 1994.
[ac7d5ef0]19 *
[03f2154e]20 *  The license and distribution terms for this file may in
21 *  the file LICENSE in this distribution or at
22 *  http://www.OARcorp.com/rtems/license.html.
[ac7d5ef0]23 *
24 *  $Id$
25 */
26
[0b8b971]27#include <bsp.h>
[ac7d5ef0]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    {
[11290355]58        pxfl_interrupt_install(handler,
59                               vector - HPPA_INTERRUPT_BSP_BASE,
60                               (rtems_isr_entry *) &previous_isr);
[ac7d5ef0]61    }
62#endif
63
64    return previous_isr;
65}
66
Note: See TracBrowser for help on using the repository browser.