shithub: riscv

Download patch

ref: b591ee195b71eb3be9963e544c3fea72c017a09a
parent: ba7b07d51ad65d9a2d38e08799525c7716c77825
author: cinap_lenrek <[email protected]>
date: Sat Sep 8 21:53:53 EDT 2018

devarch: reading msr 0xffffffff

--- a/sys/src/9/pc/devarch.c
+++ b/sys/src/9/pc/devarch.c
@@ -400,7 +400,7 @@
 		if((uint)n/8 > -port)
 			error(Ebadarg);
 		end = port+(n/8);
-		for(vp = a; port < end; port++)
+		for(vp = a; port != end; port++)
 			if(rdmsr(port, vp++) < 0)
 				error(Ebadarg);
 		return n;
@@ -473,7 +473,7 @@
 		if((uint)n/8 > -port)
 			error(Ebadarg);
 		end = port+(n/8);
-		for(vp = a; port < end; port++)
+		for(vp = a; port != end; port++)
 			if(wrmsr(port, *vp++) < 0)
 				error(Ebadarg);
 		return n;