source: mainline/kernel/arch/sparc32/src/exception.c@ 80d9d83

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 80d9d83 was 3efc35a, checked in by Jakub Klama <jakub.klama@…>, 12 years ago

Construct full exception and interrupt table.

  • Property mode set to 100644
File size: 4.1 KB
Line 
1/*
2 * Copyright (c) 2005 Jakub Jermar
3 * Copyright (c) 2013 Jakub Klama
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 *
10 * - Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * - Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * - The name of the author may not be used to endorse or promote products
16 * derived from this software without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */
29
30/** @addtogroup sparc64interrupt
31 * @{
32 */
33/** @file
34 *
35 */
36
37#include <arch.h>
38#include <typedefs.h>
39#include <arch/istate.h>
40#include <arch/exception.h>
41#include <interrupt.h>
42#include <arch/asm.h>
43#include <debug.h>
44#include <print.h>
45#include <symtab.h>
46
47/** Handle instruction_access_exception. (0x1) */
48void instruction_access_exception(int n, istate_t *istate)
49{
50 fault_if_from_uspace(istate, "%s.", __func__);
51 panic_badtrap(istate, n, "%s.", __func__);
52}
53
54/** Handle instruction_access_error. (0x21) */
55void instruction_access_error(int n, istate_t *istate)
56{
57 fault_if_from_uspace(istate, "%s.", __func__);
58 panic_badtrap(istate, n, "%s.", __func__);
59}
60
61/** Handle illegal_instruction. (0x2) */
62void illegal_instruction(int n, istate_t *istate)
63{
64 fault_if_from_uspace(istate, "%s.", __func__);
65 panic_badtrap(istate, n, "%s.", __func__);
66}
67
68/** Handle privileged_instruction. (0x3) */
69void privileged_instruction(int n, istate_t *istate)
70{
71 fault_if_from_uspace(istate, "%s.", __func__);
72 panic_badtrap(istate, n, "%s.", __func__);
73}
74
75/** Handle fp_disabled. (0x3) */
76void fp_disabled(int n, istate_t *istate)
77{
78 fault_if_from_uspace(istate, "%s.", __func__);
79 panic_badtrap(istate, n, "%s.", __func__);
80}
81
82/** Handle fp_exception. (0x08) */
83void fp_exception(int n, istate_t *istate)
84{
85 fault_if_from_uspace(istate, "%s.", __func__);
86 panic_badtrap(istate, n, "%s.", __func__);
87}
88
89/** Handle tag_overflow. (0x0a) */
90void tag_overflow(int n, istate_t *istate)
91{
92 fault_if_from_uspace(istate, "%s.", __func__);
93 panic_badtrap(istate, n, "%s.", __func__);
94}
95
96/** Handle division_by_zero. (0x2a) */
97void division_by_zero(int n, istate_t *istate)
98{
99 fault_if_from_uspace(istate, "%s.", __func__);
100 panic_badtrap(istate, n, "%s.", __func__);
101}
102
103/** Handle data_access_exception. (0x9) */
104void data_access_exception(int n, istate_t *istate)
105{
106 fault_if_from_uspace(istate, "%s.", __func__);
107 panic_badtrap(istate, n, "%s.", __func__);
108}
109
110/** Handle data_access_error. (0x29) */
111void data_access_error(int n, istate_t *istate)
112{
113 fault_if_from_uspace(istate, "%s.", __func__);
114 panic_badtrap(istate, n, "%s.", __func__);
115}
116
117/** Handle data_store_error. (0x29) */
118void data_store_error(int n, istate_t *istate)
119{
120 fault_if_from_uspace(istate, "%s.", __func__);
121 panic_badtrap(istate, n, "%s.", __func__);
122}
123/** Handle data_access_error. (0x2c) */
124void data_access_mmu_miss(int n, istate_t *istate)
125{
126 fault_if_from_uspace(istate, "%s.", __func__);
127 panic_badtrap(istate, n, "%s.", __func__);
128}
129
130/** Handle mem_address_not_aligned. (0x7) */
131void mem_address_not_aligned(int n, istate_t *istate)
132{
133 fault_if_from_uspace(istate, "%s.", __func__);
134 panic_badtrap(istate, n, "%s.", __func__);
135}
136
137/** @}
138 */
Note: See TracBrowser for help on using the repository browser.