Commit 5e9e7687 authored by Michael Hennerich's avatar Michael Hennerich Committed by Bryan Wu

Blackfin arch: Fix BUG -- BF533 + 0.5 silicon + MPU + UART PIO -> crash

Apply ANOMALY_05000283 & ANOMALY_05000315
Workaround also to the EXCEPTION path.

Cover evt_ivhw also with ANOMALY_05000315
The Workaround needs to be prior to accesses (either read or write) to
any system MMR.
Signed-off-by: default avatarMichael Hennerich <michael.hennerich@analog.com>
Signed-off-by: default avatarBryan Wu <cooloney@kernel.org>
parent 49f7253c
...@@ -484,6 +484,15 @@ ENTRY(_trap) /* Exception: 4th entry into system event table(supervisor mode)*/ ...@@ -484,6 +484,15 @@ ENTRY(_trap) /* Exception: 4th entry into system event table(supervisor mode)*/
[--sp] = ASTAT; [--sp] = ASTAT;
[--sp] = (R7:6,P5:4); [--sp] = (R7:6,P5:4);
#if ANOMALY_05000283 || ANOMALY_05000315
cc = r7 == r7;
p5.h = HI(CHIPID);
p5.l = LO(CHIPID);
if cc jump 1f;
r7.l = W[p5];
1:
#endif
#ifdef CONFIG_DEBUG_DOUBLEFAULT #ifdef CONFIG_DEBUG_DOUBLEFAULT
/* /*
* Save these registers, as they are only valid in exception context * Save these registers, as they are only valid in exception context
...@@ -1020,6 +1029,15 @@ ENTRY(_early_trap) ...@@ -1020,6 +1029,15 @@ ENTRY(_early_trap)
SAVE_ALL_SYS SAVE_ALL_SYS
trace_buffer_stop(p0,r0); trace_buffer_stop(p0,r0);
#if ANOMALY_05000283 || ANOMALY_05000315
cc = r5 == r5;
p4.h = HI(CHIPID);
p4.l = LO(CHIPID);
if cc jump 1f;
r5.l = W[p4];
1:
#endif
/* Turn caches off, to ensure we don't get double exceptions */ /* Turn caches off, to ensure we don't get double exceptions */
P4.L = LO(IMEM_CONTROL); P4.L = LO(IMEM_CONTROL);
......
...@@ -143,7 +143,7 @@ ENTRY(_evt_ivhw) ...@@ -143,7 +143,7 @@ ENTRY(_evt_ivhw)
fp = 0; fp = 0;
#endif #endif
#if ANOMALY_05000283 #if ANOMALY_05000283 || ANOMALY_05000315
cc = r7 == r7; cc = r7 == r7;
p5.h = HI(CHIPID); p5.h = HI(CHIPID);
p5.l = LO(CHIPID); p5.l = LO(CHIPID);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment