source: mainline/kernel/arch/sparc64/src/trap/interrupt.c@ ec443d5

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since ec443d5 was ec443d5, checked in by Jakub Jermar <jakub@…>, 11 years ago

Let most of the sparc64 traps go through exc_dispatch().

  • All interrupts (level and vector_trap) now use exc_dispatch().
  • Fast MMU traps still don't use it.
  • Property mode set to 100644
File size: 4.1 KB
Line 
1/*
2 * Copyright (c) 2005 Jakub Jermar
3 * Copyright (c) 2009 Pavel Rimsky
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#include <arch/interrupt.h>
37#include <arch/trap/interrupt.h>
38#include <arch/trap/exception.h>
39#include <arch/sparc64.h>
40#include <interrupt.h>
41#include <ddi/irq.h>
42#include <typedefs.h>
43#include <debug.h>
44#include <arch/asm.h>
45#include <arch/barrier.h>
46#include <arch/drivers/tick.h>
47#include <print.h>
48#include <arch.h>
49#include <mm/tlb.h>
50#include <config.h>
51#include <synch/spinlock.h>
52
53void exc_arch_init(void)
54{
55 exc_register(TT_INSTRUCTION_ACCESS_EXCEPTION,
56 "instruction_access_exception", false,
57 instruction_access_exception);
58 exc_register(TT_INSTRUCTION_ACCESS_ERROR,
59 "instruction_access_error", false,
60 instruction_access_error);
61 exc_register(TT_ILLEGAL_INSTRUCTION,
62 "illegal_instruction", false,
63 illegal_instruction);
64 exc_register(TT_PRIVILEGED_OPCODE,
65 "privileged_opcode", false,
66 privileged_opcode);
67 exc_register(TT_UNIMPLEMENTED_LDD,
68 "unimplemented_LDD", false,
69 unimplemented_LDD);
70 exc_register(TT_UNIMPLEMENTED_STD,
71 "unimplemented_STD", false,
72 unimplemented_STD);
73 exc_register(TT_FP_DISABLED,
74 "fp_disabled", true,
75 fp_disabled);
76 exc_register(TT_FP_EXCEPTION_IEEE_754,
77 "fp_exception_ieee_754", false,
78 fp_exception_ieee_754);
79 exc_register(TT_FP_EXCEPTION_OTHER,
80 "fp_exception_other", false,
81 fp_exception_other);
82 exc_register(TT_TAG_OVERFLOW,
83 "tag_overflow", false,
84 tag_overflow);
85 exc_register(TT_DIVISION_BY_ZERO,
86 "division_by_zero", false,
87 division_by_zero);
88 exc_register(TT_DATA_ACCESS_EXCEPTION,
89 "data_access_exception", false,
90 data_access_exception);
91 exc_register(TT_DATA_ACCESS_ERROR,
92 "data_access_error", false,
93 data_access_error);
94 exc_register(TT_MEM_ADDRESS_NOT_ALIGNED,
95 "mem_address_not_aligned", false,
96 mem_address_not_aligned);
97 exc_register(TT_LDDF_MEM_ADDRESS_NOT_ALIGNED,
98 "LDDF_mem_address_not_aligned", false,
99 LDDF_mem_address_not_aligned);
100 exc_register(TT_STDF_MEM_ADDRESS_NOT_ALIGNED,
101 "STDF_mem_address_not_aligned", false,
102 STDF_mem_address_not_aligned);
103 exc_register(TT_PRIVILEGED_ACTION,
104 "privileged_action", false,
105 privileged_action);
106 exc_register(TT_LDQF_MEM_ADDRESS_NOT_ALIGNED,
107 "LDQF_mem_address_not_aligned", false,
108 LDQF_mem_address_not_aligned);
109 exc_register(TT_STQF_MEM_ADDRESS_NOT_ALIGNED,
110 "STQF_mem_address_not_aligned", false,
111 STQF_mem_address_not_aligned);
112
113 exc_register(TT_INTERRUPT_LEVEL_14,
114 "interrupt_level_14", true,
115 tick_interrupt);
116
117#ifdef SUN4u
118 exc_register(TT_INTERRUPT_VECTOR_TRAP,
119 "interrupt_vector_trap", true,
120 interrupt);
121#endif
122
123}
124
125/** @}
126 */
Note: See TracBrowser for help on using the repository browser.