12 #include <linux/sched.h>
13 #include <linux/kernel.h>
14 #include <linux/string.h>
15 #include <linux/errno.h>
16 #include <linux/ptrace.h>
25 #include <linux/pci.h>
29 #include <linux/export.h>
30 #include <asm/processor.h>
35 #include <asm/pgalloc.h>
36 #include <asm/cacheflush.h>
38 #include <asm/busctl-regs.h>
39 #include <unit/leds.h>
41 #include <asm/sections.h>
45 #if (CONFIG_INTERRUPT_VECTOR_BASE & 0xffffff)
46 #error "INTERRUPT_VECTOR_BASE not aligned to 16MiB boundary!"
136 signo = exception_to_signal_map[code >> 3].
signo;
137 si_code = exception_to_signal_map[code >> 3].
si_code;
161 if (opcode == 0xff) {
195 die(str, regs, code);
213 info.si_addr = (
void *) regs->
pc;
241 asm(
"mov sp,%0" :
"=a"(
stack));
242 asm(
"mov a3,%0" :
"=r"(
fp));
246 for (; stack <
bottom; stack +=
sizeof(
addr)) {
247 addr = *(
unsigned long *)stack;
249 if (addr > stack && addr < bottom) {
251 raslot = stack +
sizeof(
addr);
259 printk(
" [<%08lx>]", addr);
264 print_symbol(
" %s", addr);
277 unsigned long *
stack;
281 sp = (
unsigned long *) &sp;
290 printk(
"%08lx ", *stack++);
314 ssp = (
unsigned long) regs +
sizeof(*regs);
319 regs->
d0, regs->
d1, regs->
d2, regs->
d3);
321 regs->
a0, regs->
a1, regs->
a2, regs->
a3);
323 regs->
e0, regs->
e1, regs->
e2, regs->
e3);
325 regs->
e4, regs->
e5, regs->
e6, regs->
e7);
364 sp = (
unsigned long) regs +
sizeof(*regs);
380 for (i = 0; i < 20; i++) {
409 if ((sp ^ (
unsigned long) tsk) & (
PAGE_MASK << 1))
421 spin_lock_irq(&die_lock);
426 if (regs->
pc >= 0x02000000 && regs->
pc < 0x04000000 &&
427 (regs->
epsw & (EPSW_IM | EPSW_IE)) != (EPSW_IM | EPSW_IE)) {
430 asm volatile (
"0: bra 0b");
433 spin_unlock_irq(&die_lock);
461 if (bcberr & BCBERR_BEME)
465 bcberr & BCBERR_BEMR_CI ?
" CPU-Ins-Fetch" :
"",
466 bcberr & BCBERR_BEMR_CD ?
" CPU-Data" :
"",
467 bcberr & BCBERR_BEMR_DMA ?
" DMA" :
"");
470 bcberr & BCBERR_BEBST ?
"Burst" :
"Single",
471 bcberr & BCBERR_BERW ?
"Read" :
"Write",
472 bcberr & BCBERR_BESB_MON ?
"Monitor Space" :
473 bcberr & BCBERR_BESB_IO ?
"Internal CPU I/O Space" :
474 bcberr & BCBERR_BESB_EX ?
"External I/O Bus" :
475 bcberr & BCBERR_BESB_OPEX ?
"External Memory Bus" :
481 bcberr&BCBERR_BESD ?
"Bus Control Unit" :
"Slave Bus");
484 #define BRIDGEREGB(X) (*(volatile __u8 *)(0xBE040000 + (X)))
485 #define BRIDGEREGW(X) (*(volatile __u16 *)(0xBE040000 + (X)))
486 #define BRIDGEREGL(X) (*(volatile __u32 *)(0xBE040000 + (X)))
489 *(
volatile __u32 *) (0xBFFFFFF4));
505 panic(
"Halted due to asynchronous I/O Bus Error\n");
534 u8 *
vector = (
u8 *)(CONFIG_INTERRUPT_VECTOR_BASE + code);
536 addr = (
unsigned long) handler - (
unsigned long)
vector;
539 vector[2] = addr >> 8;
540 vector[3] = addr >> 16;
541 vector[4] = addr >> 24;
553 u8 *
vector = (
u8 *)(CONFIG_INTERRUPT_VECTOR_BASE + code);
556 addr = (
unsigned long) handler - (
unsigned long)
vector;
558 flags = arch_local_cli_save();
562 vector[2] = addr >> 8;
563 vector[3] = addr >> 16;
564 vector[4] = addr >> 24;
571 #ifndef CONFIG_MN10300_CACHE_SNOOP