Subversion Repositories HelenOS

Rev

Rev 1861 | Rev 1880 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1861 Rev 1870
Line 33... Line 33...
33
 *
33
 *
34
 */
34
 */
35
 
35
 
36
#include <arch/trap/exception.h>
36
#include <arch/trap/exception.h>
37
#include <arch/interrupt.h>
37
#include <arch/interrupt.h>
-
 
38
#include <interrupt.h>
38
#include <arch/asm.h>
39
#include <arch/asm.h>
39
#include <debug.h>
40
#include <debug.h>
40
#include <typedefs.h>
41
#include <typedefs.h>
41
 
42
 
42
/** Handle instruction_access_exception. */
43
/** Handle instruction_access_exception. (0x8) */
43
void do_instruction_access_exc(int n, istate_t *istate)
44
void instruction_access_exception(int n, istate_t *istate)
44
{
45
{
-
 
46
    fault_if_from_uspace(istate, "%s\n", __FUNCTION__);
45
    panic("Instruction Access Exception at %p.\n", istate->tpc);
47
    panic("%s at %p.\n", __FUNCTION__, istate->tpc);
46
}
48
}
47
 
49
 
48
/** Handle mem_address_not_aligned. */
50
/** Handle instruction_access_error. (0xa) */
49
void do_mem_address_not_aligned(int n, istate_t *istate)
51
void instruction_access_error(int n, istate_t *istate)
50
{
52
{
-
 
53
    fault_if_from_uspace(istate, "%s\n", __FUNCTION__);
51
    panic("Memory Address Not Aligned from %p.\n", istate->tpc);
54
    panic("%s at %p.\n", __FUNCTION__, istate->tpc);
52
}
55
}
53
 
56
 
54
/** Handle data_access_error. */
57
/** Handle illegal_instruction. (0x10) */
55
void do_data_access_error(int n, istate_t *istate)
58
void illegal_instruction(int n, istate_t *istate)
56
{
59
{
-
 
60
    fault_if_from_uspace(istate, "%s\n", __FUNCTION__);
57
    panic("Data Access Error from %p.\n", istate->tpc);
61
    panic("%s at %p.\n", __FUNCTION__, istate->tpc);
58
}
62
}
59
 
63
 
60
/** Handle mem_address_not_aligned. */
64
/** Handle privileged_opcode. (0x11) */
61
void do_illegal_instruction(int n, istate_t *istate)
65
void privileged_opcode(int n, istate_t *istate)
62
{
66
{
-
 
67
    fault_if_from_uspace(istate, "%s\n", __FUNCTION__);
63
    panic("Illegal Instruction at %p.\n", istate->tpc);
68
    panic("%s at %p.\n", __FUNCTION__, istate->tpc);
-
 
69
}
-
 
70
 
-
 
71
/** Handle division_by_zero. (0x28) */
-
 
72
void division_by_zero(int n, istate_t *istate)
-
 
73
{
-
 
74
    fault_if_from_uspace(istate, "%s\n", __FUNCTION__);
-
 
75
    panic("%s at %p.\n", __FUNCTION__, istate->tpc);
-
 
76
}
-
 
77
 
-
 
78
/** Handle data_access_exception. (0x30) */
-
 
79
void data_access_exception(int n, istate_t *istate)
-
 
80
{
-
 
81
    fault_if_from_uspace(istate, "%s\n", __FUNCTION__);
-
 
82
    panic("%s from %p.\n", __FUNCTION__, istate->tpc);
-
 
83
}
-
 
84
 
-
 
85
/** Handle data_access_error. (0x32) */
-
 
86
void data_access_error(int n, istate_t *istate)
-
 
87
{
-
 
88
    fault_if_from_uspace(istate, "%s\n", __FUNCTION__);
-
 
89
    panic("%s from %p.\n", __FUNCTION__, istate->tpc);
-
 
90
}
-
 
91
 
-
 
92
/** Handle mem_address_not_aligned. (0x34) */
-
 
93
void mem_address_not_aligned(int n, istate_t *istate)
-
 
94
{
-
 
95
    fault_if_from_uspace(istate, "%s\n", __FUNCTION__);
-
 
96
    panic("%s from %p.\n", __FUNCTION__, istate->tpc);
-
 
97
}
-
 
98
 
-
 
99
/** Handle privileged_action. (0x37) */
-
 
100
void privileged_action(int n, istate_t *istate)
-
 
101
{
-
 
102
    fault_if_from_uspace(istate, "%s\n", __FUNCTION__);
-
 
103
    panic("%s at %p.\n", __FUNCTION__, istate->tpc);
64
}
104
}
65
 
105
 
66
/** @}
106
/** @}
67
 */
107
 */
68
 
-