X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=cpu%2Fmpc86xx%2Ftraps.c;h=13f386ddc847e7145957d0ba73f142f4bb99cbdf;hb=a7faab9d119885e1072c0797ddcea673ab832857;hp=04c2e1331b645c531c1b3a74209f996031e5b1b9;hpb=b8685affe614ccf5f4ec66252b30e2e524d18948;p=oweals%2Fu-boot.git diff --git a/cpu/mpc86xx/traps.c b/cpu/mpc86xx/traps.c index 04c2e1331b..13f386ddc8 100644 --- a/cpu/mpc86xx/traps.c +++ b/cpu/mpc86xx/traps.c @@ -43,7 +43,13 @@ int (*debugger_exception_handler)(struct pt_regs *) = 0; /* Returns 0 if exception not found and fixup otherwise. */ extern unsigned long search_exception_table(unsigned long); -#define END_OF_MEM (gd->bd->bi_memstart + gd->bd->bi_memsize) +/* + * 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. + */ +extern ulong get_effective_memsize(void); +#define END_OF_MEM (gd->bd->bi_memstart + get_effective_memsize()) /* * Trap & Exception support @@ -212,7 +218,7 @@ UnknownException(struct pt_regs *regs) if (debugger_exception_handler && (*debugger_exception_handler) (regs)) return; #endif - printf("UnknownException regs@%x\n", regs); + printf("UnknownException regs@%lx\n", (ulong)regs); printf("Bad trap at PC: %lx, SR: %lx, vector=%lx\n", regs->nip, regs->msr, regs->trap); _exception(0, regs);