1 // int-initlevel.S - Routines used to pull-in interrupt dispatch code
3 // $Id: //depot/rel/Cottonwood/Xtensa/OS/xtos/int-initlevel.S#3 $
5 // Copyright (c) 2006-2010 Tensilica Inc.
7 // Permission is hereby granted, free of charge, to any person obtaining
8 // a copy of this software and associated documentation files (the
9 // "Software"), to deal in the Software without restriction, including
10 // without limitation the rights to use, copy, modify, merge, publish,
11 // distribute, sublicense, and/or sell copies of the Software, and to
12 // permit persons to whom the Software is furnished to do so, subject to
13 // the following conditions:
15 // The above copyright notice and this permission notice shall be included
16 // in all copies or substantial portions of the Software.
18 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
21 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
22 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24 // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 // To assemble this template file, define a macro called _INTERRUPT_LEVEL
28 // to be the interrupt level of the vector. We use the same template for both
29 // high-level and medium-level interrupts, but not debug level.
32 #include <xtensa/coreasm.h>
33 #include "xtos-internal.h"
36 #if XCHAL_HAVE_INTERRUPTS && (_INTERRUPT_LEVEL <= XCHAL_NUM_INTLEVELS) && (_INTERRUPT_LEVEL != XCHAL_DEBUGLEVEL)
38 // Nothing to do at runtime. This function only has effect
42 .global LABEL(_xtos_dispatch_level,_interrupts)
44 LABEL(_xtos_dispatch_level,_interrupts):
47 .size LABEL(_xtos_dispatch_level,_interrupts), . - LABEL(_xtos_dispatch_level,_interrupts)
49 // This reference is what does the work of pulling-in the
50 // relevant interrupt vector at the specified level.
51 // This is only needed in the tiny-rt LSP.
53 # if _INTERRUPT_LEVEL == 1
54 .global _need_level1int_
56 .global LABEL(_Level,Vector)
59 #endif /* XCHAL_HAVE_INTERRUPTS */