1 | /* SPDX-License-Identifier: BSD-2-Clause */ |
---|
2 | |
---|
3 | /* |
---|
4 | * This file contains the raw entry points for the exceptions. |
---|
5 | * |
---|
6 | * COPYRIGHT (c) 1989-2000. |
---|
7 | * On-Line Applications Research Corporation (OAR). |
---|
8 | * |
---|
9 | * Redistribution and use in source and binary forms, with or without |
---|
10 | * modification, are permitted provided that the following conditions |
---|
11 | * are met: |
---|
12 | * 1. Redistributions of source code must retain the above copyright |
---|
13 | * notice, this list of conditions and the following disclaimer. |
---|
14 | * 2. Redistributions in binary form must reproduce the above copyright |
---|
15 | * notice, this list of conditions and the following disclaimer in the |
---|
16 | * documentation and/or other materials provided with the distribution. |
---|
17 | * |
---|
18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
---|
19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
---|
20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
---|
21 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
---|
22 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
---|
23 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
---|
24 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
---|
25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
---|
26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
---|
27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
---|
28 | * POSSIBILITY OF SUCH DAMAGE. |
---|
29 | */ |
---|
30 | |
---|
31 | #include <rtems/asm.h> |
---|
32 | #include <rtems/mips/iregdef.h> |
---|
33 | #include <rtems/mips/idtcpu.h> |
---|
34 | |
---|
35 | /* |
---|
36 | * MIPS ISA Level 1 entries |
---|
37 | */ |
---|
38 | |
---|
39 | #if __mips == 1 |
---|
40 | |
---|
41 | FRAME(exc_norm_code,sp,0,ra) |
---|
42 | la k0, _ISR_Handler /* generic external int hndlr */ |
---|
43 | j k0 |
---|
44 | nop |
---|
45 | ENDFRAME(exc_norm_code) |
---|
46 | |
---|
47 | FRAME(exc_dbg_code,sp,0,ra) |
---|
48 | la k0, _DBG_Handler /* debug interrupt */ |
---|
49 | j k0 |
---|
50 | nop |
---|
51 | ENDFRAME(exc_dbg_code) |
---|
52 | |
---|
53 | /* XXX this is dependent on IDT/SIM and needs to be addressed */ |
---|
54 | FRAME(exc_utlb_code,sp,0,ra) |
---|
55 | la k0, (R_VEC+((48)*8)) |
---|
56 | j k0 |
---|
57 | nop |
---|
58 | ENDFRAME(exc_utlb_code) |
---|
59 | |
---|
60 | /* |
---|
61 | * MIPS ISA Level 32 |
---|
62 | * XXX Again, reliance on SIM. Not good.?????????? |
---|
63 | */ |
---|
64 | #elif __mips == 32 |
---|
65 | FRAME(exc_tlb_code,sp,0,ra) |
---|
66 | la k0, _ISR_Handler |
---|
67 | j k0 |
---|
68 | nop |
---|
69 | ENDFRAME(exc_tlb_code) |
---|
70 | |
---|
71 | FRAME(exc_xtlb_code,sp,0,ra) |
---|
72 | la k0, _ISR_Handler |
---|
73 | j k0 |
---|
74 | nop |
---|
75 | |
---|
76 | ENDFRAME(exc_xtlb_code) |
---|
77 | |
---|
78 | FRAME(exc_cache_code,sp,0,ra) |
---|
79 | la k0, _ISR_Handler |
---|
80 | j k0 |
---|
81 | nop |
---|
82 | ENDFRAME(exc_cache_code) |
---|
83 | |
---|
84 | FRAME(exc_norm_code,sp,0,ra) |
---|
85 | la k0, _ISR_Handler /* generic external int hndlr */ |
---|
86 | j k0 |
---|
87 | nop |
---|
88 | ENDFRAME(exc_norm_code) |
---|
89 | |
---|
90 | /* |
---|
91 | * MIPS ISA Level 3 |
---|
92 | * XXX Again, reliance on SIM. Not good. |
---|
93 | */ |
---|
94 | #elif __mips == 3 |
---|
95 | |
---|
96 | FRAME(exc_tlb_code,sp,0,ra) |
---|
97 | la k0, (R_VEC+((112)*8)) /* R4000 Sim location */ |
---|
98 | j k0 |
---|
99 | nop |
---|
100 | ENDFRAME(exc_tlb_code) |
---|
101 | |
---|
102 | FRAME(exc_xtlb_code,sp,0,ra) |
---|
103 | la k0, (R_VEC+((112)*8)) /* R4000 Sim location */ |
---|
104 | j k0 |
---|
105 | nop |
---|
106 | |
---|
107 | ENDFRAME(exc_xtlb_code) |
---|
108 | |
---|
109 | FRAME(exc_cache_code,sp,0,ra) |
---|
110 | la k0, (R_VEC+((112)*8)) /* R4000 Sim location */ |
---|
111 | j k0 |
---|
112 | nop |
---|
113 | ENDFRAME(exc_cache_code) |
---|
114 | |
---|
115 | FRAME(exc_norm_code,sp,0,ra) |
---|
116 | la k0, _ISR_Handler /* generic external int hndlr */ |
---|
117 | j k0 |
---|
118 | nop |
---|
119 | ENDFRAME(exc_norm_code) |
---|
120 | |
---|
121 | #else |
---|
122 | |
---|
123 | #error "isr_entries.S: ISA support problem" |
---|
124 | |
---|
125 | #endif |
---|