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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [hal/] [sh/] [sh4/] [v2_0/] [include/] [var_intr.h] - Blame information for rev 565

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 27 unneback
#ifndef CYGONCE_HAL_VAR_INTR_H
2
#define CYGONCE_HAL_VAR_INTR_H
3
 
4
//==========================================================================
5
//
6
//      var_intr.h
7
//
8
//      SH4 Interrupt and clock support
9
//
10
//==========================================================================
11
//####ECOSGPLCOPYRIGHTBEGIN####
12
// -------------------------------------------
13
// This file is part of eCos, the Embedded Configurable Operating System.
14
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
15
//
16
// eCos is free software; you can redistribute it and/or modify it under
17
// the terms of the GNU General Public License as published by the Free
18
// Software Foundation; either version 2 or (at your option) any later version.
19
//
20
// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
21
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
22
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
23
// for more details.
24
//
25
// You should have received a copy of the GNU General Public License along
26
// with eCos; if not, write to the Free Software Foundation, Inc.,
27
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
28
//
29
// As a special exception, if other files instantiate templates or use macros
30
// or inline functions from this file, or you compile this file and link it
31
// with other works to produce a work based on this file, this file does not
32
// by itself cause the resulting work to be covered by the GNU General Public
33
// License. However the source code for this file must still be made available
34
// in accordance with section (3) of the GNU General Public License.
35
//
36
// This exception does not invalidate any other reasons why a work based on
37
// this file might be covered by the GNU General Public License.
38
//
39
// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
40
// at http://sources.redhat.com/ecos/ecos-license/
41
// -------------------------------------------
42
//####ECOSGPLCOPYRIGHTEND####
43
//==========================================================================
44
//#####DESCRIPTIONBEGIN####
45
//
46
// Author(s):    jskov
47
// Contributors: jskov,
48
// Date:         1999-04-24
49
// Purpose:      Define Interrupt support
50
// Description:  The macros defined here provide the HAL APIs for handling
51
//               interrupts and the clock.
52
//              
53
// Usage:
54
//               #include <cyg/hal/hal_intr.h>
55
//               ...
56
//              
57
//
58
//####DESCRIPTIONEND####
59
//
60
//==========================================================================
61
 
62
#include <pkgconf/hal.h>
63
#include CYGBLD_HAL_CPU_MODULES_H       // INTC module selection
64
 
65
// More include statements below. First part of this file must be
66
// usable for both assembly and C files, so only use defines here.
67
 
68
//--------------------------------------------------------------------------
69
// Optional platform overrides and fallbacks
70
#include <cyg/hal/plf_intr.h>
71
 
72
#ifndef CYGPRI_HAL_INTERRUPT_UPDATE_LEVEL_PLF
73
# define CYGPRI_HAL_INTERRUPT_UPDATE_LEVEL_PLF(vec, level)                  \
74
    case CYGNUM_HAL_INTERRUPT_NMI:                                          \
75
        /* fall through */                                                  \
76
    case CYGNUM_HAL_INTERRUPT_LVL0 ... CYGNUM_HAL_INTERRUPT_LVL14:          \
77
        /* Cannot change levels */                                          \
78
        break;
79
#endif
80
 
81
#ifndef CYGPRI_HAL_INTERRUPT_ACKNOWLEDGE_PLF
82
# define CYGPRI_HAL_INTERRUPT_ACKNOWLEDGE_PLF(vec)
83
#endif
84
 
85
#ifndef CYGPRI_HAL_INTERRUPT_CONFIGURE_PLF
86
# define CYGPRI_HAL_INTERRUPT_CONFIGURE_PLF(vec, level, up)
87
#endif
88
 
89
//--------------------------------------------------------------------------
90
// Additional SH4 exception vectors. 
91
// These are identified with event values 0x800 and 0x820, so we need to
92
// extend the decode macros accordingly. Performance wise it's not an
93
// issue - these are exceptions, not interrupts. No critical fast path.
94
#define CYGNUM_HAL_VECTOR_FPU_EXCEPTION          9 // FPU exception
95
#define CYGNUM_HAL_VECTOR_TLB_MUTI_HIT          10 // mutible TLB hit
96
#define CYGNUM_HAL_VECTOR_FPU_DISABLE           17
97
#define CYGNUM_HAL_VECTOR_SLOT_FPU_DISABLE      18
98
 
99
#define CYG_VECTOR_IS_INTERRUPT(v)   \
100
    ((CYGNUM_HAL_VECTOR_INSTRUCTION_BP < (v)) && ((v) < CYGNUM_HAL_VECTOR_FPU_DISABLE))
101
 
102
#define CYGNUM_HAL_VSR_MAX                   CYGNUM_HAL_VECTOR_SLOT_FPU_DISABLE
103
 
104
#define CYGNUM_HAL_VSR_EXCEPTION_COUNT       (CYGNUM_HAL_VSR_MAX-CYGNUM_HAL_VECTOR_POWERON+1)
105
 
106
#define CYGNUM_HAL_INTERRUPT_RESERVED_5C0    32
107
#define CYGNUM_HAL_INTERRUPT_RESERVED_5E0    33
108
#define CYGNUM_HAL_INTERRUPT_HUDI            34
109
#define CYGNUM_HAL_INTERRUPT_GPIO            35
110
#define CYGNUM_HAL_INTERRUPT_DMAC_DMTE0      36
111
#define CYGNUM_HAL_INTERRUPT_DMAC_DMTE1      37
112
#define CYGNUM_HAL_INTERRUPT_DMAC_DMTE2      38
113
#define CYGNUM_HAL_INTERRUPT_DMAC_DMTE3      39
114
#define CYGNUM_HAL_INTERRUPT_DMAC_DMAE       40
115
#define CYGNUM_HAL_INTERRUPT_RESERVED_6E0    41
116
#define CYGNUM_HAL_INTERRUPT_SCIF_ERI        42
117
#define CYGNUM_HAL_INTERRUPT_SCIF_RXI        43
118
#define CYGNUM_HAL_INTERRUPT_SCIF_BRI        44
119
#define CYGNUM_HAL_INTERRUPT_SCIF_TXI        45
120
 
121
#define CYGNUM_HAL_ISR_MAX                   CYGNUM_HAL_INTERRUPT_SCIF_TXI
122
 
123
#if (CYGARC_SH_MOD_INTC == 2)
124
 
125
#ifndef CYGHWR_HAL_SH_IRQ_USE_IRQLVL
126
# define CYGNUM_HAL_INTERRUPT_IRL0           CYGNUM_HAL_INTERRUPT_LVL2
127
# define CYGNUM_HAL_INTERRUPT_IRL1           CYGNUM_HAL_INTERRUPT_LVL5
128
# define CYGNUM_HAL_INTERRUPT_IRL2           CYGNUM_HAL_INTERRUPT_LVL8
129
# define CYGNUM_HAL_INTERRUPT_IRL3           CYGNUM_HAL_INTERRUPT_LVL11
130
#endif
131
 
132
#define CYGNUM_HAL_INTERRUPT_PCISERR         66
133
#define CYGNUM_HAL_INTERRUPT_PCIDMA3         67
134
#define CYGNUM_HAL_INTERRUPT_PCIDMA2         68
135
#define CYGNUM_HAL_INTERRUPT_PCIDMA1         69
136
#define CYGNUM_HAL_INTERRUPT_PCIDMA0         70
137
#define CYGNUM_HAL_INTERRUPT_PCIPWON         71
138
#define CYGNUM_HAL_INTERRUPT_PCIPWDWN        72
139
#define CYGNUM_HAL_INTERRUPT_PCIERR          73
140
 
141
#define CYGNUM_HAL_INTERRUPT_TUNI3           74
142
#define CYGNUM_HAL_INTERRUPT_TUNI4           78
143
 
144
#undef CYGNUM_HAL_ISR_MAX
145
#define CYGNUM_HAL_ISR_MAX                   CYGNUM_HAL_INTERRUPT_TUNI4
146
#endif // (CYGARC_SH_MOD_INTC == 2)
147
 
148
// Exception vectors. These are the values used when passed out to an
149
// external exception handler using cyg_hal_deliver_exception()
150
 
151
// These are in addition to the exceptions defined by the architecture.
152
 
153
#define CYGNUM_HAL_EXCEPTION_FPU_EXCEPTION          9 // fpu exception
154
#define CYGNUM_HAL_EXCEPTION_TLB_MULTI_HIT         10 // TLB multi hit exception
155
#define CYGNUM_HAL_EXCEPTION_FPU_DISABLE           17
156
#define CYGNUM_HAL_EXCEPTION_SLOT_FPU_DISABLE      18
157
 
158
#define CYGNUM_HAL_EXCEPTION_MIN          CYGNUM_HAL_EXCEPTION_POWERON
159
#define CYGNUM_HAL_EXCEPTION_MAX          CYGNUM_HAL_EXCEPTION_SLOT_FPU_DISABLE
160
 
161
 
162
// The vector used by the Real time clock
163
#define CYGNUM_HAL_INTERRUPT_RTC             CYGNUM_HAL_INTERRUPT_TMU0_TUNI0
164
 
165
//--------------------------------------------------------------------------
166
#endif // ifndef CYGONCE_HAL_VAR_INTR_H
167
// End of hal_intr.h

powered by: WebSVN 2.1.0

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