ref: 4577848db478cdbf1073f9365d36cfa70892afe3
parent: d4b243b025346ec707878781f473789cf1561404
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Fri Feb 7 20:01:26 EST 2014
reuse mtrr slots with default memory type
--- a/sys/src/9/pc/mtrr.c
+++ b/sys/src/9/pc/mtrr.c
@@ -295,7 +295,9 @@
for(i = 0; i < vcnt; i++){mtrrget(&mtrr, i);
mok = mtrrdec(&mtrr, &mp, &msize, &mtype);
- if(!mok || mp == base && msize == size){+ if(slot == -1 && !mok || mtype == (def & Deftype))
+ slot = i; /* good, but look further for exact match */
+ if(mok && mp == base && msize == size){slot = i;
break;
}
--
⑨