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

4.104.114.84.95
Last change on this file since 5626be2 was 5626be2, checked in by Joel Sherrill <joel.sherrill@…>, on Sep 4, 2003 at 6:51:16 PM

2003-09-04 Joel Sherrill <joel@…>

  • include/bsp.h, shmsupp/addrconv.c, shmsupp/cause_intr.c, shmsupp/getcfg.c, shmsupp/lock.c, shmsupp/mpisr.c, startup/bspclean.c, startup/bspstart.c, startup/setvec.c, tools/print_dump.c, tty/tty.c: URL for license changed.
  • Property mode set to 100644
File size: 1.8 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-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.rtems.com/license/LICENSE.
22 *
23 *  $Id$
24 */
25
26#include <bsp.h>
27
28/*
29 * Install an interrupt handler in the right place
30 * given its vector number from cpu/hppa.h
31 * There are 2 places an interrupt can be installed
32 *      _ISR_Vector_table
33 *      bsp interrupt      XXX: nyi
34 *
35 * We decide which based on the vector number
36 */
37
38rtems_isr_entry
39set_vector(                                     /* returns old vector */
40    rtems_isr_entry     handler,                /* isr routine        */
41    rtems_vector_number vector,                 /* vector number      */
42    int                 type                    /* RTEMS or RAW intr  */
43)
44{
45    rtems_isr_entry previous_isr;
46
47    /* is it an on chip interrupt? */
48    /* XXX this should say CPU_INTERRUPT_NUMBER_OF_VECTORS */
49    if (vector < HPPA_INTERRUPT_MAX)
50    {
51        rtems_interrupt_catch(handler, vector, &previous_isr);
52    }
53#if 0   /* XXX */
54    else if ((vector >= HPPA_INTERRUPT_BSP_BASE) &&
55             (vector < (HPPA_INTERRUPT_BSP_BASE + HPPA_BSP_INTERRUPTS)))
56    {
57        pxfl_interrupt_install(handler,
58                               vector - HPPA_INTERRUPT_BSP_BASE,
59                               (rtems_isr_entry *) &previous_isr);
60    }
61#endif
62
63    return previous_isr;
64}
65
Note: See TracBrowser for help on using the repository browser.