source: rtems/c/src/exec/score/src/isr.c @ d6ea098

4.104.114.84.95
Last change on this file since d6ea098 was d6ea098, checked in by Joel Sherrill <joel.sherrill@…>, on 01/03/01 at 16:37:08

2001-01-03 Joel Sherrill <joel@…>

  • rtems/score/cpu.h: Added _CPU_Initialize_vectors().
  • Property mode set to 100644
File size: 1.4 KB
Line 
1/*
2 *  ISR Handler
3 *
4 *
5 *  COPYRIGHT (c) 1989-1999.
6 *  On-Line Applications Research Corporation (OAR).
7 *
8 *  The license and distribution terms for this file may be
9 *  found in the file LICENSE in this distribution or at
10 *  http://www.OARcorp.com/rtems/license.html.
11 *
12 *  $Id$
13 */
14
15#include <rtems/system.h>
16#include <rtems/score/isr.h>
17#include <rtems/score/stack.h>
18#include <rtems/score/interr.h>
19#include <rtems/score/wkspace.h>
20
21/*  _ISR_Handler_initialization
22 *
23 *  This routine initializes the ISR handler.
24 *
25 *  Input parameters: NONE
26 *
27 *  Output parameters: NONE
28 */
29
30void _ISR_Handler_initialization( void )
31{
32  _ISR_Signals_to_thread_executing = FALSE;
33
34  _ISR_Nest_level = 0;
35
36  _ISR_Vector_table = _Workspace_Allocate_or_fatal_error(
37     sizeof(ISR_Handler_entry) * ISR_NUMBER_OF_VECTORS
38  );
39
40  _CPU_Initialize_vectors();
41
42#if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE )
43
44  if ( _CPU_Table.interrupt_stack_size < STACK_MINIMUM_SIZE )
45    _Internal_error_Occurred(
46      INTERNAL_ERROR_CORE,
47      TRUE,
48      INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL
49    );
50
51  _CPU_Interrupt_stack_low =
52    _Workspace_Allocate_or_fatal_error( _CPU_Table.interrupt_stack_size );
53
54  _CPU_Interrupt_stack_high = _Addresses_Add_offset(
55    _CPU_Interrupt_stack_low,
56    _CPU_Table.interrupt_stack_size
57  );
58
59#endif
60
61#if ( CPU_HAS_HARDWARE_INTERRUPT_STACK == TRUE )
62  _CPU_Install_interrupt_stack();
63#endif
64
65}
Note: See TracBrowser for help on using the repository browser.