summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2020-05-24 17:50:37 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2020-05-24 17:50:37 +0200
commit153fcabb00c725ffd604828111752b4e65725787 (patch)
tree727d1d8bb1499b41749f4159297c3a99743a7d32
parent9960a125a39bff42912525216bf23539e4000f9c (diff)
pc, pc64: fix wrong mtrr physmask() for machines without extended address size msr
-rw-r--r--sys/src/9/pc/mtrr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/src/9/pc/mtrr.c b/sys/src/9/pc/mtrr.c
index 3c41cd275..4b1558bfe 100644
--- a/sys/src/9/pc/mtrr.c
+++ b/sys/src/9/pc/mtrr.c
@@ -113,6 +113,8 @@ physmask(void)
if(regs[0] >= Extaddrsz) { /* ax */
cpuid(Extaddrsz, regs);
mask = (1LL << (regs[0] & 0xFF)) - 1; /* ax */
+ } else {
+ mask &= (1LL << 36) - 1;
}
return mask;
}