summaryrefslogtreecommitdiffstats
path: root/sys/x86
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2015-01-19 10:52:55 +0000
committerkib <kib@FreeBSD.org>2015-01-19 10:52:55 +0000
commitda566e85be96a2ed618e86f2a0e67a61a8e61eef (patch)
tree5a348f34611f967445bc4597da347e2133eaf77b /sys/x86
parentb1054791ad23c8bd242677882470e45f3c2f9637 (diff)
downloadFreeBSD-src-da566e85be96a2ed618e86f2a0e67a61a8e61eef.zip
FreeBSD-src-da566e85be96a2ed618e86f2a0e67a61a8e61eef.tar.gz
MFC r277047:
For x86, read MAXPHYADDR into variable cpu_maxphyaddr.
Diffstat (limited to 'sys/x86')
-rw-r--r--sys/x86/x86/identcpu.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/x86/x86/identcpu.c b/sys/x86/x86/identcpu.c
index 87a5664..8bdc14e 100644
--- a/sys/x86/x86/identcpu.c
+++ b/sys/x86/x86/identcpu.c
@@ -1289,7 +1289,10 @@ identify_cpu(void)
}
if (cpu_exthigh >= 0x80000008) {
do_cpuid(0x80000008, regs);
+ cpu_maxphyaddr = regs[0] & 0xff;
cpu_procinfo2 = regs[2];
+ } else {
+ cpu_maxphyaddr = (cpu_feature & CPUID_PAE) != 0 ? 36 : 32;
}
#ifdef __i386__
OpenPOWER on IntegriCloud