X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=lib_ppc%2Fextable.c;h=7408d5c96946acff06b7f49098dac6c113d0bba3;hb=116095eb1f0f7017ea8062aa8a8ba8ceecb430b5;hp=2d995fa30a3a26178c369170844aaf25018eb98d;hpb=b706d63559aeec352bc72dd86d7d5423c15f6a60;p=u-boot diff --git a/lib_ppc/extable.c b/lib_ppc/extable.c index 2d995fa30a..7408d5c969 100644 --- a/lib_ppc/extable.c +++ b/lib_ppc/extable.c @@ -53,27 +53,13 @@ search_one_table(const struct exception_table_entry *first, unsigned long value) { long diff; - if ((ulong) first > CFG_MONITOR_BASE) { - /* exception occurs in FLASH, before u-boot relocation. - * No relocation offset is needed. - */ - while (first <= last) { - diff = first->insn - value; - if (diff == 0) - return first->fixup; - first++; - } - } else { - /* exception occurs in RAM, after u-boot relocation. - * A relocation offset should be added. - */ - while (first <= last) { - diff = (first->insn + gd->reloc_off) - value; - if (diff == 0) - return (first->fixup + gd->reloc_off); - first++; - } + while (first <= last) { + diff = first->insn - value; + if (diff == 0) + return first->fixup; + first++; } + return 0; } @@ -87,7 +73,7 @@ search_exception_table(unsigned long addr) /* There is only the kernel to search. */ ret = search_one_table(__start___ex_table, __stop___ex_table-1, addr); /* if the serial port does not hang in exception, printf can be used */ -#if !defined(CFG_SERIAL_HANG_IN_EXCEPTION) +#if !defined(CONFIG_SYS_SERIAL_HANG_IN_EXCEPTION) if (ex_tab_message) debug("Bus Fault @ 0x%08lx, fixup 0x%08lx\n", addr, ret); #endif