ref: 85e144dcb0c621161ca4275f7613d606da088ca0
parent: a43321946e0f661f51290988c7e7567262d403bd
author: cinap_lenrek <[email protected]>
date: Mon Apr 13 19:04:53 EDT 2015
zynq: invalidate cache before booting cpu1 sometimes, machine would crash on boot because of data cache inconsistency. invalidating the cache before booting cpu1 fixes it.
--- a/sys/src/9/zynq/main.c
+++ b/sys/src/9/zynq/main.c
@@ -379,11 +379,12 @@
m1->l1.va[L1X(KZERO)+i] = m->l1.va[L1X(KZERO)+i];
coherence();
cleandse((uchar*)KZERO, (uchar*)0xFFFFFFFF);
+ invaldse((uchar*)KZERO, (uchar*)0xFFFFFFFF);
+ /* ocm is uncached */
v = KADDR(0xFFFFF000);
v[0xFF0/4] = PADDR(mpbootstrap);
coherence();
- cleandse(v, (uchar*)v+BY2PG);
sendevent();
synccycles();