source: rtems/c/src/lib/libcpu/i960/i960rp/cpu_install_raw_isr.c @ 73b5bd5d

4.104.114.84.95
Last change on this file since 73b5bd5d was a4a1ccf, checked in by Ralf Corsepius <ralf.corsepius@…>, on 03/31/04 at 01:58:17

2004-03-30 Ralf Corsepius <ralf_corsepius@…>

  • i960ca/cpu_install_intr_stack.c, i960ca/cpu_install_raw_isr.c, i960ka/cpu_install_intr_stack.c, i960ka/cpu_install_raw_isr.c, i960rp/cpu_install_intr_stack.c, i960rp/cpu_install_raw_isr.c: Convert to using c99 fixed size types.
  • Property mode set to 100644
File size: 902 bytes
Line 
1/*
2 *  Install raw interrupt vector for i960RP
3 *
4 *  $Id$
5 */
6
7#include <rtems.h>
8#include <libcpu/i960RP.h>
9
10#define i960_vector_caching_enabled( _prcb ) \
11   ((*((unsigned int *) ICON_ADDR)) & 0x2000)
12
13extern i960_PRCB *Prcb;
14
15void _CPU_ISR_install_raw_handler(
16  uint32_t    vector,
17  proc_ptr    new_handler,
18  proc_ptr   *old_handler
19)
20{
21  i960_PRCB   *prcb = &Prcb;
22  proc_ptr    *cached_intr_tbl = NULL;
23
24  /*  The i80960RP does not support vectors 0-7.  The first 9 entries
25   *  in the Interrupt Table are used to manage pending interrupts.
26   *  Thus vector 8, the first valid vector number, is actually in
27   *  slot 9 in the table.
28   */
29
30  *old_handler = prcb->intr_tbl[ vector + 1 ];
31
32  prcb->intr_tbl[ vector + 1 ] = new_handler;
33
34  if ( i960_vector_caching_enabled( prcb ) )
35    if ( (vector & 0xf) == 0x2 )       /* cacheable? */
36      cached_intr_tbl[ vector >> 4 ] = new_handler;
37}
Note: See TracBrowser for help on using the repository browser.