shithub: riscv

Download patch

ref: ed294a65cb3c9ac529dc21368960520a6aa2778a
parent: 9f880e595c9b6a3bb606339f87ea9c6c2e368671
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Tue Dec 30 10:16:46 EST 2014

zynq: enable prefetch hints and drop-prefetch

--- a/sys/src/9/zynq/l.s
+++ b/sys/src/9/zynq/l.s
@@ -93,7 +93,7 @@
 	MCR 15, 0, R0, C(7), C(5), 6
 	BL l1dclear(SB)
 	MRC 15, 0, R0, C(1), C(0), 1
-	ORR $(1|1<<6), R0
+	ORR $(1|2|1<<6), R0
 	MCR 15, 0, R0, C(1), C(0), 1
 	MRC 15, 0, R0, C(1), C(0), 0
 	ORR $(1<<12|1<<2), R0
@@ -100,7 +100,7 @@
 	MCR 15, 0, R0, C(1), C(0), 0
 	DSB
 	ISB
-	
+
 	MOVW $(VMAP+0x30), R8
 	PUTC('9')
 	
--- a/sys/src/9/zynq/main.c
+++ b/sys/src/9/zynq/main.c
@@ -112,7 +112,7 @@
 	l2[CTRL] &= ~1;
 	l2[TAGRAM] = l2[TAGRAM] & ~0x777 | 0x111;
 	l2[DATARAM] = l2[DATARAM] & ~0x777 | 0x121;
-	l2[PREFETCH] |= 3<<28;
+	l2[PREFETCH] |= 3<<28 | 1<<24;
 	l2[AUX] |= 3<<28 | 1<<20;
 	l2[INVWAY] = 0xff;
 	while((l2[INVPA] & 1) != 0)