i386: paravirt boot sequence
[deliverable/linux.git] / arch / x86 / boot / compressed / head_32.S
index f35ea2237522c0267139af7666e2875b571dd4b4..a0ae2e7f6cecbcf0c0311a0ce6029408fd350268 100644 (file)
 #include <asm/segment.h>
 #include <asm/page.h>
 #include <asm/boot.h>
+#include <asm/asm-offsets.h>
 
 .section ".text.head","ax",@progbits
        .globl startup_32
 
 startup_32:
-       cld
-       cli
+       /* check to see if KEEP_SEGMENTS flag is meaningful */
+       cmpw $0x207, BP_version(%esi)
+       jb 1f
+
+       /* test KEEP_SEGMENTS flag to see if the bootloader is asking
+        * us to not reload segments */
+       testb $(1<<6), BP_loadflags(%esi)
+       jnz 2f
+
+1:     cli
        movl $(__BOOT_DS),%eax
        movl %eax,%ds
        movl %eax,%es
@@ -41,6 +50,8 @@ startup_32:
        movl %eax,%gs
        movl %eax,%ss
 
+2:     cld
+
 /* Calculate the delta between where we were compiled to run
  * at and where we were actually loaded at.  This can only be done
  * with a short local call on x86.  Nothing  else will tell us what
This page took 0.038561 seconds and 5 git commands to generate.