shithub: riscv

Download patch

ref: 2b4706b6624bfd0281fce6c384804bb8458dab09
parent: fc7f6f8e99d9db307883448a49a1e3d6243d04cf
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Fri Feb 7 15:04:19 EST 2014

pc64: dont reuse mtrr slots that are above 4GB

we used to override/reuse mtrr slots over 4GB as the
kernel wasnt able to use that memory. pc64 can.

--- a/sys/src/9/pc/mtrr.c
+++ b/sys/src/9/pc/mtrr.c
@@ -295,8 +295,7 @@
 	for(i = 0; i < vcnt; i++){
 		mtrrget(&mtrr, i);
 		mok = mtrrdec(&mtrr, &mp, &msize, &mtype);
-		/* reuse any entry for addresses above 4GB */
-		if(!mok || mp == base && msize == size || mp >= (1LL<<32)){
+		if(!mok || mp == base && msize == size){
 			slot = i;
 			break;
 		}