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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [cpukit/] [score/] [src/] [isr.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1026 ivang
/*
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
 *  isr.c,v 1.10 2001/01/03 16:37:08 joel Exp
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
 
30
void _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
}

powered by: WebSVN 2.1.0

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