source: rtems/c/src/exec/score/cpu/m68k/cpu.c @ ac7d5ef0

4.104.114.84.95
Last change on this file since ac7d5ef0 was ac7d5ef0, checked in by Joel Sherrill <joel.sherrill@…>, on May 11, 1995 at 5:39:37 PM

Initial revision

  • Property mode set to 100644
File size: 2.3 KB
Line 
1/*
2 *  Motorola MC68020 Dependent Source
3 *
4 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
5 *  On-Line Applications Research Corporation (OAR).
6 *  All rights assigned to U.S. Government, 1994.
7 *
8 *  This material may be reproduced by or for the U.S. Government pursuant
9 *  to the copyright license under the clause at DFARS 252.227-7013.  This
10 *  notice must appear in all copies of this file and its derivatives.
11 *
12 *  $Id$
13 */
14
15#include <rtems/system.h>
16#include <rtems/fatal.h>
17#include <rtems/isr.h>
18
19/*  _CPU_Initialize
20 *
21 *  This routine performs processor dependent initialization.
22 *
23 *  INPUT PARAMETERS:
24 *    cpu_table       - CPU table to initialize
25 *    thread_dispatch - entry pointer to thread dispatcher
26 *
27 *  OUTPUT PARAMETERS: NONE
28 */
29
30void _CPU_Initialize(
31  rtems_cpu_table  *cpu_table,
32  void      (*thread_dispatch)      /* ignored on this CPU */
33)
34{
35
36  if ( cpu_table == NULL )
37    rtems_fatal_error_occurred( RTEMS_NOT_CONFIGURED );
38
39  _CPU_Table = *cpu_table;
40
41}
42
43/*  _CPU_ISR_install_vector
44 *
45 *  This kernel routine installs the RTEMS handler for the
46 *  specified vector.
47 *
48 *  Input parameters:
49 *    vector      - interrupt vector number
50 *    new_handler - replacement ISR for this vector number
51 *    old_handler - former ISR for this vector number
52 *
53 *  Output parameters:  NONE
54 *
55 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
56 *  On-Line Applications Research Corporation (OAR).
57 *
58 *  This material may be reproduced by or for the U.S. Government pursuant
59 *  to the copyright license under the clause at DFARS 252.227-7013.  This
60 *  notice must appear in all copies of this file and its derivatives.
61 *
62 *  $Id$
63 */
64
65void _CPU_ISR_install_vector(
66  unsigned32  vector,
67  proc_ptr    new_handler,
68  proc_ptr   *old_handler
69)
70{
71  proc_ptr *interrupt_table = NULL;
72
73  m68k_get_vbr( interrupt_table );
74
75  *old_handler = _ISR_Vector_table[ vector ];
76
77  _ISR_Vector_table[ vector ] = new_handler;
78  interrupt_table[ vector ] = _ISR_Handler;
79}
80
81
82/*PAGE
83 *
84 *  _CPU_Install_interrupt_stack
85 */
86
87void _CPU_Install_interrupt_stack( void )
88{
89#if ( M68K_HAS_SEPARATE_STACKS == 1 )
90  void *isp = _CPU_Interrupt_stack_high;
91
92  asm volatile ( "movec %0,%%isp" : "=r" (isp) : "0" (isp) );
93#else
94#warning "FIX ME... HOW DO I INSTALL THE INTERRUPT STACK!!!"
95#endif
96}
97
Note: See TracBrowser for help on using the repository browser.