Add ci_cpuid_level and ci_vendor holding the per-CPU basic cpuid
authorguenther <guenther@openbsd.org>
Wed, 3 Apr 2024 02:01:21 +0000 (02:01 +0000)
committerguenther <guenther@openbsd.org>
Wed, 3 Apr 2024 02:01:21 +0000 (02:01 +0000)
commitccd74f9409a9152da4bb5d9abdb4977db9c6f603
tree189da20123ee9860ade81d17fcc65b5183599e31
parent5c3b91f681524aa6c4e98dd4bda5c353a87a1ba0
Add ci_cpuid_level and ci_vendor holding the per-CPU basic cpuid
level and a numeric mapping of the cpu vendor, both from CPUID(0).
Convert the general use of strcmp(cpu_vendor) to simple numeric
tests of ci_vendor.  Track the minimum of all ci_cpuid_level in the
cpuid_level global and continue to use that for what we vmm exposes.

AMD testing help matthieu@ krw@
ok miod@ deraadt@ cheloha@
sys/arch/amd64/amd64/cacheinfo.c
sys/arch/amd64/amd64/cpu.c
sys/arch/amd64/amd64/identcpu.c
sys/arch/amd64/amd64/lapic.c
sys/arch/amd64/amd64/machdep.c
sys/arch/amd64/amd64/mtrr.c
sys/arch/amd64/amd64/pctr.c
sys/arch/amd64/amd64/tsc.c
sys/arch/amd64/amd64/ucode.c
sys/arch/amd64/include/cpu.h