It seems that the CPUID lies about the monitor-line size, or at least our
authorkettenis <kettenis@openbsd.org>
Sat, 18 Apr 2015 22:16:21 +0000 (22:16 +0000)
committerkettenis <kettenis@openbsd.org>
Sat, 18 Apr 2015 22:16:21 +0000 (22:16 +0000)
commit8043f12fa2eede1d6d6ba339cad420608f12305d
tree0cd6ceadf5a66ee82879ab4f01fdf9124fe79928
parenta47b6461a15f74beac188483616126ed5e987f93
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@
sys/arch/amd64/amd64/cpu.c
sys/arch/amd64/amd64/machdep.c
sys/arch/amd64/include/cpu.h
sys/arch/i386/i386/cpu.c
sys/arch/i386/i386/machdep.c
sys/arch/i386/include/cpu.h