mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
For x86, read MAXPHYADDR, defined in SDM vol 3 4.1.4 Enumeration of Paging
Features by CPUID as CPUID.80000008H:EAX[7:0], into variable cpu_maxphyaddr. Reviewed by: alc Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week
This commit is contained in:
parent
f104b614a0
commit
b1752aa0ea
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=277047
@ -78,6 +78,7 @@ u_int cpu_max_ext_state_size;
|
||||
u_int cpu_mon_mwait_flags; /* MONITOR/MWAIT flags (CPUID.05H.ECX) */
|
||||
u_int cpu_mon_min_size; /* MONITOR minimum range size, bytes */
|
||||
u_int cpu_mon_max_size; /* MONITOR minimum range size, bytes */
|
||||
u_int cpu_maxphyaddr; /* Max phys addr width in bits */
|
||||
|
||||
SYSCTL_UINT(_hw, OID_AUTO, via_feature_rng, CTLFLAG_RD,
|
||||
&via_feature_rng, 0, "VIA RNG feature available in CPU");
|
||||
|
@ -61,6 +61,7 @@ extern u_int cpu_vendor_id;
|
||||
extern u_int cpu_mon_mwait_flags;
|
||||
extern u_int cpu_mon_min_size;
|
||||
extern u_int cpu_mon_max_size;
|
||||
extern u_int cpu_maxphyaddr;
|
||||
extern char ctx_switch_xsave[];
|
||||
extern u_int hv_high;
|
||||
extern char hv_vendor[];
|
||||
|
@ -107,6 +107,7 @@ u_int cpu_mon_mwait_flags; /* MONITOR/MWAIT flags (CPUID.05H.ECX) */
|
||||
u_int cpu_mon_min_size; /* MONITOR minimum range size, bytes */
|
||||
u_int cpu_mon_max_size; /* MONITOR minimum range size, bytes */
|
||||
u_int cyrix_did; /* Device ID of Cyrix CPU */
|
||||
u_int cpu_maxphyaddr; /* Max phys addr width in bits */
|
||||
|
||||
SYSCTL_UINT(_hw, OID_AUTO, via_feature_rng, CTLFLAG_RD,
|
||||
&via_feature_rng, 0, "VIA RNG feature available in CPU");
|
||||
|
@ -61,6 +61,7 @@ extern u_int cpu_vendor_id;
|
||||
extern u_int cpu_mon_mwait_flags;
|
||||
extern u_int cpu_mon_min_size;
|
||||
extern u_int cpu_mon_max_size;
|
||||
extern u_int cpu_maxphyaddr;
|
||||
extern u_int cyrix_did;
|
||||
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
|
||||
extern int has_f00f_bug;
|
||||
|
@ -1393,7 +1393,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__
|
||||
|
Loading…
Reference in New Issue
Block a user