Remove ci_max_ext_cpuid because it's the same as ci_cpuid_extlevel.

This commit is contained in:
msaitoh 2020-04-06 09:46:21 +00:00
parent 11be9a9673
commit db775ba90f
1 changed files with 7 additions and 13 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: i386.c,v 1.108 2019/11/17 15:32:00 msaitoh Exp $ */
/* $NetBSD: i386.c,v 1.109 2020/04/06 09:46:21 msaitoh Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@ -57,7 +57,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: i386.c,v 1.108 2019/11/17 15:32:00 msaitoh Exp $");
__RCSID("$NetBSD: i386.c,v 1.109 2020/04/06 09:46:21 msaitoh Exp $");
#endif /* not lint */
#include <sys/types.h>
@ -119,7 +119,6 @@ struct cpu_info {
uint8_t ci_coreid;
uint8_t ci_smtid;
uint32_t ci_initapicid;
uint32_t ci_max_ext_cpuid;
uint32_t ci_cur_xsave;
uint32_t ci_max_xsave;
@ -1944,7 +1943,7 @@ identifycpu_cpuids_amd(struct cpu_info *ci)
x86_cpuid(1, descs);
lp_max = __SHIFTOUT(descs[1], CPUID_HTT_CORES);
if (cpu_family >= 0x10 && ci->ci_max_ext_cpuid >= 0x8000008) {
if (cpu_family >= 0x10 && ci->ci_cpuid_extlevel >= 0x8000008) {
x86_cpuid(0x8000008, descs);
core_max = (descs[2] & 0xff) + 1;
n = (descs[2] >> 12) & 0x0f;
@ -2288,21 +2287,16 @@ identifycpu(int fd, const char *cpuname)
}
if (cpu_vendor == CPUVENDOR_AMD) {
x86_cpuid(0x80000000, descs);
if (descs[0] >= 0x80000000)
ci->ci_max_ext_cpuid = descs[0];
else
ci->ci_max_ext_cpuid = 0;
if (ci->ci_max_ext_cpuid >= 0x80000007)
if (ci->ci_cpuid_extlevel >= 0x80000007)
powernow_probe(ci);
if (ci->ci_max_ext_cpuid >= 0x80000008) {
if (ci->ci_cpuid_extlevel >= 0x80000008) {
x86_cpuid(0x80000008, descs);
print_bits(cpuname, "AMD Extended features",
CPUID_CAPEX_FLAGS, descs[1]);
}
if ((ci->ci_max_ext_cpuid >= 0x8000000a)
if ((ci->ci_cpuid_extlevel >= 0x8000000a)
&& (ci->ci_feat_val[3] & CPUID_SVM) != 0) {
x86_cpuid(0x8000000a, descs);
aprint_verbose("%s: SVM Rev. %d\n", cpuname,
@ -2312,7 +2306,7 @@ identifycpu(int fd, const char *cpuname)
print_bits(cpuname, "SVM features",
CPUID_AMD_SVM_FLAGS, descs[3]);
}
if (ci->ci_max_ext_cpuid >= 0x8000001f) {
if (ci->ci_cpuid_extlevel >= 0x8000001f) {
x86_cpuid(0x8000001f, descs);
print_bits(cpuname, "Encrypted Memory features",
CPUID_AMD_ENCMEM_FLAGS, descs[0]);