From adf96a529e10eaa90cdc3a4a02c88d5300c9ab52 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Mon, 13 May 2019 19:21:14 +0200 Subject: [PATCH] bcm: add cache invalidate before accessing prop buffer --- sys/src/9/bcm/vcore.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/src/9/bcm/vcore.c b/sys/src/9/bcm/vcore.c index bc5b6a1b9..53293b0d4 100644 --- a/sys/src/9/bcm/vcore.c +++ b/sys/src/9/bcm/vcore.c @@ -147,7 +147,7 @@ vcreq(int tag, void *buf, int vallen, int rsplen) 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 @@ vcreq(int tag, void *buf, int vallen, int rsplen) return -1; busaddr = 0; } + cachedinvse(prop, n); if(prop->req == RspOk && prop->tag == tag && (prop->taglen&TagResp)) {