summaryrefslogtreecommitdiffstats
path: root/arch/x86/boot/compressed/head_64.S
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2007-10-26 19:29:04 +0200
committerThomas Gleixner <tglx@linutronix.de>2007-10-27 20:57:43 +0200
commitbd53147db8bdf5dd49025c198ff18ac23f560e0e (patch)
tree50b65c7e72e2fdfc754e9c0844dbb7931d01e2db /arch/x86/boot/compressed/head_64.S
parentx86: voyager: fix bogus conversion to per_cpu for boot_cpu_info (diff)
downloadlinux-bd53147db8bdf5dd49025c198ff18ac23f560e0e.tar.xz
linux-bd53147db8bdf5dd49025c198ff18ac23f560e0e.zip
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/head_64.S')
-rw-r--r--arch/x86/boot/compressed/head_64.S7
1 files changed, 7 insertions, 0 deletions
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 @@
#include <asm/pgtable.h>
#include <asm/page.h>
#include <asm/msr.h>
+#include <asm/asm-offsets.h>
.section ".text.head"
.code32
@@ -36,11 +37,17 @@
startup_32:
cld
+ /* test KEEP_SEGMENTS flag to see if the bootloader is asking
+ * us to not reload segments */
+ testb $(1<<6), BP_loadflags(%esi)
+ jnz 1f
+
cli
movl $(__KERNEL_DS), %eax
movl %eax, %ds
movl %eax, %es
movl %eax, %ss
+1:
/* Calculate the delta between where we were compiled to run
* at and where we were actually loaded at. This can only be done