H. Peter Anvin 5a5a51db78 x86-32: Start out eflags and cr4 clean
%cr4 is supposed to reflect a set of features into which the operating
system is opting in.  If the BIOS or bootloader leaks bits here, this
is not desirable.  Consider a bootloader passing in %cr4.pae set to a
legacy paging kernel, for example -- it will not have any immediate
effect, but the kernel would crash when turning paging on.

A similar argument applies to %eflags, and since we have to look for
%eflags.id being settable we can use a sequence which clears %eflags
as a side effect.

Note that we already do this for x86-64.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Link: http://lkml.kernel.org/r/1348529239-17943-1-git-send-email-hpa@linux.intel.com
2012-09-26 15:06:22 -07:00
..
2012-09-21 17:18:44 -07:00
2012-06-06 11:58:38 +02:00
2011-12-12 14:26:10 -08:00
2012-03-28 18:11:12 +01:00
2011-07-01 10:37:14 +02:00
2012-03-28 18:11:12 +01:00
2011-02-17 14:59:22 +01:00
2012-05-08 14:08:44 +02:00
2012-06-18 10:53:18 +02:00
2012-03-28 18:11:12 +01:00
2012-03-28 18:11:12 +01:00
2012-06-25 13:48:30 +02:00
2012-09-21 17:18:44 -07:00
2012-05-14 11:49:38 +02:00
2011-08-04 16:13:49 -07:00
2012-03-28 18:11:12 +01:00
2011-03-18 10:39:30 +01:00