reuse mtrr slots with default memory type
This commit is contained in:
parent
9c99675c1c
commit
b3df8945bd
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue