From 85e144dcb0c621161ca4275f7613d606da088ca0 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Mon, 13 Apr 2015 23:04:53 +0200 Subject: [PATCH] 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. --- sys/src/9/zynq/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/src/9/zynq/main.c b/sys/src/9/zynq/main.c index 4af5216c0..ee27bb873 100644 --- a/sys/src/9/zynq/main.c +++ b/sys/src/9/zynq/main.c @@ -379,11 +379,12 @@ mpinit(void) 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();