]> git.baikalelectronics.ru Git - kernel.git/commit
x86, boot: Move CPU flags out of cpucheck
authorKees Cook <keescook@chromium.org>
Fri, 11 Oct 2013 00:18:13 +0000 (17:18 -0700)
committerH. Peter Anvin <hpa@linux.intel.com>
Sun, 13 Oct 2013 10:12:02 +0000 (03:12 -0700)
commit7eb72268cce6244af3cad564881f1eada5850ffb
tree145b40fe13f64045d0a5e1063ac17357e9fad0de
parentdb1207e9e55e46a1fba4ab7f1a9c99f7c6ef4145
x86, boot: Move CPU flags out of cpucheck

Refactor the CPU flags handling out of the cpucheck routines so that
they can be reused by the future ASLR routines (in order to detect CPU
features like RDRAND and RDTSC).

This reworks has_eflag() and has_fpu() to be used on both 32-bit and
64-bit, and refactors the calls to cpuid to make them PIC-safe on 32-bit.

Signed-off-by: Kees Cook <keescook@chromium.org>
Link: http://lkml.kernel.org/r/1381450698-28710-2-git-send-email-keescook@chromium.org
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
arch/x86/boot/Makefile
arch/x86/boot/boot.h
arch/x86/boot/compressed/Makefile
arch/x86/boot/compressed/cpuflags.c [new file with mode: 0644]
arch/x86/boot/cpucheck.c
arch/x86/boot/cpuflags.c [new file with mode: 0644]
arch/x86/boot/cpuflags.h [new file with mode: 0644]