Go to the documentation of this file.
16 #include <linux/kernel.h>
17 #include <linux/signal.h>
18 #include <linux/sched.h>
20 #include <linux/module.h>
22 #include <asm/exceptions.h>
23 #include <asm/entry.h>
25 #include <linux/errno.h>
26 #include <linux/ptrace.h>
27 #include <asm/current.h>
28 #include <asm/cacheflush.h>
30 #define MICROBLAZE_ILL_OPCODE_EXCEPTION 0x02
31 #define MICROBLAZE_IBUS_EXCEPTION 0x03
32 #define MICROBLAZE_DBUS_EXCEPTION 0x04
33 #define MICROBLAZE_DIV_ZERO_EXCEPTION 0x05
34 #define MICROBLAZE_FPU_EXCEPTION 0x06
35 #define MICROBLAZE_PRIVILEGED_EXCEPTION 0x07
64 if (kernel_mode(regs)) {
65 die(
"Exception in kernel mode", regs, signr);
70 info.si_addr = (
void __user *) addr;
84 type,
user_mode(regs) ?
"user" :
"kernel", fsr,
85 (
unsigned int) regs->
pc, (
unsigned int) regs->
esr);
88 switch (type & 0x1F) {
91 pr_debug(
"Illegal opcode exception in user mode\n");
101 pr_debug(
"Instruction bus error exception in user mode\n");
106 "in kernel mode.\n");
111 pr_debug(
"Data bus error exception in user mode\n");
116 "in kernel mode.\n");
121 pr_debug(
"Divide by zero exception in user mode\n");
126 "in kernel mode.\n");
127 die(
"Divide by zero exception", regs,
SIGBUS);
155 "PC=%08x in %s mode\n", type, (
unsigned int) addr,
156 kernel_mode(regs) ?
"kernel" :
"user");