aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/boot/compressed/head_32.S
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-05-08 19:27:41 -0400
committerH. Peter Anvin <hpa@zytor.com>2009-05-08 20:18:47 -0400
commit0a137736704ef9af719409933b3c33e138461786 (patch)
treeb6ca7c13de5db34de9eda7bfa7549121f4c6a855 /arch/x86/boot/compressed/head_32.S
parent5b11f1cee5797b38d16b94d8745b12b6727a8373 (diff)
x86, boot: set up the decompression stack as early as possible
Set up the decompression stack as soon as we know where it needs to go. That way we have a full-service stack as soon as possible, rather than relying on the BP_scratch field. Note that the stack does need to be empty during bss zeroing (or else the stack needs to be moved out of the bss segment, which is also an option.) [ Impact: cleanup, minor paranoia ] Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/boot/compressed/head_32.S')
-rw-r--r--arch/x86/boot/compressed/head_32.S10
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S
index 59425e157df3..d7245cf80261 100644
--- a/arch/x86/boot/compressed/head_32.S
+++ b/arch/x86/boot/compressed/head_32.S
@@ -88,6 +88,9 @@ ENTRY(startup_32)
88 addl $4095, %ebx 88 addl $4095, %ebx
89 andl $~4095, %ebx 89 andl $~4095, %ebx
90 90
91 /* Set up the stack */
92 leal boot_stack_end(%ebx), %esp
93
91/* 94/*
92 * Copy the compressed kernel to the end of our buffer 95 * Copy the compressed kernel to the end of our buffer
93 * where decompression in place becomes safe. 96 * where decompression in place becomes safe.
@@ -122,7 +125,7 @@ ENDPROC(startup_32)
122relocated: 125relocated:
123 126
124/* 127/*
125 * Clear BSS 128 * Clear BSS (stack is currently empty)
126 */ 129 */
127 xorl %eax, %eax 130 xorl %eax, %eax
128 leal _bss(%ebx), %edi 131 leal _bss(%ebx), %edi
@@ -132,11 +135,6 @@ relocated:
132 rep stosb 135 rep stosb
133 136
134/* 137/*
135 * Setup the stack for the decompressor
136 */
137 leal boot_stack_end(%ebx), %esp
138
139/*
140 * Do the decompression, and jump to the new kernel.. 138 * Do the decompression, and jump to the new kernel..
141 */ 139 */
142 movl output_len(%ebx), %eax 140 movl output_len(%ebx), %eax