diff options
author | Andi Kleen <ak@suse.de> | 2007-05-02 19:27:20 +0200 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2007-05-02 19:27:20 +0200 |
commit | c7f81c9453375d6416658995eafd3397cb9bba1d (patch) | |
tree | 44e018745a0b7c12b127eb54106f2f0c2bb5a570 /arch/i386/boot | |
parent | 484ad393659f20d784a3a93613fb3fd3d9f171fa (diff) |
[PATCH] i386: Verify important CPUID bits in real mode
Check some CPUID bits that are needed for compiler generated early in boot.
When the system is still in real mode before changing the VESA BIOS mode
it is possible to still display an visible error message on the screen.
Similar to x86-64.
Includes cleanups from Eric Biederman
Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'arch/i386/boot')
-rw-r--r-- | arch/i386/boot/setup.S | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/i386/boot/setup.S b/arch/i386/boot/setup.S index b74b7f40b79c..f8b3b9cda2b1 100644 --- a/arch/i386/boot/setup.S +++ b/arch/i386/boot/setup.S @@ -302,7 +302,24 @@ good_sig: loader_panic_mess: .string "Wrong loader, giving up..." +# check minimum cpuid +# we do this here because it is the last place we can actually +# show a user visible error message. Later the video modus +# might be already messed up. loader_ok: + call verify_cpu + testl %eax,%eax + jz cpu_ok + lea cpu_panic_mess,%si + call prtstr +1: jmp 1b + +cpu_panic_mess: + .asciz "PANIC: CPU too old for this kernel." + +#include "../kernel/verify_cpu.S" + +cpu_ok: # Get memory size (extended mem, kB) xorl %eax, %eax |