X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=cpu%2Fmpc85xx%2Ftraps.c;h=10108d86e3343e7d4d0f7a25c814383b7db50cfb;hb=e39bf1e2a9e437174687de687c127ec980a93eeb;hp=efc80c7aee75ec35b1737dac47eeb57bd93bdc85;hpb=f930922f061ea7bf585296859d1c14194c24b840;p=u-boot diff --git a/cpu/mpc85xx/traps.c b/cpu/mpc85xx/traps.c index efc80c7aee..10108d86e3 100644 --- a/cpu/mpc85xx/traps.c +++ b/cpu/mpc85xx/traps.c @@ -38,22 +38,21 @@ #include #include +#include #include DECLARE_GLOBAL_DATA_PTR; -#if defined(CONFIG_CMD_KGDB) -int (*debugger_exception_handler)(struct pt_regs *) = 0; -#endif - /* Returns 0 if exception not found and fixup otherwise. */ extern unsigned long search_exception_table(unsigned long); /* - * End of memory as shown by board info and determined by DDR setup. + * End of addressable memory. This may be less than the actual + * amount of memory on the system if we're unable to keep all + * the memory mapped in. */ -#define END_OF_MEM (gd->bd->bi_memstart + gd->bd->bi_memsize) - +extern ulong get_effective_memsize(void); +#define END_OF_MEM (gd->bd->bi_memstart + get_effective_memsize()) static __inline__ void set_tsr(unsigned long val) { @@ -214,10 +213,10 @@ MachineCheckException(struct pt_regs *regs) if (machinecheck_count > 1) { regs->nip += 4; /* skip offending instruction */ - printf("Skipping current instr, Returning to 0x%08x\n", + printf("Skipping current instr, Returning to 0x%08lx\n", regs->nip); } else { - printf("Returning back to 0x%08x\n",regs->nip); + printf("Returning back to 0x%08lx\n",regs->nip); } } @@ -285,11 +284,12 @@ UnknownException(struct pt_regs *regs) regs->nip, regs->msr, regs->trap); _exception(0, regs); } + void ExtIntException(struct pt_regs *regs) { - volatile immap_t *immap = (immap_t *)CFG_IMMR; - volatile ccsr_pic_t *pic = &immap->im_pic; + volatile ccsr_pic_t *pic = (void *)(CONFIG_SYS_MPC85xx_PIC_ADDR); + uint vect; #if defined(CONFIG_CMD_KGDB) @@ -300,17 +300,9 @@ ExtIntException(struct pt_regs *regs) printf("External Interrupt Exception at PC: %lx, SR: %lx, vector=%lx", regs->nip, regs->msr, regs->trap); vect = pic->iack0; - printf(" irq IACK0@%05x=%d\n",&pic->iack0,vect); + printf(" irq IACK0@%05x=%d\n",(int)&pic->iack0,vect); show_regs(regs); print_backtrace((unsigned long *)regs->gpr[1]); - machinecheck_count++; -#ifdef EXTINT_NOSKIP - printf("Returning back to 0x%08x\n",regs->nip); -#else - regs->nip += 4; /* skip offending instruction */ - printf("Skipping current instr, Returning to 0x%08x\n",regs->nip); -#endif - } void