Merge branch 'semaphore' of git://git.kernel.org/pub/scm/linux/kernel/git/willy/misc
[sfrench/cifs-2.6.git] / arch / x86 / boot / compressed / head_32.S
index a0ae2e7f6cecbcf0c0311a0ce6029408fd350268..ba7736cf2ec73e8977e447a8ab852d083f079c42 100644 (file)
        .globl startup_32
 
 startup_32:
-       /* check to see if KEEP_SEGMENTS flag is meaningful */
-       cmpw $0x207, BP_version(%esi)
-       jb 1f
-
+       cld
        /* test KEEP_SEGMENTS flag to see if the bootloader is asking
         * us to not reload segments */
        testb $(1<<6), BP_loadflags(%esi)
-       jnz 2f
+       jnz 1f
 
-1:     cli
+       cli
        movl $(__BOOT_DS),%eax
        movl %eax,%ds
        movl %eax,%es
        movl %eax,%fs
        movl %eax,%gs
        movl %eax,%ss
-
-2:     cld
+1:
 
 /* Calculate the delta between where we were compiled to run
  * at and where we were actually loaded at.  This can only be done
@@ -134,7 +130,7 @@ relocated:
 /*
  * Setup the stack for the decompressor
  */
-       leal stack_end(%ebx), %esp
+       leal boot_stack_end(%ebx), %esp
 
 /*
  * Do the decompression, and jump to the new kernel..
@@ -146,8 +142,8 @@ relocated:
        pushl %eax      # input_len
        leal input_data(%ebx), %eax
        pushl %eax      # input_data
-       leal _end(%ebx), %eax
-       pushl %eax      # end of the image as third argument
+       leal boot_heap(%ebx), %eax
+       pushl %eax      # heap area as third argument
        pushl %esi      # real mode pointer as second arg
        call decompress_kernel
        addl $20, %esp
@@ -185,7 +181,10 @@ relocated:
        jmp *%ebp
 
 .bss
+/* Stack and heap for uncompression */
 .balign 4
-stack:
-       .fill 4096, 1, 0
-stack_end:
+boot_heap:
+       .fill BOOT_HEAP_SIZE, 1, 0
+boot_stack:
+       .fill BOOT_STACK_SIZE, 1, 0
+boot_stack_end: