shithub: riscv

Download patch

ref: adf96a529e10eaa90cdc3a4a02c88d5300c9ab52
parent: a3b5e3994f7f2897ab1b5bb20b91224d145c1fc1
author: cinap_lenrek <[email protected]>
date: Mon May 13 15:21:14 EDT 2019

bcm: add cache invalidate before accessing prop buffer

--- a/sys/src/9/bcm/vcore.c
+++ b/sys/src/9/bcm/vcore.c
@@ -147,7 +147,7 @@
 	prop->taglen = vallen;
 	if(vallen > 0)
 		memmove(prop->data, buf, vallen);
-	cachedwbinvse(prop, prop->len);
+	cachedwbinvse(prop, n);
 	for(;;){
 		aprop = busaddr? dmaaddr(prop) : (uintptr)prop;
 		vcwrite(ChanProps, aprop);
@@ -158,6 +158,7 @@
 			return -1;
 		busaddr = 0;
 	}
+	cachedinvse(prop, n);
 	if(prop->req == RspOk &&
 	   prop->tag == tag &&
 	   (prop->taglen&TagResp)) {