|
@@ -37,6 +37,8 @@
|
|
* on our cache or tlb entries.
|
|
* on our cache or tlb entries.
|
|
*/
|
|
*/
|
|
|
|
|
|
|
|
+DECLARE_GLOBAL_DATA_PTR;
|
|
|
|
+
|
|
struct exception_table_entry
|
|
struct exception_table_entry
|
|
{
|
|
{
|
|
unsigned long insn, fixup;
|
|
unsigned long insn, fixup;
|
|
@@ -50,22 +52,20 @@ search_one_table(const struct exception_table_entry *first,
|
|
const struct exception_table_entry *last,
|
|
const struct exception_table_entry *last,
|
|
unsigned long value)
|
|
unsigned long value)
|
|
{
|
|
{
|
|
- DECLARE_GLOBAL_DATA_PTR;
|
|
|
|
-
|
|
|
|
while (first <= last) {
|
|
while (first <= last) {
|
|
const struct exception_table_entry *mid;
|
|
const struct exception_table_entry *mid;
|
|
long diff;
|
|
long diff;
|
|
|
|
|
|
mid = (last - first) / 2 + first;
|
|
mid = (last - first) / 2 + first;
|
|
- if (mid > CFG_MONITOR_BASE){
|
|
|
|
|
|
+ if (mid > CFG_MONITOR_BASE) {
|
|
/* exception occurs in FLASH, before u-boot relocation.
|
|
/* exception occurs in FLASH, before u-boot relocation.
|
|
- * No relocation offset is needed.
|
|
|
|
|
|
+ * No relocation offset is needed.
|
|
*/
|
|
*/
|
|
diff = mid->insn - value;
|
|
diff = mid->insn - value;
|
|
if (diff == 0)
|
|
if (diff == 0)
|
|
return mid->fixup;
|
|
return mid->fixup;
|
|
} else {
|
|
} else {
|
|
- /* exception occurs in RAM, after u-boot relocation.
|
|
|
|
|
|
+ /* exception occurs in RAM, after u-boot relocation.
|
|
* A relocation offset should be added.
|
|
* A relocation offset should be added.
|
|
*/
|
|
*/
|
|
diff = (mid->insn + gd->reloc_off) - value;
|
|
diff = (mid->insn + gd->reloc_off) - value;
|