aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/boot/boot.h8
-rw-r--r--arch/x86/boot/cpucheck.c8
-rw-r--r--arch/x86/boot/main.c4
3 files changed, 13 insertions, 7 deletions
diff --git a/arch/x86/boot/boot.h b/arch/x86/boot/boot.h
index a34b9982c7cb..9d4b4b43d97a 100644
--- a/arch/x86/boot/boot.h
+++ b/arch/x86/boot/boot.h
@@ -25,6 +25,8 @@
25#include <asm/boot.h> 25#include <asm/boot.h>
26#include <asm/setup.h> 26#include <asm/setup.h>
27 27
28#define NCAPINTS 8
29
28/* Useful macros */ 30/* Useful macros */
29#define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) 31#define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)]))
30 32
@@ -242,6 +244,12 @@ int cmdline_find_option(const char *option, char *buffer, int bufsize);
242int cmdline_find_option_bool(const char *option); 244int cmdline_find_option_bool(const char *option);
243 245
244/* cpu.c, cpucheck.c */ 246/* cpu.c, cpucheck.c */
247struct cpu_features {
248 int level; /* Family, or 64 for x86-64 */
249 int model;
250 u32 flags[NCAPINTS];
251};
252extern struct cpu_features cpu;
245int check_cpu(int *cpu_level_ptr, int *req_level_ptr, u32 **err_flags_ptr); 253int check_cpu(int *cpu_level_ptr, int *req_level_ptr, u32 **err_flags_ptr);
246int validate_cpu(void); 254int validate_cpu(void);
247 255
diff --git a/arch/x86/boot/cpucheck.c b/arch/x86/boot/cpucheck.c
index 7804389ee005..c1ce0303d994 100644
--- a/arch/x86/boot/cpucheck.c
+++ b/arch/x86/boot/cpucheck.c
@@ -30,13 +30,7 @@
30#include <asm/required-features.h> 30#include <asm/required-features.h>
31#include <asm/msr-index.h> 31#include <asm/msr-index.h>
32 32
33struct cpu_features { 33struct cpu_features cpu;
34 int level; /* Family, or 64 for x86-64 */
35 int model;
36 u32 flags[NCAPINTS];
37};
38
39static struct cpu_features cpu;
40static u32 cpu_vendor[3]; 34static u32 cpu_vendor[3];
41static u32 err_flags[NCAPINTS]; 35static u32 err_flags[NCAPINTS];
42 36
diff --git a/arch/x86/boot/main.c b/arch/x86/boot/main.c
index 2296164b54d2..01aa64b5575b 100644
--- a/arch/x86/boot/main.c
+++ b/arch/x86/boot/main.c
@@ -73,6 +73,10 @@ static void keyboard_set_repeat(void)
73 */ 73 */
74static void query_ist(void) 74static void query_ist(void)
75{ 75{
76 /* Some 486 BIOSes apparently crash on this call */
77 if (cpu.level < 6)
78 return;
79
76 asm("int $0x15" 80 asm("int $0x15"
77 : "=a" (boot_params.ist_info.signature), 81 : "=a" (boot_params.ist_info.signature),
78 "=b" (boot_params.ist_info.command), 82 "=b" (boot_params.ist_info.command),