git: 9front

Download patch

ref: b41820ed399dc0d1c2a8c4a3fc037a9d86d69759
parent: 2843c31621fb0340fa148852ff52b4b57f172c2b
author: cinap_lenrek <cinap_lenrek@felloff.net>
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)) {
--