OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [lib/] [libbsp/] [hppa1.1/] [simhppa/] [startup/] [setvec.c] - Blame information for rev 173

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*  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.OARcorp.com/rtems/license.html.
22
 *
23
 *  $Id: setvec.c,v 1.2 2001-09-27 11:59:45 chris Exp $
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
 
38
rtems_isr_entry
39
set_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
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.