diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2007-10-26 13:29:04 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2007-10-27 14:57:43 -0400 |
commit | bd53147db8bdf5dd49025c198ff18ac23f560e0e (patch) | |
tree | 50b65c7e72e2fdfc754e9c0844dbb7931d01e2db /arch/x86/boot/compressed | |
parent | 0cca1ca647d87c2c0b0d76d2f32683ce34d54989 (diff) |
x86: Fix boot protocol KEEP_SEGMENTS check.
The kernel only ever supports 1 version of the boot protocol
so there is no need to check the boot protocol revision to
see if a feature is supported.
Both x86 and x86_64 support the same boot protocol so we need
to implement the KEEP_SEGMENTS on x86_64 as well. It isn't
just paravirt bootloaders that could use this functionality.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Vivek Goyal <vgoyal@in.ibm.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Zachary Amsden <zach@vmware.com>
Cc: Andi Kleen <ak@suse.de>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/boot/compressed')
-rw-r--r-- | arch/x86/boot/compressed/head_32.S | 12 | ||||
-rw-r--r-- | arch/x86/boot/compressed/head_64.S | 7 |
2 files changed, 11 insertions, 8 deletions
diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S index a0ae2e7f6cec..036e635f18a3 100644 --- a/arch/x86/boot/compressed/head_32.S +++ b/arch/x86/boot/compressed/head_32.S | |||
@@ -33,24 +33,20 @@ | |||
33 | .globl startup_32 | 33 | .globl startup_32 |
34 | 34 | ||
35 | startup_32: | 35 | startup_32: |
36 | /* check to see if KEEP_SEGMENTS flag is meaningful */ | 36 | cld |
37 | cmpw $0x207, BP_version(%esi) | ||
38 | jb 1f | ||
39 | |||
40 | /* test KEEP_SEGMENTS flag to see if the bootloader is asking | 37 | /* test KEEP_SEGMENTS flag to see if the bootloader is asking |
41 | * us to not reload segments */ | 38 | * us to not reload segments */ |
42 | testb $(1<<6), BP_loadflags(%esi) | 39 | testb $(1<<6), BP_loadflags(%esi) |
43 | jnz 2f | 40 | jnz 1f |
44 | 41 | ||
45 | 1: cli | 42 | cli |
46 | movl $(__BOOT_DS),%eax | 43 | movl $(__BOOT_DS),%eax |
47 | movl %eax,%ds | 44 | movl %eax,%ds |
48 | movl %eax,%es | 45 | movl %eax,%es |
49 | movl %eax,%fs | 46 | movl %eax,%fs |
50 | movl %eax,%gs | 47 | movl %eax,%gs |
51 | movl %eax,%ss | 48 | movl %eax,%ss |
52 | 49 | 1: | |
53 | 2: cld | ||
54 | 50 | ||
55 | /* Calculate the delta between where we were compiled to run | 51 | /* Calculate the delta between where we were compiled to run |
56 | * at and where we were actually loaded at. This can only be done | 52 | * at and where we were actually loaded at. This can only be done |
diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S index 49467640751f..1ccb38a7f0d2 100644 --- a/arch/x86/boot/compressed/head_64.S +++ b/arch/x86/boot/compressed/head_64.S | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <asm/pgtable.h> | 29 | #include <asm/pgtable.h> |
30 | #include <asm/page.h> | 30 | #include <asm/page.h> |
31 | #include <asm/msr.h> | 31 | #include <asm/msr.h> |
32 | #include <asm/asm-offsets.h> | ||
32 | 33 | ||
33 | .section ".text.head" | 34 | .section ".text.head" |
34 | .code32 | 35 | .code32 |
@@ -36,11 +37,17 @@ | |||
36 | 37 | ||
37 | startup_32: | 38 | startup_32: |
38 | cld | 39 | cld |
40 | /* test KEEP_SEGMENTS flag to see if the bootloader is asking | ||
41 | * us to not reload segments */ | ||
42 | testb $(1<<6), BP_loadflags(%esi) | ||
43 | jnz 1f | ||
44 | |||
39 | cli | 45 | cli |
40 | movl $(__KERNEL_DS), %eax | 46 | movl $(__KERNEL_DS), %eax |
41 | movl %eax, %ds | 47 | movl %eax, %ds |
42 | movl %eax, %es | 48 | movl %eax, %es |
43 | movl %eax, %ss | 49 | movl %eax, %ss |
50 | 1: | ||
44 | 51 | ||
45 | /* Calculate the delta between where we were compiled to run | 52 | /* Calculate the delta between where we were compiled to run |
46 | * at and where we were actually loaded at. This can only be done | 53 | * at and where we were actually loaded at. This can only be done |