CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2015/04/18 16:16:21
Modified files:
sys/arch/i386/i386: cpu.c machdep.c
sys/arch/i386/include: cpu.h
sys/arch/amd64/amd64: cpu.c machdep.c
sys/arch/amd64/include: cpu.h
Log message:
It seems that the CPUID lies about the monitor-line size, or at least our
interpretation of it isn't quite right. So instead of allocating memory
and slicing it based on the parameters returned by CPUID, simply use a member
in struct cpu_info like basically all other OSes out there do. Our struct
cpu_info is large enough to never cause any overlap. This makes the
mwait-based idle loop actually work. We still execute the CPUID instruction
to make sure monitor/mwait is properly supported by the hardware we're
running on.
ok sthen@, deraadt@, guenther@