reuse mtrr slots with default memory type

This commit is contained in:
cinap_lenrek 2014-02-08 01:01:26 +01:00
parent 9c99675c1c
commit b3df8945bd

View file

@ -295,7 +295,9 @@ mtrr(uvlong base, uvlong size, char *tstr)
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;
}