summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/m68k/dmv152/spurious/spinit.c
blob: e20dd875ceed4edebb60eab33866518eeec50b94 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*  Spurious_driver
 *
 *  This routine installs spurious interrupt handlers for the DMV152.
 *
 *  Input parameters:  NONE
 *
 *  Output parameters:  NONE
 *
 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993.
 *  On-Line Applications Research Corporation (OAR).
 *
 *  The license and distribution terms for this file may in
 *  the file LICENSE in this distribution or at
 *  http://www.OARcorp.com/rtems/license.html.
 *
 *  $Id$
 */

#include <rtems.h>
#include <bsp.h>
#include <stdio.h>

rtems_isr Spurious_Isr(
  rtems_vector_number vector
)
{
  void *sp = 0;

  asm volatile ( "movea.l   %%sp,%0 " : "=a" (sp) : "0" (sp) );

  fprintf( stderr, "Vector 0x%x sp=0x%p\n", vector, sp );
}

rtems_device_driver Spurious_Initialize(
  rtems_device_major_number major,
  rtems_device_minor_number minor,
  void *pargp,
  rtems_id tid,
  rtems_unsigned32 *rval
)
{
  rtems_vector_number vector;

  for ( vector = 0x40 ; vector <= 0xFF ; vector++ )
    (void) set_vector( Spurious_Isr, vector, 1 );

  return 0;
}