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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [lib/] [libbsp/] [powerpc/] [score603e/] [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 target Board/CPU.
4
 *  This routine is allowed to be as board dependent as necessary.
5
 *
6
 *  INPUT:
7
 *    handler - interrupt handler entry point
8
 *    vector  - vector number
9
 *    type    - 0 indicates raw hardware connect
10
 *              1 indicates RTEMS interrupt connect
11
 *
12
 *  RETURNS:
13
 *    address of previous interrupt handler
14
 *
15
 *  Author:     Andrew Bray <andy@i-cubed.co.uk>
16
 *
17
 *  COPYRIGHT (c) 1995 by i-cubed ltd.
18
 *
19
 *  To anyone who acknowledges that this file is provided "AS IS"
20
 *  without any express or implied warranty:
21
 *      permission to use, copy, modify, and distribute this file
22
 *      for any purpose is hereby granted without fee, provided that
23
 *      the above copyright notice and this notice appears in all
24
 *      copies, and that the name of i-cubed limited not be used in
25
 *      advertising or publicity pertaining to distribution of the
26
 *      software without specific, written prior permission.
27
 *      i-cubed limited makes no representations about the suitability
28
 *      of this software for any purpose.
29
 *
30
 *  Derived from c/src/lib/libbsp/no_cpu/no_bsp/startup/setvec.c:
31
 *
32
 *  COPYRIGHT (c) 1989-1997.
33
 *  On-Line Applications Research Corporation (OAR).
34
 *  Copyright assigned to U.S. Government, 1994.
35
 *
36
 *  The license and distribution terms for this file may in
37
 *  the file LICENSE in this distribution or at
38
 *  http://www.OARcorp.com/rtems/license.html.
39
 *
40
 *  $Id:
41
 */
42
 
43
#include <rtems.h>
44
#include <bsp.h>
45
 
46
 
47
/*
48
 *  This routine installs vector number vector.
49
 *
50
 */
51
rtems_isr_entry set_vector(                    /* returns old vector */
52
  rtems_isr_entry     handler,                  /* isr routine        */
53
  rtems_vector_number vector,                   /* vector number      */
54
  int                 type                      /* RTEMS or RAW intr  */
55
)
56
{
57
  rtems_isr_entry previous_isr;
58
  rtems_status_code status;
59
 
60
 
61
  /*
62
   * vectors greater than PPC603e_IRQ_LAST are handled by the General purpose
63
   * interupt handler.
64
   */
65
  if ( vector > PPC_IRQ_LAST )  {
66
    set_EE_vector( handler, vector );
67
  }
68
  else  {
69
    status = rtems_interrupt_catch(
70
       handler, vector, (rtems_isr_entry *) &previous_isr );
71
  }
72
  return previous_isr;
73
}

powered by: WebSVN 2.1.0

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